protected void attractionsForm_ItemInserted(object sender, FormViewInsertedEventArgs e) { { Response.Redirect("~/WebForms"); } }
protected void contactInsert(object sender, FormViewInsertedEventArgs e) { if (e.AffectedRows == 1) { Response.Redirect("index.aspx"); } }
protected void uxFormView_ItemInserted(object sender, FormViewInsertedEventArgs e) { ////get user id //MembershipUser usr = Membership.GetUser(); //Guid uid = (Guid)usr.ProviderUserKey; ////setup database connection //SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["DB_MYCHURCH"].ConnectionString); ////setup a way to talk to the database //SqlCommand command = new SqlCommand(); //command.Connection = connection; //try //{ // command.Connection.Open(); // command.CommandType = CommandType.StoredProcedure; // command.CommandText = "ChurchWorkers_Insert"; // command.Parameters.Add(new SqlParameter("@UserId", uid)); // command.ExecuteNonQuery(); //} //catch //{ //} //finally //{ // command.Connection.Close(); //} }
protected void formView_ItemInserted(object sender, FormViewInsertedEventArgs e) { if (e.Exception == null) { Response.Redirect(string.Format("~/UI/ShipperDetailForm.aspx?id={0}", _lazyItem.Reference.ShipperID)); } }
protected void FormViewTipoCampi_ItemInserted(object sender, FormViewInsertedEventArgs e) { if (e.Exception == null) Response.Redirect(lblPreviousPage.Text); else lblError.Text = e.Exception.Message; }
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e) { if (e.Exception == null || e.ExceptionHandled) { Response.Redirect(table.ListActionPath); } }
protected void FormViewTipo_ItemInserted(object sender, FormViewInsertedEventArgs e) { string sIDFormTipo = ReturnMaxValueTable("FormTipo", "IDFormTipo", new SqlConnection(SqlDataSourceGat2.ConnectionString)).ToString(); Response.Redirect("~/RefertiConfiguration.aspx?IDFormTipo=" + sIDFormTipo); }
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e) { GridView1.DataBind(); btneditar.Visible = false; btneliminar.Visible = false; }
protected void regInsert(object sender, FormViewInsertedEventArgs e) { if (e.AffectedRows == 1) { Session["user"] = e.Values["name"]; Response.Redirect("index.aspx"); } }
protected void FormView2_ItemInserted1(object sender, FormViewInsertedEventArgs e) { FormView3.DataBind(); using (FinanceManagerDataContext db = new FinanceManagerDataContext()) { Member _member = db.Members.FirstOrDefault(m => m.MemberId == Convert.ToInt32(Request.QueryString["mid"])); //int investmentTypeID = ( db.Investments.FirstOrDefault(i => i.InvestmentID == Convert.ToInt32( Request.QueryString["InvId"])).InvestmentTypeId.Value); //AccountType accType = db.AccountTypes.FirstOrDefault(a => a.DefaultInvestmentTypeID == investmentTypeID); //withdrawal List<AccountTypeFeature> aFeatures = _member.AccountType.AccountTypeFeatures.Where(a => a.CalculateOn == 2).ToList(); foreach (AccountTypeFeature item in aFeatures) { decimal valueToApply = 0; if (item.IsPercentage.Value) { valueToApply = item.ValueToApply.Value / 100 * Convert.ToDecimal(Session["WithdrawnAmount"]); } else { valueToApply = item.ValueToApply.Value; } if (item.IsDeduction.Value) //is deduction { AppliedDeduction aDeduction = new AppliedDeduction(); aDeduction.CreatedBy = User.Identity.Name; aDeduction.CreatedDate = DateTime.Now; aDeduction.DeductionAmount = valueToApply; aDeduction.InvestmentID = Convert.ToInt32(Request.QueryString["InvId"]); //aDeduction.IsDeleted = false; aDeduction.Rate = item.ValueToApply; db.AppliedDeductions.InsertOnSubmit(aDeduction); } else //is addition { AppliedInterest aInterest = new AppliedInterest(); aInterest.CreatedBy = User.Identity.Name; aInterest.CreatedDate = DateTime.Now; aInterest.InterestAmount = valueToApply; aInterest.InvestmentID = Convert.ToInt32(Request.QueryString["InvId"]); //aDeduction.IsDeleted = false; aInterest.Rate = item.ValueToApply; db.AppliedInterests.InsertOnSubmit(aInterest); } db.SubmitChanges(); ////AppliedAccountFeature aAccountFeature = new AppliedAccountFeature(); ////aAccountFeature.InvestmentID = Convert.ToInt32(Request.QueryString["InvId"]); ////aAccountFeature.AccountNumber = } } }
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e) { if(e.Exception != null) { System.Diagnostics.Debug.WriteLine("Need to handle the error."); e.ExceptionHandled = true; } else { System.Diagnostics.Debug.WriteLine("That was fine"); } }
protected void FormViewAssistenza_ItemInserted(object sender, FormViewInsertedEventArgs e) { if (e.Exception == null) { if (GestioneCaricamentoCalendario()) Response.Redirect("~/Assistenze/AssistenzaListGroupSingolaZona.aspx"); } else { lblError.Text = e.Exception.Message; } }
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e) { if (e.Exception == null || e.ExceptionHandled) { Response.Redirect(_table.ListActionPath); } else { ShowMessage(e.Exception); e.ExceptionHandled = true; } }
protected void fvSelectedStaff_ItemInserted(object sender, System.Web.UI.WebControls.FormViewInsertedEventArgs e) { this.lblError.Text = ""; if (e.Exception != null) { this.lblError.Text = "A database error has occurred.<br /<br />" + e.Exception.Message; e.ExceptionHandled = true; } else { ddlSupport.DataBind(); } }
protected void OnItemInserted(object sender, FormViewInsertedEventArgs e) { if (e.Exception == null) { Utilities.WriteWindowClose(); } else { Utilities.OnError(Page, false, e.Exception); e.KeepInInsertMode = true; e.ExceptionHandled = true; } }
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e) { //if (e.Exception == null || e.ExceptionHandled) //{ // e.Values // //Response.Write("Linking to: " + Request["linkto"]); // Response.Redirect(table.GetActionPath("Details", DataItem)); // //Response.Redirect("Details.aspx?id=asdf"); //} //else //{ // ShowError(e.Exception.ToString()); //} }
protected void InsertPostForm_ItemInserted(object sender, FormViewInsertedEventArgs e) { if (e.Exception != null) { if (e.Exception.InnerException.GetType() == typeof(ApplicationException)) { e.ExceptionHandled = true; e.KeepInInsertMode = true; errormessage.Text = e.Exception.InnerException.Message; } } else { Response.Redirect("~/"); } }
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e) { try { if (e.Exception != null) { e.ExceptionHandled = true; Response.Write("<script LANGUAGE='JavaScript' >alert('Error: Usuario Duplicado')</script>"); } } catch { } }
public void DoOnItemInserted (FormViewInsertedEventArgs e) { OnItemInserted (e); }
static void d_ItemInserted (object sender, FormViewInsertedEventArgs e) { if (WebTest.CurrentTest.UserData == null) { ArrayList list = new ArrayList (); list.Add ("ItemInserted"); WebTest.CurrentTest.UserData = list; } else { ArrayList list = WebTest.CurrentTest.UserData as ArrayList; if (list == null) throw new NullReferenceException (); list.Add ("ItemInserted"); WebTest.CurrentTest.UserData = list; } }
private void fv_ItemInserted (object sender, FormViewInsertedEventArgs e) { itemInserted = true; }
protected void FVProgetto_ItemInserted(Object sender, System.Web.UI.WebControls.FormViewInsertedEventArgs e) { Response.Redirect("projects_lookup_list.aspx"); }
//item is inserted into table actively protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e) { GridView1.DataBind(); }
protected void fvProductRecordAdd_ItemInserted(object sender, FormViewInsertedEventArgs e) { //待跳转到的url地址 string strUrl = "./ProductRecordAdd.aspx?oper=add"; //当前日期文本框 var tb = (TextBox)fvProductRecordAdd.FindControl("txtProductDate"); if (tb != null) { //修改url地址 strUrl += "&pdate=" + tb.Text; } //当前下部门文本框 tb = (TextBox)fvProductRecordAdd.FindControl("txtNextProc"); if (tb != null) { //修改url地址 strUrl += "&nproc=" + tb.Text; } //直接跳转 Response.Redirect(strUrl); //停止加载后续内容 Response.End(); }
protected virtual new void OnItemInserted(FormViewInsertedEventArgs e) { }
protected void frmViewPersonale_ItemInserted(object sender, FormViewInsertedEventArgs e) { frmViewPersonale.Visible = false; }
protected void fvSampleLotCardMgrAdd_ItemInserted(object sender, FormViewInsertedEventArgs e) { //待跳转到的url地址 string strUrl = "./SampleLotCardMgrAdd.aspx?oper=add"; //当前编号首部门 var tb = (TextBox)fvSampleLotCardMgrAdd.FindControl("txtFirstDeptName"); if (tb != null) { //修改url地址 strUrl += "&fdept=" + tb.Text; } //直接跳转 Response.Redirect(strUrl); //停止加载后续内容 Response.End(); }
protected void fvMaterialSupplierAdd_ItemInserted(object sender, FormViewInsertedEventArgs e) { //待跳转到的url地址 string strUrl = "./MaterialSupplierAdd.aspx?oper=add"; //当前供应商代码文本框 var tb = (TextBox)fvMaterialSupplierAdd.FindControl("txtSupplierCode"); if (tb != null) { //修改url地址 strUrl += "&code=" + tb.Text; } //直接跳转 Response.Redirect(strUrl); //停止加载后续内容 Response.End(); }
protected void FormView2_ItemInserted(object sender, FormViewInsertedEventArgs e) { FormView3.DataBind(); }
protected void fvEngLotCardAdd_ItemInserted(object sender, FormViewInsertedEventArgs e) { //待跳转到的url地址 string strUrl = "./LotCardAdd.aspx?oper=add"; //直接跳转 Response.Redirect(strUrl); //停止加载后续内容 Response.End(); }
protected void fvCompleteBackAdd_ItemInserted(object sender, FormViewInsertedEventArgs e) { //待跳转到的url地址 string strUrl = "./CompleteBackAdd.aspx?oper=add"; //当前日期文本框 var tb = (TextBox)fvCompleteBackAdd.FindControl("txtBillDate"); if (tb != null) { //修改url地址 strUrl += "&bdate=" + tb.Text; } //当前单号文本框 tb = (TextBox)fvCompleteBackAdd.FindControl("txtBillNum"); if (tb != null) { //修改url地址 strUrl += "&bnum=" + tb.Text; } //直接跳转 Response.Redirect(strUrl); //停止加载后续内容 Response.End(); }
protected void fvProcLotCardMgrAdd_ItemInserted(object sender, FormViewInsertedEventArgs e) { //待跳转到的url地址 string strUrl = "./ProcLotCardMgrAdd.aspx?oper=add"; //上部门 var tb = (TextBox)fvProcLotCardMgrAdd.FindControl("txtPrevProcName"); if (tb != null) { //修改url地址 strUrl += "&pproc=" + tb.Text; } //当前部门 tb = (TextBox)fvProcLotCardMgrAdd.FindControl("txtProcName"); if (tb != null) { //修改url地址 strUrl += "&proc=" + tb.Text; } //直接跳转 Response.Redirect(strUrl); //停止加载后续内容 Response.End(); }
protected void fvScrapCodeAdd_ItemInserted(object sender, FormViewInsertedEventArgs e) { //待跳转到的url地址 string strUrl = "./ScrapCodeAdd.aspx?oper=add"; //当前MRB代码文本框 var tb = (TextBox)fvScrapCodeAdd.FindControl("txtScrapCode"); if (tb != null) { //修改url地址 strUrl += "&scode=" + tb.Text; } //当前部门文本框 tb = (TextBox)fvScrapCodeAdd.FindControl("txtScrapDeptName"); if (tb != null) { //修改url地址 strUrl += "&dept=" + tb.Text; } //直接跳转 Response.Redirect(strUrl); //停止加载后续内容 Response.End(); }
protected void FormView1_ItemInserted(object sender, System.Web.UI.WebControls.FormViewInsertedEventArgs e) { //新增後,切換為瀏覽模式 ChangeViewMode(); }