示例#1
0
        private void frmPunish_Load(object sender, EventArgs e)
        {
            Refresh();
            departmentDO = new DepartmentDO();
            employeeDO   = new EmployeeDO();
            departmentTreeView.DepartmentDataSet = departmentDO.GetAllDepartments();
            departmentTreeView.BuildTree();
            departmentTreeView.SelectedNode = departmentTreeView.TopNode;
            departmentTreeView.ExpandNodes(true);
            LoadPunishCardCombo();
            punishD0 = new PunishDO();
            dtPunish = dsPunish.Tables[0];

            if (selectedPunish >= 0)           //Sửa thông tin thẻ phạt
            {
                //this.Text = "Sửa thông tin thiết lập thẻ phạt";
                this.Text = WorkingContext.LangManager.GetString("frmPunish_Text1");
                LoadPunishData();
                cboEmployeeName.Enabled    = false;
                departmentTreeView.Enabled = false;
            }
            else            // thêm mới
            {
                //This.Text = "Thiết lập thẻ phạt";
                this.Text = WorkingContext.LangManager.GetString("frmPunish_Text2");
            }
        }
示例#2
0
 private void frmLishPunish_Load(object sender, EventArgs e)
 {
     Refresh();
     punishDO = new PunishDO();
     BindingDepartmentCombo();
     PopulateListPunish();
 }