private void Get_EmployeeCodeToCBO() { Class.NhanVien nv = new Class.NhanVien(); nv.Status = -1; DataTable dt = nv.LoadDanhSachNhanVien_Ex(); cboSinger.Properties.DataSource = dt; cboSinger.Properties.DisplayMember = "EmployeeCode"; cboSinger.Properties.ValueMember = "EmployeeCode"; Class.NhanVien_ThoiVu nvtv = new Class.NhanVien_ThoiVu(); DataTable dttv = nvtv.HRM_EMPLOYEE_SEASON_GetList(); txtEmployeeCode.Properties.DataSource = dttv; txtEmployeeCode.Properties.DisplayMember = "EmployeeCode"; txtEmployeeCode.Properties.ValueMember = "EmployeeCode"; }
private void call_info(string Form_name, string code) { Class.NhanVien_HopDong_ThoiVu hd = new Class.NhanVien_HopDong_ThoiVu(); hd.ContractCode = code; DataTable dt = hd.HRM_CONTRACT_SEASON_Get(); txtSigner.Text = dt.Rows[0]["Signer"].ToString(); txtSignerNationality.Text = dt.Rows[0]["SignerNationality"].ToString(); txtSignerPosition.Text = dt.Rows[0]["SignerPosition"].ToString(); txtCompany.Text = dt.Rows[0]["Company"].ToString(); txtAddress.Text = dt.Rows[0]["Address"].ToString(); txtTel.Text = dt.Rows[0]["Tel"].ToString(); checkIsCurrent.Checked = (bool)dt.Rows[0]["IsCurrent"]; txtEmployeeCode.EditValue = dt.Rows[0]["EmployeeCode"].ToString(); Class.NhanVien_ThoiVu nv = new Class.NhanVien_ThoiVu(); nv.EmployeeCode = dt.Rows[0]["EmployeeCode"].ToString(); DataTable dtinfo = nv.HRM_EMPLOYEE_SEASON_Get(); txtFullName.Text = dtinfo.Rows[0]["FirstName"].ToString() + " " + dtinfo.Rows[0]["LastName"].ToString(); dateBirthday.DateTime = (DateTime)dtinfo.Rows[0]["Birthday"]; txtPosition.Text = dtinfo.Rows[0]["Position"].ToString(); txtNationality.Text = dtinfo.Rows[0]["Nationality"].ToString(); txtIDCard.Text = dtinfo.Rows[0]["IDCard"].ToString(); dateIDCardDate.DateTime = (DateTime)dtinfo.Rows[0]["IDCardDate"]; txtIDCardPlace.Text = dtinfo.Rows[0]["IDCardPlace"].ToString(); txtBranchName.Text = dtinfo.Rows[0]["BranchName"].ToString(); //tab thong tin hop dong txtContractCode.Text = dt.Rows[0]["ContractCode"].ToString(); txtContractTime.Text = dt.Rows[0]["ContractTime"].ToString(); txtContractYear.Text = dt.Rows[0]["ContractYear"].ToString(); dateSignDate.DateTime = (DateTime)dt.Rows[0]["SignDate"]; dateFromDate.DateTime = (DateTime)dt.Rows[0]["FromDate"]; if (dt.Rows[0]["ToDate"] != DBNull.Value) { dateToDate.DateTime = (DateTime)dt.Rows[0]["ToDate"]; } txtBasicSalary.Value = (decimal)dt.Rows[0]["BasicSalary"]; txtPayForm.Text = dt.Rows[0]["PayForm"].ToString(); txtPayDate.Value = (int)dt.Rows[0]["PayDate"]; txtAllowance.Text = dt.Rows[0]["Allowance"].ToString(); txtInsurance.Text = dt.Rows[0]["Insurance"].ToString(); txtWorkTime.Text = dt.Rows[0]["WorkTime"].ToString(); txtDescription.Text = dt.Rows[0]["Description"].ToString(); }