本文整理汇总了C#中System.Web.UI.WebControls.DetailsViewInsertedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DetailsViewInsertedEventArgs类的具体用法?C# DetailsViewInsertedEventArgs怎么用?C# DetailsViewInsertedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DetailsViewInsertedEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了DetailsViewInsertedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ExamDetailsView_ItemInserted
protected void ExamDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
if (e.Exception == null)
{
ShowMessageBox("Exam is successfully created");
}
}
开发者ID:kaiss78,项目名称:olems,代码行数:7,代码来源:ExamManagement.aspx.cs
示例2: AccountDetailsView_ItemInserted
protected void AccountDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
long accountId = Convert.ToInt64(Session["AccountID"]);
if (e.Exception != null)
{
var customValidator = new CustomValidator();
customValidator.IsValid = false;
customValidator.ErrorMessage = "Insert failed: " + e.Exception.InnerException.Message;
customValidator.ValidationGroup = "avs";
Page.Validators.Add(customValidator);
e.ExceptionHandled = true;
}
else
{
if (accountId > 0)
{
AccountGridView.DataBind();
string accountName = e.Values["Name"].ToString();
TextBox AccountName = OpportunityDetailsView.FindControl("AccountNameTextBox") as TextBox;
AccountName.Text = accountName;
AccountList.Update();
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script",
"CloseModals(['BodyContent_ModalPanel1','BodyContent_ModalPanel291']);",
true);
}
}
}
开发者ID:jasimuddin534,项目名称:jasim_basis,代码行数:28,代码来源:Opportunities.aspx.cs
示例3: DataValidation
protected String DataValidation(DetailsViewInsertedEventArgs e)
{
//if (e.Values["UnitPrice"].ToString() == "4")
decimal testfield = 0m;
if (!(Decimal.TryParse(e.Values["UnitPrice"].ToString(), out testfield)))
{
lblError.ForeColor = System.Drawing.Color.Red;
lblError.Text = "Unit Price must be numeric ";
}
if (!(Decimal.TryParse(e.Values["OnHand"].ToString(), out testfield)))
{
lblError.ForeColor = System.Drawing.Color.Red;
lblError.Text = "Inventory On Hand must be numeric ";
}
int number;
if (!(Int32.TryParse(e.Values["OnHand"].ToString(), out number)))
{
lblError.ForeColor = System.Drawing.Color.Red;
lblError.Text = "On Hand field must be an Integer ";
}
return lblError.Text;
}
开发者ID:mj9119,项目名称:GridDetailsView,代码行数:25,代码来源:GridAndDetailsView.aspx.cs
示例4: DetailsView1_ItemInserted
protected void DetailsView1_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
((TextBox)DetailsView1.Rows[0].Cells[1].FindControl("TextBox1")).Text="";
((TextBox)DetailsView1.Rows[1].Cells[1].FindControl("TextBox2")).Text="";
((TextBox)DetailsView1.Rows[3].Cells[1].FindControl("TextBox3")).Text="";
Response.Redirect("NewModule.aspx");
}
开发者ID:prasadmaduranga,项目名称:Performance-Analyzer,代码行数:7,代码来源:NewModule.aspx.cs
示例5: DetailsView2_ItemInserted
protected void DetailsView2_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
GridView2.Visible = true;
this.setGriview2(GridView1.SelectedValue.ToString());
DetailsView2.DataBind();
UpdatePanel3.Update();
}
开发者ID:prasadmaduranga,项目名称:Performance-Analyzer,代码行数:7,代码来源:CourseView.aspx.cs
示例6: DetailsView1_ItemInserted
protected void DetailsView1_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
if (e.Exception == null || e.ExceptionHandled)
{
Response.Redirect(table.ListActionPath);
}
}
开发者ID:overeemm,项目名称:yawamt,代码行数:7,代码来源:Insert.aspx.cs
示例7: InvoiceDetailsView_ItemInserted
//after inserting new invoice
protected void InvoiceDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
if (e.Exception != null)
{
var customValidator = new CustomValidator();
customValidator.IsValid = false;
customValidator.ErrorMessage = "Save failed: " + e.Exception.InnerException.Message;
customValidator.ValidationGroup = "sum";
Page.Validators.Add(customValidator);
e.ExceptionHandled = true;
}
else
{
int rowcount = e.AffectedRows;
if (rowcount == -1)
{
string name = e.Values["Name"].ToString();
MsgLiteral.Text = "Success";
alertLabel.Text = "Invoice of " + name + " has been saved";
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", "ShowAlertModal();", true);
//update the order(converted to true) thats invoice has been created..
long orderID = Convert.ToInt64(Session["OrderID"]);
orderBL.UpdateConvertOrder(orderID);
}
}
//ShowAlertModal();
MiniInvoiceFormView.DataBind();
MiniInvoiceDetailsView.DataBind();
InvoiceGridView.DataBind();
MiniInvoiceUpdatePanel.Update();
Session["EditInvoiceID"] = 0;
Session["EditOrderID"] = 0;
InvoiceDetailsView.DataBind();
}
开发者ID:jasimuddin534,项目名称:jasim_basis,代码行数:36,代码来源:Invoices.aspx.cs
示例8: AccountDetailsView_ItemInserted
protected void AccountDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
AccountGridView.DataBind();
string accountName = e.Values["Name"].ToString();
TextBox AccountName = ContactDetailsView.FindControl("AccountNameTextBox") as TextBox;
AccountName.Text = accountName;
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", "CloseModals(['BodyContent_AccountListModalPanel','BodyContent_CreateAccountModalPanel']);", true);
}
开发者ID:jasimuddin534,项目名称:jasim_basis,代码行数:8,代码来源:Contacts.aspx.cs
示例9: DetailsViewModifica_ItemInserted
protected void DetailsViewModifica_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
if (e.Exception != null)
{
LabelErrorMessage.Text = e.Exception.Message;
}
GridViewMarca.DataBind();
}
开发者ID:PaoloMisson,项目名称:GATEvolution,代码行数:9,代码来源:GestioneMarcaStrumenti.aspx.cs
示例10: ChoicesDetailsView_ItemInserted
protected void ChoicesDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
//seçilen şıkkın tersini truth value false olacak şekilde tabloya yazarız
String questionID = Request.QueryString["questionID"].ToString();
String body = (String) Session["TFChoice"].ToString();
if (body == "True") body = "False";
else body = "True";
ChoicesSqlDataSource.InsertCommand = "INSERT INTO [Choice](questionId,body,truthValue) VALUES ('" + questionID + "','" + body + "','False')";
ChoicesSqlDataSource.Insert();
}
开发者ID:kaiss78,项目名称:olems,代码行数:10,代码来源:AnswersetManagement_TF.aspx.cs
示例11: DetailsViewEditItem_ItemInserted
protected void DetailsViewEditItem_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
if (e.Exception == null)
{
}
else
{
ShowError(e.Exception);
e.ExceptionHandled = true;
}
}
开发者ID:trifonov-mikhail,项目名称:Site1,代码行数:12,代码来源:PageHtmlEditor.ascx.cs
示例12: SectionDetailsView_ItemInserted
protected void SectionDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
if (e.Exception != null)
{
e.ExceptionHandled = true;
ShowMessageBox("Existing Section");
}
else // if (e.Exception == null)
{
ShowMessageBox("Section successfully created");
}
}
开发者ID:kaiss78,项目名称:olems,代码行数:12,代码来源:SectionManagement.aspx.cs
示例13: DetailsView1_ItemInserted
protected void DetailsView1_ItemInserted(
object sender, DetailsViewInsertedEventArgs 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;
}
}
开发者ID:cweber-wou,项目名称:capstone,代码行数:13,代码来源:insSelectCourseAddAssignment.aspx.cs
示例14: ExaminationDetailsView_ItemInserted
protected void ExaminationDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
if (e.Exception != null)
{
e.ExceptionHandled = true;
ShowMessageBox("Could not schedule exam");
}
else // if (e.Exception == null)
{
SendMailNotification();
ShowMessageBox("Exam is successfully scheduled for the section");
}
}
开发者ID:kaiss78,项目名称:olems,代码行数:13,代码来源:ScheduleExamForSection.aspx.cs
示例15: ItemDetails_ItemInserted
void ItemDetails_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
if (e.Exception == null)
{
ItemsList.DataBind();
}
else
{
ShowError(e.Exception);
e.ExceptionHandled = HandleErrors;
e.KeepInInsertMode = true;
}
}
开发者ID:trifonov-mikhail,项目名称:Site1,代码行数:14,代码来源:EditorBase.cs
示例16: DetailsView1_ItemInserted1
public void DetailsView1_ItemInserted1(object sender, DetailsViewInsertedEventArgs 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;
}
lblStatus.Visible = true;
lblStatus.Text = "You Have secussfully added the Course";
Response.Redirect("~/Default.aspx");
}
开发者ID:cweber-wou,项目名称:capstone,代码行数:16,代码来源:Course_Mngr.aspx.cs
示例17: BankAccountDetailsView_ItemInserted
protected void BankAccountDetailsView_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
UserBL userBL = new UserBL();
int bankaccountid = Convert.ToInt32(Session["NewBankID"]);
int bankid = userBL.CompanySetBankAccountID(bankaccountid);
string accountname = userBL.GetBankAccountName();
if (accountname != null)
{
TextBox pe = (TextBox)CompanyDetailsView.FindControl("BankAccountTextBox");
pe.Text = accountname;
}
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", "CloseModal('BodyContent_ModalPanel1');", true);
}
开发者ID:jasimuddin534,项目名称:jasim_basis,代码行数:17,代码来源:Company.aspx.cs
示例18: dvCustomerSelect_ItemInserted
protected void dvCustomerSelect_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
if (e.Exception != null)
{
lblDbError.Visible = true;
lblDbError.Text = "A database error occured. Message: " + e.Exception.Message;
e.ExceptionHandled = true;
e.KeepInInsertMode = true;
}
else if (e.AffectedRows == 0)
{
lblDbError.Visible = true;
lblDbError.Text = "Another user may have added this entry already";
}
else
grdCustomers.DataBind();
}
开发者ID:m-windle,项目名称:Customer-Product-Management,代码行数:17,代码来源:CustomersAdmin.aspx.cs
示例19: DetailsView1_ItemInserted
protected void DetailsView1_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
if (e.Exception != null)
{
lblError.Text = "A database error has occurred. " +
"Message: " + e.Exception.Message;
e.ExceptionHandled = true;
e.KeepInInsertMode = true;
lblError.Text = DataValidation(e);
}
else if (e.AffectedRows == 0)
lblError.Text = "Another user may have updated that product. " +
"Please try again. ";
else
{
lblError.Text = "New record was successfully added. ";
GridView1.DataBind();
}
}
开发者ID:mj9119,项目名称:GridDetailsView,代码行数:19,代码来源:GridAndDetailsView.aspx.cs
示例20: DetailsView2_ItemInserted
protected void DetailsView2_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
{
GridView2.DataSourceID = "LinqDataSource2";
GridView2.DataBind();
}
开发者ID:Chang3,项目名称:HelloWorld2,代码行数:5,代码来源:admin.aspx.cs
注:本文中的System.Web.UI.WebControls.DetailsViewInsertedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论