本文整理汇总了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;
}
}
示例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>");
}
示例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;
}
}
示例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();
}
}
示例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;
}
}
示例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();
}
}
示例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;
}
}
示例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();
}
示例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;
}
}
示例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);
}
}
示例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);
}
}
示例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;
}
}
示例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();
}
}
示例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;
}
示例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;
}
}