FormDesignAdd.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- public partial class WorkFlow_FormDesignAdd : System.Web.UI.Page
- {
- //模板
- Model.FlowBaseFormContent MR = new Model.FlowBaseFormContent();
- //业务
- BLL.FlowBaseFormContent BR = new BLL.FlowBaseFormContent();
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "WorkFlow_FormDesignAdd");
- if (!IsPostBack)
- {
- DropLoadSet();
- }
- }
- public void DropLoadSet()
- {
- //部门
- DropDownList1.DataTextField = "FLMC";
- DropDownList1.DataValueField = "ID";
- DropDownList1.DataSource = EnumGet.FlowBaseTypeGetEnum();
- DropDownList1.DataBind();
- DropDownList1.SelectedIndex = DropDownList1.Items.Count - 1;
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- try
- {
- if (TextBox1.Text == "")
- {
- throw new Exception("表单名不能为空!");
- }
- MR.BDMC = TextBox1.Text;
- MR.LCLX =int.Parse(DropDownList1.SelectedValue);
- MR.BDNR = "";
- BR.Add(MR);
- MessageBox.Show("添加成功", "FormDesignManager.aspx");
- TextBox1.Text = "";
- }
- catch (Exception exp)
- {
- MessageBox.Show(exp.Message);
- }
- }
- }