当前位置: 首页>>代码示例>>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;未经允许,请勿转载。