示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.IsPostBack == false)
     {
         //查询出来数据给表单赋值。
         BP.Demo.SDK.QingJia en = new BP.Demo.SDK.QingJia();
         en.OID = (int)this.WorkID;
         if (en.RetrieveFromDBSources() == 1)
         {
             /* 数据源已经有 */
             this.TB_No.Text             = en.QingJiaRenNo;              //
             this.TB_Name.Text           = en.QingJiaRenName;            // 请假人名称.
             this.TB_DeptNo.Text         = en.QingJiaRenDeptNo;          //部门编号.
             this.TB_DeptName.Text       = en.QingJiaRenDeptName;        //部门名称
             this.TB_QingJiaYuanYin.Text = en.QingJiaYuanYin;            //请假原因
             this.TB_QingJiaTianShu.Text = en.QingJiaTianShu.ToString(); //请假天数
         }
         else
         {
             /*给他默认值*/
             this.TB_No.Text       = BP.Web.WebUser.No;
             this.TB_Name.Text     = BP.Web.WebUser.Name;
             this.TB_DeptNo.Text   = BP.Web.WebUser.FK_Dept;
             this.TB_DeptName.Text = BP.Web.WebUser.FK_DeptName;
         }
     }
 }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BP.WF.Node nd = new BP.WF.Node(this.FK_Node);
            this.Page.Title = "您好:" + BP.Web.WebUser.No + " - " + BP.Web.WebUser.Name + " . 当前节点:" + nd.Name;
            if (this.IsPostBack == false)
            {
                //查询出来数据给表单赋值。
                BP.Demo.SDK.QingJia en = new BP.Demo.SDK.QingJia();
                en.OID = (int)this.WorkID;
                if (en.RetrieveFromDBSources() == 1)
                {
                    /* 数据源已经有 */
                    this.TB_No.Text             = en.QingJiaRenNo;              //
                    this.TB_Name.Text           = en.QingJiaRenName;            // 请假人名称.
                    this.TB_DeptNo.Text         = en.QingJiaRenDeptNo;          //部门编号.
                    this.TB_DeptName.Text       = en.QingJiaRenDeptName;        //部门名称
                    this.TB_QingJiaYuanYin.Text = en.QingJiaYuanYin;            //请假原因
                    this.TB_QingJiaTianShu.Text = en.QingJiaTianShu.ToString(); //请假天数
                }
                else
                {
                    /*给他默认值*/
                    this.TB_No.Text       = BP.Web.WebUser.No;
                    this.TB_Name.Text     = BP.Web.WebUser.Name;
                    this.TB_DeptNo.Text   = BP.Web.WebUser.FK_Dept;
                    this.TB_DeptName.Text = BP.Web.WebUser.FK_DeptName;
                }

                if (this.FK_Node != 11001)
                {
                    /*如果是不是开始节点,让其只读.*/
                    this.TB_No.ReadOnly       = true; //
                    this.TB_Name.ReadOnly     = true; // 请假人名称.
                    this.TB_DeptNo.ReadOnly   = true; //部门编号.
                    this.TB_DeptName.ReadOnly = true; //部门名称

                    this.TB_QingJiaTianShu.ReadOnly = true;
                    this.TB_QingJiaYuanYin.ReadOnly = true;
                }
            }
        }