当前位置: 首页>>代码示例>>C#>>正文


C# GridViewUpdatedEventArgs类代码示例

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


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


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