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

C# GridViewUpdatedEventArgs类代码示例

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

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



GridViewUpdatedEventArgs类属于命名空间,在下文中一共展示了GridViewUpdatedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GridView1_RowUpdated

    protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e)
    {
        if (e.Exception != null)
        {
            // Display a user-friendly message
            ExceptionDetails.Visible = true;
            ExceptionDetails.Text = "There was a problem updating the product. ";

            if (e.Exception.InnerException != null)
            {
                Exception inner = e.Exception.InnerException;

                if (inner is System.Data.Common.DbException)
                    ExceptionDetails.Text += "Our database is currently experiencing problems. Please try again later.";
                else if (inner is NoNullAllowedException)
                    ExceptionDetails.Text += "There are one or more required fields that are missing.";
                else if (inner is ArgumentException)
                {
                    string paramName = ((ArgumentException)inner).ParamName;
                    ExceptionDetails.Text += string.Concat("The ", paramName, " value is illegal.");
                }
                else if (inner is ApplicationException)
                    ExceptionDetails.Text += inner.Message;
            }

            // Indicate that the exception has been handled
            e.ExceptionHandled = true;

            // Keep the row in edit mode
            e.KeepInEditMode = true;
        }
    }
开发者ID:kjeans,项目名称:online-shop,代码行数:32,代码来源:ErrorHandling.aspx.cs


示例2: dridView_RoeUpdated

    protected void dridView_RoeUpdated(object sender, GridViewUpdatedEventArgs e)
    {
        GridView1.Columns[1].Visible = true;
        GridView1.Columns[2].Visible = true;
        GridView1.Columns[3].Visible = true;
        GridView1.Columns[4].Visible = true;
        GridView1.Columns[5].Visible = true;
        GridView1.Columns[6].Visible = true;

        GridView1.Columns[9].Visible = false;

        //MailAddress mailfrom = new MailAddress("[email protected]");
        //MailAddress mailto = new MailAddress("[email protected]");
        //MailMessage newmsg = new MailMessage(mailfrom, mailto);

        //newmsg.Subject = "APPOINTMENT";
        //newmsg.Body = "Appointment On date :" + GridView1.Rows[ + " is " + GridView1.SelectedRow.Cells[6].Text;

        ////    Attachment att = new Attachment("C:\\...file path");
        ////  newmsg.Attachments.Add(att);

        //SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
        //smtp.UseDefaultCredentials = false;
        //smtp.Credentials = new NetworkCredential("[email protected]", "were690vase804");
        //smtp.EnableSsl = true;
        //smtp.Send(newmsg);
        //Response.Write(@"<script language='javascript'>alert('Appointment Status sent to Student's Mail')</script>");
    }
开发者ID:tkoushik1,项目名称:OnlineAppointmentManagementSystem,代码行数:28,代码来源:managelappointment.aspx.cs


示例3: gridBenchmarkData_RowUpdated

 protected void gridBenchmarkData_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null) {
         showException(e.Exception, labelException, "updating the benchmark prices");
         e.ExceptionHandled = true;
         e.KeepInEditMode = true;
     }
 }
开发者ID:garsiden,项目名称:Report-Generator,代码行数:8,代码来源:edit.aspx.cs


示例4: Categories_RowUpdated

 protected void Categories_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     // If there were no problems and we updated the PDF file, then delete the existing one
     if (e.Exception == null)
     {
         DeleteRememberedBrochurePath();
     }
 }
开发者ID:kjeans,项目名称:online-shop,代码行数:8,代码来源:UpdatingAndDeleting.aspx.cs


示例5: GridView_RowUpdated

 protected void GridView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         lblConnError.Text = "Fout opgetreden bij het verbinden met de database:<br />" + e;
         e.ExceptionHandled = true;
     }
 }
开发者ID:Silox,项目名称:UGent-stuff,代码行数:8,代码来源:opgave-1-3.aspx.cs


示例6: gvProducts_RowUpdated

 protected void gvProducts_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         lblError.Text = "A database error has occurred.<br /><br />" +
           e.Exception.ToString();
     }
 }
开发者ID:blytherk,项目名称:Case2,代码行数:8,代码来源:ProductMaintenance.aspx.cs


示例7: gridAssetClass_RowUpdated

 protected void gridAssetClass_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null) {
         showException(e.Exception, labelException, "updating the asset class");
         e.ExceptionHandled = true;
         e.KeepInEditMode = true;
     }
 }
开发者ID:garsiden,项目名称:Report-Generator,代码行数:8,代码来源:index.aspx.cs


示例8: grdaltkategoriler_RowUpdated

 protected void grdaltkategoriler_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     int AltKategoriID = Convert.ToInt32((this.grdaltkategoriler.Rows[e.AffectedRows].FindControl("lblID") as Label).Text);
     AltKategoriler altkat = et.AltKategorilers.Single(v => v.ALTID == AltKategoriID);
     altkat.ALTAD = (this.grdaltkategoriler.Rows[e.AffectedRows].FindControl("txtAd") as TextBox).Text;
     altkat.AKID = Convert.ToInt32((this.grdaltkategoriler.Rows[e.AffectedRows].FindControl("DropDownList2") as DropDownList).SelectedValue);
     et.SubmitChanges();
 }
开发者ID:r2bo4,项目名称:asp,代码行数:8,代码来源:altkategoriler.ascx.cs


示例9: gridContent_RowUpdated

 protected void gridContent_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         showException(e.Exception, labelException, "updating the Text Content");
         e.ExceptionHandled = true;
         e.KeepInEditMode = true;
     }
 }
开发者ID:garsiden,项目名称:Report-Generator,代码行数:9,代码来源:index.aspx.cs


示例10: GridView_RowUpdated

 protected void GridView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
         e.KeepInEditMode = true;
         this.Alert(e.Exception.Message);
     }
 }
开发者ID:ghostnguyen,项目名称:redblood,代码行数:9,代码来源:Geo.aspx.cs


示例11: grvStock_RowUpdated

 protected void grvStock_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     e.ExceptionHandled = (e.Exception != null);
     if (e.ExceptionHandled)
     {
         e.KeepInEditMode = true;
         Appz.ClientAlert(this, e.Exception.InnerException.Message);
     }
 }
开发者ID:SoftSuite,项目名称:ABB,代码行数:9,代码来源:ProductStock.aspx.cs


示例12: GroupGridView_RowUpdated

 protected void GroupGridView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
       Flash.Visible = true;
       Flash.Text = e.Exception.Message;
       e.ExceptionHandled = true;
       e.KeepInEditMode = true;
     }
 }
开发者ID:gmhawash,项目名称:SSR,代码行数:10,代码来源:Config.aspx.cs


示例13: Products_RowUpdated

    protected void Products_RowUpdated(object sender, GridViewUpdatedEventArgs e)
    {
        if (e.AffectedRows == 0)
        {
            ConcurrencyViolationMessage.Visible = true;
            e.KeepInEditMode = true;

            // Rebind the data to the GridView to show the latest changes
            Products.DataBind();
        }
    }
开发者ID:kjeans,项目名称:online-shop,代码行数:11,代码来源:OptimisticConcurrency.aspx.cs


示例14: gridView_RowUpdated

 protected void gridView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     GridView1.Columns[1].Visible = true;
     GridView1.Columns[4].Visible = true;
     GridView1.Columns[5].Visible = true;
     GridView1.Columns[6].Visible = true;
     GridView1.Columns[8].Visible = true;
     GridView1.Columns[9].Visible = true;
     GridView1.Columns[10].Visible = false;
     GridView1.Columns[11].Visible = true;
     GridView1.Columns[7].Visible = true;
 }
开发者ID:tkoushik1,项目名称:OnlineAppointmentManagementSystem,代码行数:12,代码来源:lecturermenu.aspx.cs


示例15: grdDiskografije_RowUpdated

 protected void grdDiskografije_RowUpdated(Object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception == null)
     {
         porukaPromjene.InnerText = "Uspješno promijenjeno";
     }
     else
     {
         porukaPromjene.InnerText = "Dogodila se greška";
         e.ExceptionHandled = true;
     }
 }
开发者ID:martinomamic,项目名称:shoottothrill,代码行数:12,代码来源:AdministracijaDiskografije.aspx.cs


示例16: gvFSFileOverview_RowUpdated

    public void gvFSFileOverview_RowUpdated(object sender,  GridViewUpdatedEventArgs e)
    {
        if (e.Exception != null)
        {
            lblErrorMessage.Text = "Error updating fund settle number, check for duplicate numbers";
            e.ExceptionHandled = true;
            e.KeepInEditMode = true;
        }
        int fileId = Convert.ToInt32(e.Keys[0].ToString());

        FSFileOverviewAdapter.PlaceOrdersForFile(fileId);
    }
开发者ID:kiquenet,项目名称:B4F,代码行数:12,代码来源:FSFileOverview.aspx.cs


示例17: GridView_RowUpdated

 protected void GridView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         ActionStatus.Text = e.Exception.Message;
         e.ExceptionHandled = true;
         e.KeepInEditMode = true;
     }
     else
     {
         ActionStatus.Text = "";
     }
 }
开发者ID:ghostnguyen,项目名称:redblood,代码行数:13,代码来源:TestDef.aspx.cs


示例18: GridViewProject_RowUpdated

 protected void GridViewProject_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
       Message.Text = e.Exception.Message + " , Please try again!";
       e.ExceptionHandled = true;
       e.KeepInEditMode = true;
     }
     else
     {
       Message.Text = "Project Update Successful!";
     }
 }
开发者ID:AdamsChao,项目名称:netdb-localdev-proj,代码行数:13,代码来源:ProjectList.aspx.cs


示例19: grdIncidents_RowUpdated

 protected void grdIncidents_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         lblError.Text = "A database error has occurred. <br /><br />" +
                         "Message: " + e.Exception.Message;
         e.ExceptionHandled = true;
         e.KeepInEditMode = true;
     }
     else if (e.AffectedRows == 0)
     {
         lblError.Text = "Another user may have updated that incident.<br /> Please try again.";
     }
 }
开发者ID:anneilb,项目名称:ce-dev,代码行数:14,代码来源:IncidentUpdate.aspx.cs


示例20: GridView1_RowUpdated

 //handle exceptions for the row update event
 protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         lblError.Text = "A database error has occurred. <br /><br />" + e.Exception.Message;
         if (e.Exception.InnerException != null)
             lblError.Text += "<br /> Message: " + e.Exception.InnerException.Message;
         e.ExceptionHandled = true;
         e.KeepInEditMode = true;
     }
     else if (e.AffectedRows == 0)
     {
         lblError.Text = "Another user may have updated that repair, please try again.";
     }
 }
开发者ID:whitneyhaddow,项目名称:ASP.NET_Appliance_Repairs,代码行数:16,代码来源:Default.aspx.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# GridVirtual类代码示例发布时间:2022-05-24
下一篇:
C# GridViewUpdateEventArgs类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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