FormDesignAdd.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. public partial class WorkFlow_FormDesignAdd : System.Web.UI.Page
  12. {
  13.     //模板
  14.     Model.FlowBaseFormContent MR = new Model.FlowBaseFormContent();
  15.     //业务
  16.     BLL.FlowBaseFormContent BR = new BLL.FlowBaseFormContent();
  17.     protected void Page_Load(object sender, EventArgs e)
  18.     {
  19.         LoginLogic.MatchLoad("../", "WorkFlow_FormDesignAdd");
  20.         if (!IsPostBack)
  21.         {
  22.             DropLoadSet();
  23.         }
  24.     }
  25.     public void DropLoadSet()
  26.     {
  27.         //部门
  28.         DropDownList1.DataTextField = "FLMC";
  29.         DropDownList1.DataValueField = "ID";
  30.         DropDownList1.DataSource = EnumGet.FlowBaseTypeGetEnum();
  31.         DropDownList1.DataBind();
  32.         DropDownList1.SelectedIndex = DropDownList1.Items.Count - 1;
  33.     }
  34.     protected void Button1_Click(object sender, EventArgs e)
  35.     {
  36.         try
  37.         {
  38.             if (TextBox1.Text == "")
  39.             {
  40.                 throw new Exception("表单名不能为空!");
  41.             }
  42.             MR.BDMC = TextBox1.Text;
  43.             MR.LCLX =int.Parse(DropDownList1.SelectedValue);
  44.             MR.BDNR = "";
  45.             BR.Add(MR);
  46.             MessageBox.Show("添加成功", "FormDesignManager.aspx");
  47.             TextBox1.Text = "";
  48.         }
  49.         catch (Exception exp)
  50.         {
  51.             MessageBox.Show(exp.Message);
  52.         }
  53.     }
  54. }