コード例 #1
0
 protected void attractionsForm_ItemInserted(object sender, FormViewInsertedEventArgs e)
 {
     
     {
         Response.Redirect("~/WebForms");
     }
 }
コード例 #2
0
 protected void contactInsert(object sender, FormViewInsertedEventArgs e)
 {
     if (e.AffectedRows == 1)
     {
         Response.Redirect("index.aspx");
     }
 }
コード例 #3
0
        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();
            //}

        }
コード例 #4
0
 protected void formView_ItemInserted(object sender, FormViewInsertedEventArgs e)
 {
     if (e.Exception == null)
     {
         Response.Redirect(string.Format("~/UI/ShipperDetailForm.aspx?id={0}", _lazyItem.Reference.ShipperID));
     }
 }
コード例 #5
0
 protected void FormViewTipoCampi_ItemInserted(object sender, FormViewInsertedEventArgs e)
 {
     if (e.Exception == null)
         Response.Redirect(lblPreviousPage.Text);
     else
         lblError.Text = e.Exception.Message;
 }
コード例 #6
0
ファイル: Insert.aspx.cs プロジェクト: anurse/ReviewR
 protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
 {
     if (e.Exception == null || e.ExceptionHandled)
     {
         Response.Redirect(table.ListActionPath);
     }
 }
コード例 #7
0
        protected void FormViewTipo_ItemInserted(object sender, FormViewInsertedEventArgs e)
        {

            string sIDFormTipo = ReturnMaxValueTable("FormTipo", "IDFormTipo", new SqlConnection(SqlDataSourceGat2.ConnectionString)).ToString();
            Response.Redirect("~/RefertiConfiguration.aspx?IDFormTipo=" + sIDFormTipo);
           
         
        }
コード例 #8
0
ファイル: Gerir.aspx.cs プロジェクト: Phate339/eng.soft.2
        protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
        {


            GridView1.DataBind();

            btneditar.Visible = false;
            btneliminar.Visible = false;
        }
コード例 #9
0
        protected void regInsert(object sender, FormViewInsertedEventArgs e)
        {
            if (e.AffectedRows == 1)
            {
                   Session["user"] = e.Values["name"];

                 Response.Redirect("index.aspx");
            }
        }
コード例 #10
0
        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 =
                }
            }
        }
コード例 #11
0
ファイル: Category.aspx.cs プロジェクト: digidol/sem5640
 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");
     }
 }
コード例 #12
0
 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;
     }
 }
コード例 #13
0
ファイル: Insert.aspx.cs プロジェクト: jorik041/X.DynamicData
 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;
     }
 }
コード例 #14
0
 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();
     }
 }
コード例 #15
0
		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;
            }
        }
コード例 #16
0
ファイル: Insert.aspx.cs プロジェクト: weavver/weavver
 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());
        //}
 }
コード例 #17
0
ファイル: WebForm1.aspx.cs プロジェクト: rustd/ASPNET45-VS11
 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
            {

            }
        }
コード例 #19
0
			public void DoOnItemInserted (FormViewInsertedEventArgs e)
			{
				OnItemInserted (e); 
			}
コード例 #20
0
		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;
			}
		}
コード例 #21
0
		private void fv_ItemInserted (object sender, FormViewInsertedEventArgs e)
		{
			itemInserted = true;
		}
コード例 #22
0
 protected void FVProgetto_ItemInserted(Object sender, System.Web.UI.WebControls.FormViewInsertedEventArgs e)
 {
     Response.Redirect("projects_lookup_list.aspx");
 }
コード例 #23
0
ファイル: WebForm1.aspx.cs プロジェクト: hebert-nr/KingsCourt
 //item is inserted into table actively
 protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
 {
     GridView1.DataBind();
 }
コード例 #24
0
 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();
 }
コード例 #25
0
 protected virtual new void OnItemInserted(FormViewInsertedEventArgs e)
 {
 }
コード例 #26
0
 protected void frmViewPersonale_ItemInserted(object sender, FormViewInsertedEventArgs e)
 {
     frmViewPersonale.Visible = false;
 }
コード例 #27
0
 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();
 }
コード例 #28
0
 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();
 }
コード例 #29
0
 protected void FormView2_ItemInserted(object sender, FormViewInsertedEventArgs e)
 {
     FormView3.DataBind();
 }
コード例 #30
0
ファイル: LotCardAdd.aspx.cs プロジェクト: yangdan8/ydERPTY
 protected void fvEngLotCardAdd_ItemInserted(object sender, FormViewInsertedEventArgs e)
 {
     //待跳转到的url地址
     string strUrl = "./LotCardAdd.aspx?oper=add";
     //直接跳转
     Response.Redirect(strUrl);
     //停止加载后续内容
     Response.End();
 }
コード例 #31
0
 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();
 }
コード例 #32
0
 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();
 }
コード例 #33
0
ファイル: ScrapCodeAdd.aspx.cs プロジェクト: yangdan8/ydERPTY
 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();
 }
コード例 #34
0
 protected void FormView1_ItemInserted(object sender, System.Web.UI.WebControls.FormViewInsertedEventArgs e)
 {
     //新增後,切換為瀏覽模式
     ChangeViewMode();
 }