private void frmRegLeaveSchedule_Load(object sender, EventArgs e)
        {
            Refresh();
            employeeDO = new EmployeeDO();

            departnemtDO = new DepartmentDO();
            departmentTreeView.DepartmentDataSet = departnemtDO.GetAllDepartments();
            departmentTreeView.BuildTree();
            departmentTreeView.SelectedNode = departmentTreeView.TopNode;
            departmentTreeView.ExpandNodes(true);

            leaveScheduleDO = new LeaveScheduleDO();

            if (selectedLeaveSchedule >= 0)
            {
                // disable các thuộc tính liên quan đến nhân viên
                string str = WorkingContext.LangManager.GetString("frmRegLeaveSchedule_Text2");
                this.Text = str;
                //this.Text = "Sửa đăng ký công tác";
                LoadLeaveSchedule();
                cboEmployeeName.Enabled    = false;
                departmentTreeView.Enabled = false;
            }
            else
            {
                string str = WorkingContext.LangManager.GetString("frmRegLeaveSchedule_Text");
                this.Text       = str;
                dsLeaveSchedule = leaveScheduleDO.getLeaveSchedule();
            }
        }
Example #2
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");
            }
        }
Example #3
0
        private void departmentTreeView_AfterSelect(object sender, TreeViewEventArgs e)
        {
            departmentTreeView.ExpandNodes(true);
            DepartmentID = (int)departmentTreeView.SelectedNode.Tag;

            DataRow[] drs = dsDepartment.Tables[0].Select("DepartmentID=" + DepartmentID);
            DepartmentName = drs[0]["DepartmentName"].ToString();
            Description    = drs[0]["Description"].ToString();
            GroupID        = Convert.ToInt32(drs[0]["GroupID"].ToString());
            string thu = drs[0]["SortIndex"].ToString();

            if (drs[0]["SortIndex"].ToString() != "")
            {
                SortIndex = Convert.ToInt32(drs[0]["SortIndex"].ToString());
            }
        }
Example #4
0
 private void frmSalary_Load(object sender, EventArgs e)
 {
     departmentTreeView.BuildTree();
     departmentTreeView.ExpandNodes(true);
 }