當前位置: 首頁>>代碼示例>>C#>>正文


C# WebControls.DetailsViewInsertedEventArgs類代碼示例

本文整理匯總了C#中System.Web.UI.WebControls.DetailsViewInsertedEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# DetailsViewInsertedEventArgs類的具體用法?C# DetailsViewInsertedEventArgs怎麽用?C# DetailsViewInsertedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DetailsViewInsertedEventArgs類屬於System.Web.UI.WebControls命名空間,在下文中一共展示了DetailsViewInsertedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的System.Web.UI.WebControls.DetailsViewInsertedEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。