当前位置: 首页>>代码示例>>C#>>正文


C# WebControls.FormViewUpdateEventArgs类代码示例

本文整理汇总了C#中System.Web.UI.WebControls.FormViewUpdateEventArgs的典型用法代码示例。如果您正苦于以下问题:C# FormViewUpdateEventArgs类的具体用法?C# FormViewUpdateEventArgs怎么用?C# FormViewUpdateEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FormViewUpdateEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了FormViewUpdateEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FormView1_ItemUpdating

        protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e)
        {
            e.NewValues["logtime"] = DateTime.Now.ToString();

            e.NewValues["clerkid"] = Convert.ToInt32(Session["UserId"]);
            e.NewValues["repairsheetid"] = Convert.ToInt32(e.OldValues["repairsheetid"]);
        }
开发者ID:CSSource,项目名称:WebServiceSystem,代码行数:7,代码来源:SheetLog.aspx.cs

示例2: fv_ItemUpdating

        protected void fv_ItemUpdating(object sender, FormViewUpdateEventArgs e)
        {
            if (this.fv.CurrentMode == FormViewMode.Edit)
            {
                var employeesListControl = this.fv.FindControl("employeesList") as CheckBoxList;

                if (employeesListControl != null)
                {
                    var ctx = new PubsEntities();
                    var jobID = Convert.ToInt16(this.fv.DataKey["job_id"]);
                    var currentJob = ctx.jobs.First(x => x.job_id == jobID);

                    foreach (var item in employeesListControl.Items.OfType<ListItem>())
                    {
                        var employee = ctx.employees.First(x => x.emp_id == item.Value);

                        if (item.Selected)
                        {
                            employee.job_id = jobID;
                        }
                    }

                    ctx.SaveChanges();
                }
            }
        }
开发者ID:gabla5,项目名称:LearningProjects,代码行数:26,代码来源:WorkingWithTheFormViewControl.aspx.cs

示例3: FormView1_ItemUpdating

 protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e)
 {
     DropDownList title = (DropDownList)FormView1.FindControl("EditTitle");
       if (title != null)
       {
     e.NewValues.Add("TitleOfCourtesy", title.Text);
       }
 }
开发者ID:bq-wang,项目名称:aspnet,代码行数:8,代码来源:DetailsView_FormView_Form.aspx.cs

示例4: FormView1_ItemUpdating

        protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e)
        {
            int tariffId = int.Parse(((DropDownList)FormView1.FindControl("TariffIdDropDownList")).SelectedValue);
            e.NewValues.Add("TariffId", tariffId);

            TextBox balanceTextBox = ((TextBox)FormView1.FindControl("BalanceTextBox"));
            if (balanceTextBox.Text == "")
                e.NewValues["Balance"] = (decimal?)0;
        }
开发者ID:OldFreelance,项目名称:BillingSystem,代码行数:9,代码来源:EditUser.aspx.cs

示例5: frmCampoPlantilla_ItemUpdating

 protected void frmCampoPlantilla_ItemUpdating(object sender, FormViewUpdateEventArgs e)
 {
     if (e.NewValues["CMP_LONGITUD_CABECERA"].ToString() == string.Empty)
     {
         e.NewValues["CMP_LONGITUD_CABECERA"] = null;
     }
     if (e.NewValues["CMP_POSICION_RELATIVA"].ToString() == string.Empty)
     {
         e.NewValues["CMP_POSICION_RELATIVA"] = null;
     }
 }
开发者ID:jmptrader,项目名称:Switch-Transaccional,代码行数:11,代码来源:ModificarCampoPlantilla.aspx.cs

示例6: FormView1_ItemUpdating

        protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e)
        {
            XmlDocument xdoc = XmlDataSource1.GetXmlDocument();
            XmlElement feed = xdoc.SelectSingleNode("feed/link[@name='" + e.OldValues[0].ToString() + "'][@url='" + e.OldValues[1].ToString() + "']") as XmlElement;
            feed.Attributes["url"].Value = e.NewValues["url"].ToString();

            XmlDataSource1.Save();
            XmlDataSource1.DataBind();

            e.Cancel = true;
            FormView1.ChangeMode(FormViewMode.ReadOnly);
        }
开发者ID:bsilvr,项目名称:EDC2015-Trabalho4,代码行数:12,代码来源:manageFeed.aspx.cs

示例7: FormViewSheetInfo_ItemUpdating

        protected void FormViewSheetInfo_ItemUpdating(object sender, FormViewUpdateEventArgs e)
        {
            int state = Convert.ToInt32(e.NewValues["repairstateid"]);

            if (state >= 2 && state <= 4)
            { }
            else
            {
                Response.Write("<script language='javascript'>alert('没有权限修改此项内容!')</script>");
                //ClientScript.RegisterStartupScript(this.GetType(), "JS", "请阅读并勾选条款!");
                e.Cancel = true;
            }
        }
开发者ID:CSSource,项目名称:WebServiceSystem,代码行数:13,代码来源:SheetDetail.aspx.cs

示例8: PGFV_ItemUpdating

        /**
         * We are in "edit" mode, and the "Update" button was pressed
         * */
        protected void PGFV_ItemUpdating(Object sender, FormViewUpdateEventArgs e)
        {
            String id = ((TextBox)this.PGFV.FindControl("albumIdTextBox")).Text;
            String albumName = ((TextBox)this.PGFV.FindControl("albumNameTextBox")).Text;
            String albumDescription = ((TextBox)this.PGFV.FindControl("albumDescTextBox")).Text;

            //Update table
            controller.updateAlbum(Int32.Parse(id), albumName, albumDescription);

            //update the grid
            rebind(); //rebind the grid

            //Change the form view mode
            this.PGFV.ChangeMode(FormViewMode.ReadOnly);
            rebindForm(-1);
        }
开发者ID:jovinoribeiro,项目名称:EBFRW,代码行数:19,代码来源:PhotoGalleryEditor.aspx.cs

示例9: frmProtocolo_ItemUpdating

        protected void frmProtocolo_ItemUpdating(object sender, FormViewUpdateEventArgs e)
        {
            if (e.NewValues["PTR_PUERTO"].ToString() == string.Empty)
            {
                e.NewValues["PTR_PUERTO"] = null;
            }
            if (e.NewValues["PTR_TIMEOUT_REQUEST"].ToString() == string.Empty)
            {
                e.NewValues["PTR_TIMEOUT_REQUEST"] = null;
            }

            if (e.NewValues["PTR_TIMEOUT_RESPONSE"].ToString() == string.Empty)
            {
                e.NewValues["PTR_TIMEOUT_RESPONSE"] = null;
            }
        }
开发者ID:jmptrader,项目名称:Switch-Transaccional,代码行数:16,代码来源:ModificarProtocolo.aspx.cs

示例10: fvCompleteBackAdd_ItemUpdating

 protected void fvCompleteBackAdd_ItemUpdating(object sender, FormViewUpdateEventArgs e)
 {
     //取消请求执行自定义的方法
     e.Cancel = true;
     //检测是否含有session
     if (Session.Count < 5)
     {
         //跳转
         Response.Redirect("/Account/Login", true);
         //停止加载后续内容
         Response.End();
         //直接返回
         return;
     }
     //当前用户所在部门
     string procName = Session["proc_name"].ToString();
     //当前角色id
     Int16 roleId = Convert.ToInt16(Session["role_id"]);
     //检测是否有权限
     if (procName != mustProcName || roleId < 0 || roleId > 4)
     {
         throw new Exception("您没有修改记录权限!");
     }
     //用户输入不合法不执行添加操作
     if (!CheckUserInput())
     {
         return;
     }
     //设置录入员姓名和时间
     e.NewValues["add_person"] = Session["user_name"].ToString();
     e.NewValues["last_change_time"] = DateTime.Now;
     //当前单号
     string billNum = Convert.ToString(e.Keys[0]);
     //根据参数执行更新数据
     if (UpdateData(e))
     {
         //调用过程执行跳转
         JumpToUrlByBillNum(billNum);
     }
 }
开发者ID:yangdan8,项目名称:ydERPGJ,代码行数:40,代码来源:CompleteBackAdd.aspx.cs

示例11: DoOnItemUpdating

			public void DoOnItemUpdating (FormViewUpdateEventArgs e)
			{
				OnItemUpdating (e); 
			}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:4,代码来源:FormViewTest.cs

示例12: fv_ItemUpdating

		private void fv_ItemUpdating (object sender, FormViewUpdateEventArgs e)
		{
			itemUpdating = true;
		}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:4,代码来源:FormViewTest.cs

示例13: fvProductNoticeAdd_ItemUpdating

 protected void fvProductNoticeAdd_ItemUpdating(object sender, FormViewUpdateEventArgs e)
 {
     //默认取消请求
     e.Cancel = true;
     //检测是否含有session
     if (Session.Count < 5)
     {
         //跳转
         Response.Redirect("/Account/Login", true);
         //停止加载后续内容
         Response.End();
         //直接返回
         return;
     }
     //当前用户所在部门
     string procName = Session["proc_name"].ToString();
     //当前角色id
     Int16 roleId = Convert.ToInt16(Session["role_id"]);
     //检测是否有权限
     if (!(new string[] { "PMC", mustProcName }).Contains(procName) || roleId < 0 || roleId > 4)
     {
         throw new Exception("您没有修改记录权限!");
     }
     //检测是否需要保存表头
     if (canEditHeadRow)
     {
         //设置录入员姓名和时间
         e.NewValues["add_person"] = Session["user_name"].ToString();
         e.NewValues["last_change_time"] = DateTime.Now;
     }
     //当前单号
     var billNum = Convert.ToString(e.Keys[0]);
     //根据参数执行更新数据
     if (UpdateData(e))
     {
         //调用过程执行跳转
         JumpToUrlByBillNum(billNum);
     }
 }
开发者ID:yangdan8,项目名称:ydERPGJ,代码行数:39,代码来源:ProductNoticeAdd.aspx.cs

示例14: UpdateData

        /// <summary>
        /// 根据输入的参数保存到数据库
        /// </summary>
        /// <param name="e">传入的带有数据的事件参数</param>
        /// <returns></returns>
        private bool UpdateData(FormViewUpdateEventArgs e)
        {
            //数据适配器
            //当前添加语句对象
            //当前数据库连接
            using (var da = new t_proc_lot_card_balanceTableAdapter())
            using (var daChange = new t_proc_lot_card_balance_changeTableAdapter())
            using (var cmd = da.Adapter.InsertCommand)
            using (var conn = cmd.Connection)
            {
                //打开数据库连接
                conn.Open();
                //设置数据库连接
                da.Connection = daChange.Connection = cmd.Connection = conn;
                //开启事务
                using (var tran = conn.BeginTransaction())
                {
                    //设置事务
                    da.Transaction = daChange.Transaction = cmd.Transaction = tran;
                    //试运行
                    try
                    {
                        //执行保存数据
                        if (da.UpdateData(
                            e.NewValues["prev_proc_name"].ToString(),
                            e.NewValues["proc_name"].ToString(),
                            e.NewValues["lot_id"].ToString(),
                            e.NewValues["product_num"].ToString(),
                            Convert.ToInt32(e.NewValues["pnl_qty"]),
                            Convert.ToInt32(e.NewValues["pcs_qty"]),
                            e.NewValues["remark"] == null ? null : e.NewValues["remark"].ToString(),
                            e.NewValues["add_person"].ToString(),
                            Convert.ToDateTime(e.NewValues["add_time"]),
                            Convert.ToDateTime(e.NewValues["last_change_time"]),
                            e.NewValues["accept_person"] == null ? null : e.NewValues["accept_person"].ToString(),
                            e.NewValues["accept_time"] == null ? null : (DateTime?)e.NewValues["accept_time"],
                            Convert.ToBoolean(e.NewValues["is_complete_wenzi"]),
                            Convert.ToInt64(e.Keys[0])
                        ) <= 0)
                        {
                            //抛出错误
                            throw new Exception("修改部门批量卡结存发生错误!");
                        }
                        //取得一个相关guid
                        var guid = Guid.NewGuid().ToString();
                        //保存到修改记录表
                        if (daChange.InsertData(
                            e.OldValues["prev_proc_name"].ToString(),
                            e.OldValues["proc_name"].ToString(),
                            e.OldValues["lot_id"].ToString(),
                            e.OldValues["product_num"].ToString(),
                            Convert.ToInt32(e.OldValues["pnl_qty"]),
                            Convert.ToInt32(e.OldValues["pcs_qty"]),
                            e.OldValues["remark"] == null ? null : e.OldValues["remark"].ToString(),
                            e.OldValues["add_person"].ToString(),
                            e.OldValues["accept_person"] == null ? null : e.OldValues["accept_person"].ToString(),
                            e.OldValues["accept_time"] == null ? null : (DateTime?)e.OldValues["accept_time"],
                            Convert.ToBoolean(e.OldValues["is_complete_wenzi"]),
                            false,
                            guid
                        ) <= 0)
                        {
                            //抛出错误
                            throw new Exception("添加修改批量卡结存旧数据日志记录发生错误!");
                        }
                        //保存到修改记录表
                        if (daChange.InsertData(
                            e.NewValues["prev_proc_name"].ToString(),
                            e.NewValues["proc_name"].ToString(),
                            e.NewValues["lot_id"].ToString(),
                            e.NewValues["product_num"].ToString(),
                            Convert.ToInt32(e.NewValues["pnl_qty"]),
                            Convert.ToInt32(e.NewValues["pcs_qty"]),
                            e.NewValues["remark"] == null ? null : e.NewValues["remark"].ToString(),
                            e.NewValues["add_person"].ToString(),
                            e.NewValues["accept_person"] == null ? null : e.NewValues["accept_person"].ToString(),
                            e.NewValues["accept_time"] == null ? null : (DateTime?)e.NewValues["accept_time"],
                            Convert.ToBoolean(e.NewValues["is_complete_wenzi"]),
                            true,
                            guid
                        ) <= 0)
                        {
                            //抛出错误
                            throw new Exception("添加修改批量卡结存新数据日志记录发生错误!");
                        }

                        //提交事务
                        tran.Commit();
                        //返回成功
                        return true;
                    }
                    catch (Exception ex)
                    {
                        //回滚事务
                        tran.Rollback();
//.........这里部分代码省略.........
开发者ID:yangdan8,项目名称:ydERPGJ,代码行数:101,代码来源:ProcLotCardMgrAdd.aspx.cs

示例15: fvReport_ItemUpdating

        protected void fvReport_ItemUpdating(object sender, FormViewUpdateEventArgs e)
        {
            if (IsValid)
            {
                int id = Convert.ToInt32(((Label)fvReport.FindControl("lblRecordId")).Text);

                Tingle_WebForms.Models.MustIncludeForm myForm = ctx.MustIncludeForms.FirstOrDefault(eof => eof.RecordId == id);

                RadDropDownList ddlCompanyEdit = (RadDropDownList)fvReport.FindControl("ddlCompanyEdit");
                TextBox txtPO = (TextBox)fvReport.FindControl("txtPOEdit");
                TextBox txtArmstrongReference = (TextBox)fvReport.FindControl("txtArmstrongReferenceEdit");
                TextBox txtPattern = (TextBox)fvReport.FindControl("txtPatternEdit");
                TextBox txtLine = (TextBox)fvReport.FindControl("txtLineEdit");
                TextBox txtOrderNumber = (TextBox)fvReport.FindControl("txtOrderNumberEdit");
                TextBox txtCustomer = (TextBox)fvReport.FindControl("txtCustomerEdit");
                RadDropDownList ddlWarehouse = (RadDropDownList)fvReport.FindControl("ddlWarehouseEdit");
                HtmlInputText txtDueByDate = (HtmlInputText)fvReport.FindControl("txtDueByDateEdit");
                RadDropDownList ddlStatus = (RadDropDownList)fvReport.FindControl("ddlStatusEdit");
                int statusId = Convert.ToInt32(ddlStatus.SelectedValue);
                RadComboBox ddlRequestedByEdit = (RadComboBox)fvReport.FindControl("ddlRequestedByEdit");
                int requestedById = Convert.ToInt32(ddlRequestedByEdit.SelectedValue);
                RadComboBox ddlAssignedToEdit = (RadComboBox)fvReport.FindControl("ddlAssignedToEdit");
                int assignedToId = 0;
                if (ddlAssignedToEdit.SelectedIndex != -1)
                {
                    assignedToId = Convert.ToInt32(ddlAssignedToEdit.SelectedValue);
                }
                RadDropDownList ddlPriorityEdit = (RadDropDownList)fvReport.FindControl("ddlPriorityEdit");
                int priorityId = Convert.ToInt32(ddlPriorityEdit.SelectedValue);
                CheckBox cbSendComments = (CheckBox)fvReport.FindControl("cbSendComments");
                CheckBox cbShowSystemComments = (CheckBox)fvReport.FindControl("cbShowSystemComments");
                CheckBox cbNotifyStandard = (CheckBox)fvReport.FindControl("cbNotifyStandard");
                CheckBox cbNotifyAssignee = (CheckBox)fvReport.FindControl("cbNotifyAssignee");
                CheckBox cbNotifyOther = (CheckBox)fvReport.FindControl("cbNotifyOther");
                CheckBox cbNotifyRequester = (CheckBox)fvReport.FindControl("cbNotifyRequester");
                RadComboBox ddlNotifyOther = (RadComboBox)fvReport.FindControl("ddlNotifyOther");

                Label lblEmailsSentTo = (Label)fvReport.FindControl("lblEmailsSentTo");
                Label lblFVMessage = (Label)fvReport.FindControl("lblFVMessage");

                DateTime tryDateDue;
                Nullable<DateTime> dateDue = null;

                try
                {
                    if (myForm.RequestedUser.SystemUserID.ToString() != ddlRequestedByEdit.SelectedValue)
                    {
                        Comments newRequesterComment = new Comments
                        {
                            Form = ctx.TForms.FirstOrDefault(x => x.FormName == "Must Include"),
                            Note = "Requester Changed To: " + ctx.SystemUsers.FirstOrDefault(x => x.SystemUserID == requestedById).DisplayName,
                            RelatedFormId = myForm.RecordId,
                            SystemComment = true,
                            Timestamp = DateTime.Now
                        };

                        ctx.Comments.Add(newRequesterComment);
                    }

                    if (myForm.AssignedUser == null && ddlAssignedToEdit.SelectedIndex != -1) // (myForm.AssignedUser != null && ddlAssignedToEdit.SelectedIndex != -1 && Convert.ToString(myForm.AssignedUser.SystemUserID) != ddlAssignedToEdit.SelectedValue))
                    {
                        Comments newAssignedComment = new Comments
                        {
                            Form = ctx.TForms.FirstOrDefault(x => x.FormName == "Must Include"),
                            Note = "Request Assigned To: " + ctx.SystemUsers.FirstOrDefault(x => x.SystemUserID == assignedToId).DisplayName,
                            RelatedFormId = myForm.RecordId,
                            SystemComment = true,
                            Timestamp = DateTime.Now
                        };

                        ctx.Comments.Add(newAssignedComment);
                    }
                    else if (myForm.AssignedUser != null && ddlAssignedToEdit.SelectedIndex != -1)
                    {
                        if (myForm.AssignedUser.SystemUserID.ToString() != ddlAssignedToEdit.SelectedValue)
                        {
                            Comments newAssignedComment = new Comments
                            {
                                Form = ctx.TForms.FirstOrDefault(x => x.FormName == "Must Include"),
                                Note = "Request Assignee Changed To: " + ctx.SystemUsers.FirstOrDefault(x => x.SystemUserID == assignedToId).DisplayName,
                                RelatedFormId = myForm.RecordId,
                                SystemComment = true,
                                Timestamp = DateTime.Now
                            };

                            ctx.Comments.Add(newAssignedComment);
                        }
                    }
                    else if (myForm.AssignedUser != null && ddlAssignedToEdit.SelectedIndex == -1)
                    {
                        Comments newAssignedComment = new Comments
                        {
                            Form = ctx.TForms.FirstOrDefault(x => x.FormName == "Must Include"),
                            Note = "Request Assignment Removed From: " + ctx.SystemUsers.FirstOrDefault(x => x.SystemUserID == myForm.AssignedUser.SystemUserID).DisplayName,
                            RelatedFormId = myForm.RecordId,
                            SystemComment = true,
                            Timestamp = DateTime.Now
                        };

                        ctx.Comments.Add(newAssignedComment);
//.........这里部分代码省略.........
开发者ID:WCTingle,项目名称:InfoShare_Public,代码行数:101,代码来源:ReportMustInclude.aspx.cs


注:本文中的System.Web.UI.WebControls.FormViewUpdateEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。