private void frmListEmployees_Load(object sender, EventArgs e)
        {
            EVsoft.HRMS.Common.GeneralProcess.StandardFormControl(this);
            departmentDO = new DepartmentDO();
            employeeDO = new EmployeeDO();

            departmentTreeView.DepartmentDataSet = departmentDO.GetAllDepartments();
            departmentTreeView.BuildTree();
            departmentTreeView.SelectedNode = departmentTreeView.TopNode;

            Refresh();
        }
        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();
            }
        }
Exemple #3
0
        /// <summary>
        /// Lấy danh sách phòng ban hiện lên cây tổ chức
        /// </summary>
        private void PopulateDepartmentAndPositionCombos()
        {
            DepartmentDO departmentDO = new DepartmentDO();

            DataSet dsDepartment = new DataSet();
            dsDepartment = departmentDO.GetDepartments();

            cboDepartment.SourceDataString = new string[] { "DepartmentID", "DepartmentName" };
            cboDepartment.SourceDataTable = dsDepartment.Tables[0];
            cboDepartment.SelectedIndex = 0;

            DataSet dsPosition = new DataSet();
            dsPosition = departmentDO.GetAllPositions();

            cboPosition.SourceDataString = new string[] { "PositionID", "PositionName" };
            cboPosition.SourceDataTable = dsPosition.Tables[0];
            cboPosition.SelectedIndex = 0;
        }
        private void frmRegRestEmployee_Load(object sender, EventArgs e)
        {
            Refresh();
            departmentDO = new DepartmentDO();
            departmentTreeView.DepartmentDataSet = departmentDO.GetAllDepartments();
            departmentTreeView.BuildTree();
            departmentTreeView.SelectedNode = departmentTreeView.TopNode;

            departmentTreeView.ExpandNodes(true);

            regRestEmployeeDO = new RegRestEmployeeDO();
            dtRegRestEmployee = dsRegRestEmployee.Tables[0];

            PopulateDayTypeCombo();

            if (selectedRestEmployee >= 0) /*Load dữ liệu lên các control khi thực hiện sửa đổi*/
            {
                string str = WorkingContext.LangManager.GetString("frmRegRest_Text2");
                this.Text = str;
                LoadRestData();
                cboEmployeeName.Enabled = false;
                departmentTreeView.Enabled = false;

                //Lưu lại thông tin ngày đăng ký nghỉ, kiểu ngày nghỉ trước khi cập nhật
                if (dtRegRestEmployee.Rows[selectedRestEmployee]["NumDay"] != DBNull.Value)
                {
                    fNumDayBeforeUpdate = Convert.ToSingle(dtRegRestEmployee.Rows[selectedRestEmployee]["NumDay"]);
                }
                iDayIdBeforeUpdate = Convert.ToInt32(dtRegRestEmployee.Rows[selectedRestEmployee]["DayID"]);
                dtStartRestBeforeUpdate = Convert.ToDateTime(dtRegRestEmployee.Rows[selectedRestEmployee]["StartRest"]);
                dtEndRestBeforeUpdate = Convert.ToDateTime(dtRegRestEmployee.Rows[selectedRestEmployee]["EndRest"]);
            }
            else
            {
                string str1 = WorkingContext.LangManager.GetString("frmRegRest_Text1");
                this.Text = str1;
            }
        }
Exemple #5
0
        /// <summary>
        /// Hiển thị danh sách phòng bao vào combobox
        /// </summary>
        private void BindingDepartmentCombo()
        {
            DepartmentDO departmentDO = new DepartmentDO();
            DataSet departmentDS = departmentDO.GetAllDepartments();

            cboDepartment.DataSource = departmentDS.Tables[0];
            cboDepartment.ValueMember = "DepartmentID";// = selected value
            cboDepartment.DisplayMember = "DepartmentName";
        }
        private void frmRegWorkingTime_Load(object sender, EventArgs e)
        {
            Refresh();

            cboDinnnerAmount.Enabled = false;
            employeeDO = new EmployeeDO();

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

            regOverTimeDO = new RegOverTimeDO();
            dtRegOverTime = dsRegOverTime.Tables[0];

            monthCalendar1.SelectDate(DateTime.Today);

            //CurrentYear = DateTime.Today.Year;
            CurrentYear = DateTime.Now.Year;
            monthCalendar1.ActiveMonth.Year = CurrentYear;
            CurrentMonth = DateTime.Today.Month;
            monthCalendar1.ActiveMonth.Month = CurrentMonth;

            monthCalendar1.SelectDate(DateTime.Today);

            if (selectedRegOverTime >= 0)
            {
                // disable các thuộc tính liên quan đến nhân viên
                string str = WorkingContext.LangManager.GetString("frmRegOverTime1_Text2");
                //this.Text = "Sửa đăng ký làm thêm giờ";
                this.Text = str;
                LoadRegOverTime();
                //				optEmployee.Checked = true;
                departmentTreeView.Enabled = false;
                //				optAll.Enabled = false;
                //dtpDayWorking.Enabled = false;
                //cboEmployeeName.Enabled = false;
                lvwListEmployee.Enabled = false;
            }
            else
            {
                string str = WorkingContext.LangManager.GetString("frmRegOverTime1_Text1");
                //this.Text = "Thêm đăng ký làm thêm giờ";
                this.Text = str;
                //txtEmployeeName.Enabled = false;
                //cboEmployeeName.Enabled = false;

            }
            PopulateShiftCombo();
        }
Exemple #7
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");
            }
        }
Exemple #8
0
 private void frmPosition_Load(object sender, System.EventArgs e)
 {
     Refresh();
     departmentDO = new DepartmentDO();
     PopulatePositionListView();
 }
        private void frmRegWorkingTime_Load(object sender, EventArgs e)
        {
            Refresh();
            workingTimeDO = new RegWorkingTimeDO();
            employeeDO = new EmployeeDO();

            DepartmentDO departmentDO = new DepartmentDO();
            dsDepartment = departmentDO.GetAllDepartments();

            departmentTreeView.DepartmentDataSet = dsDepartment;
            departmentTreeView.BuildTree();
            departmentTreeView.SelectedNode = departmentTreeView.TopNode;

            monthCalendar1.SelectDate(DateTime.Today);

            //CurrentYear = DateTime.Today.Year;
            CurrentYear = DateTime.Now.Year;
            monthCalendar1.ActiveMonth.Year = CurrentYear;
            CurrentMonth = DateTime.Today.Month;
            monthCalendar1.ActiveMonth.Month = CurrentMonth;

            monthCalendar1.SelectDate(DateTime.Today);
            SetStatus(false);

            PopulateShiftCombo();
        }
 private void frmDepartmentGroup_Load(object sender, EventArgs e)
 {
     Refresh();
     departmentDO = new DepartmentDO();
     dtPosition = dsPosition.Tables[0];
     if (selectedPosition >= 0)
     {
         //string str = WorkingContext.LangManager.GetString("frmPosition_Text3");
         this.Text = "Sửa thông tin nhóm phòng ban";
         //this.Text = str;
         LoadCurrentPosition();
     }
     else
     {
         //string str = WorkingContext.LangManager.GetString("frmPosition_Text2");
         this.Text = "Thêm nhóm phòng ban mới";
         //this.Text = str;
     }
 }
 private void frmDepartment_Load(object sender, EventArgs e)
 {
     Refresh();
     departmentDO = new DepartmentDO();
     PopulateDepartmentTreeView();
     departmentTreeView.SelectedNode = null;
 }
Exemple #12
0
        /// <summary>
        /// Điền thông tin nhân viên hiện tại vào form
        /// </summary>
        public void LoadCurrentEmployee()
        {
            ResetForm();
            DataRow dr = dsEmployee.Tables[0].Rows[selectedEmployee];
            if (dr != null)
            {
                // Dữ liệu nhân viên
                txtEmployeeName.Text = dr["EmployeeName"].ToString();
                txtCardID.Text = dr["CardID"].ToString();
                txtIdentityCard.Text = dr["IdentityCard"].ToString();
                txtNoiCapCMND.Text = dr["AllocationPlace"].ToString();
                if (dr["Issue"] != DBNull.Value)
                {
                    dtpIssue.Value = (DateTime)dr["Issue"];
                }
                txtInsurenceID.Text = dr["InsuranceID"].ToString();
                if (dr["StartDateInsurance"] != DBNull.Value)
                {
                    dtpStartDateInsurance.Value = (DateTime)dr["StartDateInsurance"];
                }
                if (dr["DateOfBirth"] != DBNull.Value)
                {
                    dtpDateOfBirth.Value = DateTime.Parse(dr["DateOfBirth"].ToString());
                }
                cboGender.SelectedIndex = Int32.Parse(dr["Gender"].ToString());
                txtAddress.Text = dr["Address"].ToString();//Địa chỉ thường trú
                txtTemAddress.Text = dr["TemporaryAddress"].ToString();//Địa chỉ tạm trú
                txtCommune.Text = dr["Commune"].ToString();
                txtDistrict.Text = dr["District"].ToString();
                txtProvince.Text = dr["Province"].ToString();
                txtPhone.Text = dr["Phone"].ToString();
                txtEmail.Text = dr["Email"].ToString();
                txtBirthPlace.Text = dr["BirthPlace"].ToString();
                txtResident.Text = dr["Resident"].ToString();
                cboNationality.Text = dr["Nationality"].ToString();

                if (dr["BarCode"] != DBNull.Value)
                    txtBarcode.Text = dr["BarCode"].ToString();
                else//Tao ma vach cho nhan vien
                {
                    string employeeID = dr["EmployeeID"].ToString().Trim();
                    string employeeIDLen12 = employeeID;
                    if (employeeID.Length < 12)
                        for (int i = 0; i < (12 - employeeID.Length); i++)
                            employeeIDLen12 = "0" + employeeIDLen12;

                    if (employeeIDLen12.Length == 12)
                        txtBarcode.Text = employeeIDLen12 + BarCodeHelper.CreateCheckCode(employeeIDLen12);
                }

                if (dr["MarriageStatus"] != DBNull.Value)
                {
                    cboMarriageStatus.SelectedIndex = Int32.Parse(dr["MarriageStatus"].ToString());
                }
                if (dr["People"] != DBNull.Value)
                {
                    cboPeople.SelectedIndex = Int32.Parse(dr["People"].ToString());
                }
                if (dr["Religious"] != DBNull.Value)
                {
                    cboReligious.SelectedIndex = Int32.Parse(dr["Religious"].ToString());
                }
                cboContract.Text = dr["ContractName"].ToString();
                cboDepartment.Text = dr["DepartmentName"].ToString();

                iOldDepartment = Convert.ToInt32(dr["DepartmentID"]); //Lưu lại ID bộ phận công tác trước khi cập nhật

                cboPosition.Text = dr["PositionName"].ToString();

                //Mã số thuế
                if (dr["TaxID"] != DBNull.Value)
                    txtTaxID.Text = dr["TaxID"].ToString();
                //Số người giảm trừ gia cảnh
                if (dr["FamilyConditionNumber"] != DBNull.Value)
                    txtFamilyConditionNumber.Text = dr["FamilyConditionNumber"].ToString();
                else
                    txtFamilyConditionNumber.Text = "0";

                DepartmentDO departmentDO = new DepartmentDO();

                if (dr["HospitalID"] != DBNull.Value)
                {
                    DataSet dsHospital = departmentDO.GetHospital(dr["HospitalID"].ToString());
                    if (dsHospital.Tables.Count > 0)
                        if (dsHospital.Tables[0].Rows.Count > 0)
                            cbHospital.Text = dsHospital.Tables[0].Rows[0]["HospitalName"].ToString();
                }
                if (dr["SalaryID"] != DBNull.Value)
                    if (Convert.ToInt32(dr["SalaryID"]) != 0)
                    {
                        DayTypeDO DayType = new DayTypeDO();
                        DataSet dsSalary = DayType.GetsalaryByID(Convert.ToInt32(dr["SalaryID"]));
                        if (dsSalary.Tables[0].Rows.Count > 0)
                            mtgcComboFixSalary.Text = dsSalary.Tables[0].Rows[0]["SalaryName"].ToString();
                    }
                if (dr["Qualification"] != DBNull.Value)
                {
                    cboQualification.SelectedIndex = Int32.Parse(dr["Qualification"].ToString());
                }
                if (dr["ProfessionalLevel"] != DBNull.Value)
                {
                    cboProfessionalLevel.SelectedIndex = Int32.Parse(dr["ProfessionalLevel"].ToString());
                }
                if (dr["EnglishLevel"] != DBNull.Value)
                {
                    cboEnglishLevel.SelectedIndex = Int32.Parse(dr["EnglishLevel"].ToString());
                }
                else
                {
                    cboEnglishLevel.SelectedIndex = 0;
                }
                if (dr["InformaticLevel"] != DBNull.Value)
                {
                    cboInformaticLevel.SelectedIndex = Int32.Parse(dr["InformaticLevel"].ToString());
                }
                else
                {
                    cboInformaticLevel.SelectedIndex = 0;
                }
                txtOtherCertificate.Text = dr["OtherCertificate"].ToString();
                txtDiscipline.Text = dr["Discipline"].ToString();

                if (dr["RecruitDate"] != DBNull.Value)
                {
                    dtpRecruitDate.Value = DateTime.Parse(dr["RecruitDate"].ToString());
                }
                if (dr["StartDate"] != DBNull.Value)
                {
                    dtpStartDate.Value = DateTime.Parse(dr["StartDate"].ToString());
                    label8.Checked = true;
                    dtpStartDate.Enabled = true;
                }
                else
                {
                    label8.Checked = false;
                    dtpStartDate.Enabled = false;
                }
                if (dr["StartTrial"] != DBNull.Value)
                {
                    dtpStartTrial.Value = DateTime.Parse(dr["StartTrial"].ToString());
                    label5.Checked = true;
                    dtpStartTrial.Enabled = true;
                }
                else
                {
                    label5.Checked = false;
                    dtpStartTrial.Enabled = false;
                }
                label10.Visible = true;
                dtpStopDate.Visible = true;

                if (dr["StopDate"] != DBNull.Value)
                {
                    dtpStopDate.Enabled = true;
                    dtpStopDate.Value = DateTime.Parse(dr["StopDate"].ToString());
                    //Bổ sung ngày thôi việc bên tap Lương và tuyển dụng
                    chkStopWork.Checked = true;
                    dtpStopWork.Value = DateTime.Parse(dr["StopDate"].ToString());
                }
                else
                {
                    dtpStopDate.Enabled = false;
                    chkStopWork.Checked = false;
                    dtpStopWork.Enabled = false;
                }

                if (dr["BasicSalary"] != DBNull.Value)
                {
                    txtBasicSalary.Double = Double.Parse(dr["BasicSalary"].ToString());
                    dbOldSalary = Double.Parse(dr["BasicSalary"].ToString());
                }

                if (dr["LunchAllowance"] != DBNull.Value)
                {
                    txtLunchAllowance.Double = Double.Parse(dr["LunchAllowance"].ToString());
                }
                if (dr["HarmfulAllowance"] != DBNull.Value)
                {
                    txtPositionAllowance.Double = Double.Parse(dr["HarmfulAllowance"].ToString());
                }
                if (dr["ResponsibleAllowance"] != DBNull.Value)
                {
                    txtJobAllowance.Double = Double.Parse(dr["ResponsibleAllowance"].ToString());
                }
                if (dr["IntimateAllowance"] != DBNull.Value)
                {
                    txtIntimateAllowance.Double = Double.Parse(dr["IntimateAllowance"].ToString());
                }
                if (dr["IntimateAllowanceFixed"] != DBNull.Value)
                {
                    chk_PCDL_CoDinhThang.Checked = Convert.ToBoolean(dr["IntimateAllowanceFixed"]);
                }
                //chinhND 20101030 bo sung them phan xu ly tro cap nguy hiem va tro cap tieng Nhat
                if (dr["DangerousAllowance"] != DBNull.Value)
                {
                    txtTaskAllowance.Double = Double.Parse(dr["DangerousAllowance"].ToString());
                }
                if (dr["JapaneseAllowance"] != DBNull.Value)
                {
                    txtJapaneseAllowance.Double = Double.Parse(dr["JapaneseAllowance"].ToString());
                }
                ///end chinhND 20101030
                if (dr["Picture"] != DBNull.Value)
                {
                    PictureFileName = dr["Picture"].ToString();
                    if (PictureFileName.Equals(""))
                    {
                        picEmployee.Image = Image.FromFile(Application.StartupPath + "/IMAGES/noimage3.jpg");
                    }
                    else
                    {
                        string PictureFilePath = WorkingContext.Setting.PicturePath + '\\' + dr["Picture"].ToString();
                        try
                        {
                            picEmployee.Image = Image.FromFile(PictureFilePath);
                        }
                        catch
                        {
                            picEmployee.Image = Image.FromFile(Application.StartupPath + "/IMAGES/noimage3.jpg");
                        }
                    }
                }
                else
                {
                    picEmployee.Image = Image.FromFile(Application.StartupPath + "/IMAGES/noimage3.jpg");
                }
                txtNote.Text = dr["Note"].ToString();
                InsuranceShelf = bool.Parse(dr["InsuranceShelf"].ToString());
                cboInsuranceShelf.Checked = InsuranceShelf;
                //this.Text = "Hồ sơ nhân viên: " + txtEmployeeName.Text;
                this.Text = WorkingContext.LangManager.GetString("frmE_text") + ": " + txtEmployeeName.Text;
                txtRecordNum.Text = (selectedEmployee + 1) + "/" + dsEmployee.Tables[0].Rows.Count;
                EmployeeID = int.Parse(dr["EmployeeID"].ToString());
                PopulateDepartmentHistoryListView();
                PopulatePositionHistoryListView();
                PopulateSalaryHistoryListView();
                //PopulateContractCombo();
            }
        }
Exemple #13
0
 /// <summary>
 /// Lấy danh sách phòng khám và bệnh viện hiện lên combo
 /// </summary>
 private void PopulateHospitalCombos()
 {
     DepartmentDO departmentDO = new DepartmentDO();
     DataSet dsHospital = new DataSet();
     dsHospital = departmentDO.GetAllHospitals();
     if (dsHospital != null)
     {
         cbHospital.SourceDataString = new string[] { "HospitalID", "HospitalName" };
         cbHospital.SourceDataTable = dsHospital.Tables[0];
         //cbHospital.SelectedIndex = 0;
     }
 }
Exemple #14
0
        private void frmLunch_Load(object sender, EventArgs e)
        {
            Refresh();
            departmentDO = new DepartmentDO();
            employeeDO = new EmployeeDO();
            lunchDO = new LunchDO();
            cboLunchMoney.Text = "16000";

            departmentTreeView.DepartmentDataSet = departmentDO.GetAllDepartments();
            departmentTreeView.BuildTree();
            departmentTreeView.SelectedNode = departmentTreeView.TopNode;
        }
 private void frmChangeTimeInOut_Load(object sender, System.EventArgs e)
 {
     Refresh();
     timeInOutDO = new TimeInOutDO();
     employeeDO = new EmployeeDO();
     DepartmentDO departmentDO = new DepartmentDO();
     departmentTreeView.DepartmentDataSet = departmentDO.GetAllDepartments();
     departmentTreeView.BuildTree();
     departmentTreeView.SelectedNode = departmentTreeView.TopNode;
 }
Exemple #16
0
        private void frmDepartment_Load(object sender, EventArgs e)
        {
            Refresh();
            departmentDO = new DepartmentDO();
            DataSet dsDepartmentGroup = new DataSet();
            dsDepartmentGroup = departmentDO.GetAllGroupDepartments();
            if (dsDepartmentGroup != null)
            {
                cboGroup.SourceDataString = new string[] { "GroupID", "GroupName" };
                cboGroup.SourceDataTable = dsDepartmentGroup.Tables[0];
                cboGroup.SelectedIndex = 0;
            }
            if (DepartmentName != "")
            {

                string str = WorkingContext.LangManager.GetString("frmDep_Text1");
                //this.Text = "Sửa thông tin phòng ban";
                this.Text = str;
                txtDepartmentName.Text = DepartmentName;
                txtDescription.Text = Description;
                if (SortIndex > 0)
                    txtSort.Text = SortIndex.ToString();
                else
                {
                    txtSort.Text = "1";
                    SortIndex = 1;
                }

                DataSet dsGroupName = departmentDO.GetGroupDepartments(GroupID);
                if (dsGroupName != null)
                    cboGroup.Text = dsGroupName.Tables[0].Rows[0]["GroupName"].ToString();

            }
            else
            {
                string str = WorkingContext.LangManager.GetString("frmDep_Text2");
                //this.Text = "Thêm một phòng ban mới";
                this.Text = str;
            }
        }
        private void frmListEmployees_Load(object sender, EventArgs e)
        {
            departmentDO = new DepartmentDO();
            employeeDO = new EmployeeDO();

            departmentTreeView.DepartmentDataSet = departmentDO.GetAllDepartments();
            departmentTreeView.BuildTree();
            departmentTreeView.SelectedNode = departmentTreeView.TopNode;
            Refresh();
        }
Exemple #18
0
        /// <summary>
        /// Lấy danh sách phòng ban,bộ phận
        /// </summary>
        private void PopulateDepartmentCombo()
        {
            departmentDO = new DepartmentDO();

            DataSet dsDepartment = new DataSet();
            dsDepartment = departmentDO.GetAllDepartments();

            cboDepartment.SourceDataString = new string[] { "DepartmentID", "DepartmentName" };
            cboDepartment.SourceDataTable = dsDepartment.Tables[0];
            if (dsDepartment.Tables[0].Rows.Count > 0)
            {
                cboDepartment.SelectedIndex = 0;
            }
        }
        /// <summary>
        /// Lấy Danh sách các phòng ban
        /// </summary>
        private void PopulateDepartmentCombo()
        {
            DepartmentDO departmentDO = new DepartmentDO();
            DataSet dsDepartment = departmentDO.GetAllDepartments();

            cboDepartment.DataSource = dsDepartment.Tables[0];
            cboDepartment.ValueMember = "DepartmentID";
            cboDepartment.DisplayMember = "DepartmentName";
        }
Exemple #20
0
 private void frmPosition_Load(object sender, System.EventArgs e)
 {
     Refresh();
     departmentDO = new DepartmentDO();
     dtPosition = dsPosition.Tables[0];
     if (selectedPosition >= 0)
     {
         string str = WorkingContext.LangManager.GetString("frmPosition_Text3");
         //this.Text = "Sửa thông tin chức vụ";
         this.Text = str;
         LoadCurrentPosition();
     }
     else
     {
         string str = WorkingContext.LangManager.GetString("frmPosition_Text2");
         //this.Text = "Thêm một chức vụ mới";
         this.Text = str;
     }
 }
Exemple #21
0
        private void frmRegOverTime_Load(object sender, EventArgs e)
        {
            Refresh();

            cboDinnnerAmount.Enabled = false;
            employeeDO = new EmployeeDO();

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

            regOverTimeDO = new RegOverTimeDO();
            dtRegOverTime = dsRegOverTime.Tables[0];

            if (selectedRegOverTime >= 0)
            {
                // disable các thuộc tính liên quan đến nhân viên
                string str = WorkingContext.LangManager.GetString("frmRegOverTime1_Text2");
                //this.Text = "Sửa đăng ký làm thêm giờ";
                this.Text = str;
                LoadRegOverTime();
                //				optEmployee.Checked = true;
                departmentTreeView.Enabled = false;
                //				optAll.Enabled = false;
                dtpDayWorking.Enabled = false;
                cboEmployeeName.Enabled = false;
                lvwListEmployee.Enabled = false;
            }
            else
            {
                string str = WorkingContext.LangManager.GetString("frmRegOverTime1_Text1");
                //this.Text = "Thêm đăng ký làm thêm giờ";
                this.Text = str;
                txtEmployeeName.Enabled = false;
                cboEmployeeName.Enabled = false;

            }
        }
Exemple #22
0
 private void frmListHospital_Load(object sender, EventArgs e)
 {
     Refresh();
     departmentDO = new DepartmentDO();
     PopulatePositionListView();
 }
        private void frmStatus_Load(object sender, EventArgs e)
        {
            Refresh();
            departmentDO = new DepartmentDO();
            statusDO = new StatusDO();

            cboSort.SelectedIndex =  2;
            PanelWidth = pnEmployee.Width;
            PanelHeight = pnEmployee.Height;
            BoxesPerPage = (PanelWidth / BoxWidth) * (PanelHeight / BoxHeight);
            CurrentPage = 1;
            PopulateDepartmentCombo();
            this.cboSort.SelectedIndexChanged += new System.EventHandler(this.cboSort_SelectedIndexChanged);
            cboDepartment.Focus();
        }