Exemple #1
0
        private void InitData()
        {
            AuditGridInit();

            FormHelper gen = new FormHelper();

            gen.GenerateForm("CForm_FAuditHistory", this.pnlMain, new Point(6, 20));

            RejectBackNode = adInstance.GetVerifyTemplateRejectBack(ModuleCode, CurNode);

            MethodInvoker mm = new MethodInvoker(GetNextNode);

            mm.BeginInvoke(null, null);
        }
Exemple #2
0
        private void Employee_Load(object sender, EventArgs e)
        {
            FormHelper gen = new FormHelper();
            BindModelHelper helper = new BindModelHelper();
            //表单生成
            gen.GenerateForm("FEmp", this.groupBox1, new Point(6, 20));
            gen.GenerateForm("FOEmp", this.panel2, new Point(6, 20));
            gen.GenerateForm("FCEmp", this.panel1, new Point(6, 20));

            switch (operationType)
            {
                case OperationTypeEnum.Look:
                    this.btnSave.Enabled = false;
                    break;

            }

            //编辑或添加判断
            if (EmplyeeModel != null)
            {

                helper.BindModelToControl<Bse_Employee>(EmplyeeModel, this.groupBox1.Controls, "");
                helper.BindModelToControl<Bse_Employee>(EmplyeeModel, this.panel1.Controls, "");
                helper.BindModelToControl<Bse_Employee>(EmplyeeModel, this.panel2.Controls, "");
            }
            else
            {
                EmplyeeModel = new Bse_Employee();
                //EmplyeeModel.Emp_Code = EmployeeInstance.GenerateEmpCode();
                helper.BindModelToControl<Bse_Employee>(EmplyeeModel, this.groupBox1.Controls, "");
                helper.BindModelToControl<Bse_Employee>(EmplyeeModel, this.panel1.Controls, "");
                helper.BindModelToControl<Bse_Employee>(EmplyeeModel, this.panel2.Controls, "");
            }

            btnSave.Click += new EventHandler(btnSave_Click);
            //btnOk.Click += new EventHandler(btnOk_Click);
            //Emp_Dept_Code.Click += new EventHandler(Emp_Dept_Code_Click);
            //Emp_Dept_Name.Click += new EventHandler(Emp_Dept_Code_Click);
            btnCancle.Click += new EventHandler(btnCancle_Click);

            //LoadDict();
        }