當前位置: 首頁>>代碼示例>>C#>>正文


C# WebControls.ObjectDataSourceStatusEventArgs類代碼示例

本文整理匯總了C#中System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# ObjectDataSourceStatusEventArgs類的具體用法?C# ObjectDataSourceStatusEventArgs怎麽用?C# ObjectDataSourceStatusEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ObjectDataSourceStatusEventArgs類屬於System.Web.UI.WebControls命名空間,在下文中一共展示了ObjectDataSourceStatusEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CategoryObjectDataSource_Deleted

 protected void CategoryObjectDataSource_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
     }
 }
開發者ID:chutinhha,項目名稱:logic-university-stationery-store-inventory-system,代碼行數:7,代碼來源:Categories.aspx.cs

示例2: ods_PersonalProfile_Updated

 protected void ods_PersonalProfile_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception == null)
     {
         //ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('Your profile saved successfully.');", true);
     }
 }
開發者ID:wedofreelancecode,項目名稱:taxgenieonline,代碼行數:7,代碼來源:editprofile.aspx.cs

示例3: CheckForEfExceptions

 private void CheckForEfExceptions(ObjectDataSourceStatusEventArgs e, string function)
 {
     if (e.Exception.InnerException is DbUpdateConcurrencyException)
     {
         var concurrencyExceptionValidator = new CustomValidator
                                                 {
                                                     IsValid = false,
                                                     ErrorMessage =
                                                         "The record you attempted to edit or delete was modified by another " +
                                                         "user after you got the original value. The edit or delete operation was canceled " +
                                                         "and the other user's values have been displayed so you can " +
                                                         "determine whether you still want to edit or delete this record."
                                                 };
         Page.Validators.Add(concurrencyExceptionValidator);
         e.ExceptionHandled = true;
     }
     else if (e.Exception.InnerException is DbEntityValidationException)
     {
         var concurrencyExceptionValidator = new CustomValidator();
         concurrencyExceptionValidator.IsValid = false;
         StringBuilder errors = new StringBuilder();
         foreach (var err in ((DbEntityValidationException)e.Exception.InnerException).EntityValidationErrors)
         {
             foreach (var msg in err.ValidationErrors)
             {
                 var validator = new CustomValidator();
                 validator.IsValid = false;
                 validator.ErrorMessage = msg.ErrorMessage;
                 Page.Validators.Add(validator);
                 e.ExceptionHandled = true;
             }
         }
     }
 }
開發者ID:aranhasete,項目名稱:EF5-for-Real-Web-Applications,代碼行數:34,代碼來源:Customers.aspx.cs

示例4: oTerminal_Updated

 protected void oTerminal_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception == null)
     {
         Response.Redirect("~/Terminales/MantenimientoTerminal/ConsultarTerminal.aspx");
     }
 }
開發者ID:jmptrader,項目名稱:Switch-Transaccional,代碼行數:7,代碼來源:ModificarTerminal.aspx.cs

示例5: dsProtocolo_Inserted

 protected void dsProtocolo_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception == null)
     {
         Response.Redirect("~/Comunicacion/MantenimientoProtocolo/ConsultarProtocolo.aspx");
     }
 }
開發者ID:jmptrader,項目名稱:Switch-Transaccional,代碼行數:7,代碼來源:AgregarProtocolo.aspx.cs

示例6: ObjectDataSourceEx_Selected

 private void ObjectDataSourceEx_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (this.SelectAllCountMethodExecuted)
     {
         this.Count = (int) e.ReturnValue;
     }
 }
開發者ID:arul141890,項目名稱:ScriptGenerator,代碼行數:7,代碼來源:ObjectDataSourceEx.cs

示例7: CallDetailsObjectDataSource_Updated

        protected void CallDetailsObjectDataSource_Updated(object sender, ObjectDataSourceStatusEventArgs e)
        {
            if (e.Exception != null)
            {
                var customValidator = new CustomValidator();
                customValidator.IsValid = false;
                customValidator.ErrorMessage = "Update failed: " + e.Exception.InnerException.Message;
                customValidator.ValidationGroup = "sum";
                Page.Validators.Add(customValidator);
                e.ExceptionHandled = true;

            }
            else
            {
                CallListUpdatePanel.Update();
                MiniDetailBasicUpdatePanel.Update();

                CallDetailsView.DataBind();
                this.CallListGridView.DataBind();
                this.CallListGridView.SelectedIndex = -1;
                this.CallMiniDetailFormView.DataBind();
                this.CallMiniMoreDetailsView.DataBind();

                MessageLiteral.Text = "Success </br></br> <p> Call has been successfully updated <br/> ";
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", "ShowAlertModal();", true);
                CallDetailsView.ChangeMode(DetailsViewMode.Insert);
                Session["EditCallID"] = 0;

            }
        }
開發者ID:jasimuddin534,項目名稱:jasim_basis,代碼行數:30,代碼來源:Calls.aspx.cs

示例8: InstructorDetailsDataSource_Deleted

 protected void InstructorDetailsDataSource_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.AffectedRows != 0)
     {
         InstructorList.DataBind();
     }
 }
開發者ID:nfearnley,項目名稱:ADD,代碼行數:7,代碼來源:Instructors.aspx.cs

示例9: oPuntoServicio_Inserted

 protected void oPuntoServicio_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception == null)
     {
         Response.Redirect("~/Terminales/MantenimientoPuntoServicio/ConsultarPuntoServicio.aspx");
     }
 }
開發者ID:jmptrader,項目名稱:Switch-Transaccional,代碼行數:7,代碼來源:AgregarPuntoServicio.aspx.cs

示例10: ObjectDataSource1_Inserted

 /// <summary>
 /// Adds the inserted id to the view state.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void ObjectDataSource1_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.ReturnValue != null)
     {
         ViewState.Add("Id", e.ReturnValue.ToString());
     }
 }
開發者ID:blel,項目名稱:ebalit,代碼行數:12,代碼來源:CreateBlogEntry.aspx.cs

示例11: DepartmentsObjectDataSource_Deleted

 protected void DepartmentsObjectDataSource_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception != null)
     {
         CheckForOptimisticConcurrencyException(e, "delete");
     }
 }
開發者ID:JaySmith,項目名稱:Presentations,代碼行數:7,代碼來源:Departments.aspx.cs

示例12: CustomerObjectDataSource_Updated

 protected void CustomerObjectDataSource_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception != null)
     {
         CheckForEfExceptions(e, "update");
     }
 }
開發者ID:aranhasete,項目名稱:EF5-for-Real-Web-Applications,代碼行數:7,代碼來源:Customers.aspx.cs

示例13: odsOrgsPaged_Selected

		protected void odsOrgsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
		{
			if (e.Exception != null)
			{
				messageBox.ShowErrorMessage("GET_ORGS", e.Exception);
				e.ExceptionHandled = true;
			}
		}
開發者ID:jordan49,項目名稱:websitepanel,代碼行數:8,代碼來源:Organizations.ascx.cs

示例14: odsServersPaged_Selected

 protected void odsServersPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception != null)
     {
         messageBox.ShowErrorMessage("EXCHANGE_GET_MAILBOXES", e.Exception);
         e.ExceptionHandled = true;
     }
 }
開發者ID:lwhitelock,項目名稱:Websitepanel,代碼行數:8,代碼來源:VdcHome.ascx.cs

示例15: odsSharePointSiteCollectionPaged_Selected

		protected void odsSharePointSiteCollectionPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
		{
			if (e.Exception != null)
			{
				messageBox.ShowErrorMessage("HOSTEDSHAREPOINT_GET_SITECOLLECTIONS", e.Exception);
				e.ExceptionHandled = true;
			}
		}
開發者ID:jordan49,項目名稱:websitepanel,代碼行數:8,代碼來源:HostedSharePointSiteCollections.ascx.cs


注:本文中的System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。