• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# WebControls.ObjectDataSourceStatusEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ObjectDataSourceStatusEventArgs类的具体用法?C# ObjectDataSourceStatusEventArgs怎么用?C# ObjectDataSourceStatusEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ObjectDataSourceStatusEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了ObjectDataSourceStatusEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: odsAccountsPaged_Selected

 protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception != null)
     {
         messageBox.ShowErrorMessage("ORGANZATION_GET_USERS", e.Exception);
         e.ExceptionHandled = true;
     }
 }        
开发者ID:jordan49,项目名称:websitepanel,代码行数:8,代码来源:OrganizationUsers.ascx.cs


示例17: odsAccountsPaged_Selected

 protected void odsAccountsPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception != null)
     {
         messageBox.ShowErrorMessage("EXCHANGE_DISCLAIMERS_LISTS", e.Exception);
         e.ExceptionHandled = true;
     }
 }
开发者ID:lwhitelock,项目名称:Websitepanel,代码行数:8,代码来源:ExchangeDisclaimers.ascx.cs


示例18: odsBlogComment_Inserted

 /// <summary>
 /// Send the inserted comment to the predefined mail recepient using the singleton mailmanager
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void odsBlogComment_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     BlogComment insertedComment = (BlogComment)e.ReturnValue;
     if (insertedComment != null)
     {
         MailManager.GetMailManager().SendCommentMessage(insertedComment);
     }
 }
开发者ID:blel,项目名称:ebalit,代码行数:13,代码来源:BlogContentUserControl.ascx.cs


示例19: CommentDataSource_Selected

 /// <summary>
 /// TODO: Skriv beskrivning till CommentDataSource_Selected.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void CommentDataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception != null)
     {
         AddErrorMessage(Strings.Post_Selecting_Error);
         e.ExceptionHandled = true;
     }
 }
开发者ID:shjelm,项目名称:ITProject,代码行数:13,代码来源:CommentEdit.ascx.cs


示例20: dsMensaje_Deleted

 protected void dsMensaje_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     EstadoOperacion resultado = (EstadoOperacion)e.ReturnValue;
     if (!resultado.Estado)
     {
         this.lblMensaje.Text = resultado.Mensaje;
     }
 }
开发者ID:jmptrader,项目名称:Switch-Transaccional,代码行数:8,代码来源:ConsultarMensaje.aspx.cs



注:本文中的System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap