private void FillData(string strKey) { //dtEmployee = SQLExec.ExecuteReturnDt("EXEC Sp_GetDmCbNv"); dtEmployee = HRMCommon.GetCustomerTable("MA_KV", this.cboFill.Text); bdsEmployee.DataSource = dtEmployee; tlDmCbNv.DataSource = bdsEmployee; //bdsEmployee.Position = 0; //HOPDONG //dtHopDong = DataTool.SQLGetDataTable("HRHOPDONG", null, strKey, "Ngay_Begin, Ngay_End"); dtHopDong = SQLExec.ExecuteReturnDt("SELECT * FROM HRHOPDONG"); bdsHopDong.DataSource = dtHopDong; dgvHopDong.DataSource = bdsHopDong; //HOPDONGPL //dtHopDongPL = DataTool.SQLGetDataTable("HRHOPDONGPL", null, strKey, "Ngay_Begin, Ngay_End"); dtHopDongPL = SQLExec.ExecuteReturnDt("SELECT * FROM HRHOPDONGPL"); bdsHopDongPL.DataSource = dtHopDongPL; dgvHopDongPL.DataSource = bdsHopDongPL; //Tham số các khoản thu nhập string strSQLExec = "SELECT T1.*, T2.Ten_Tn, T2.Dvt FROM HRPARAVALUE0 T1 LEFT JOIN HRPARALIST T2 ON T1.Ma_Tn = T2.Ma_Tn " + " ORDER BY Ngay_Ap"; //Uy quyen cho lop co so tim kiem bdsSearch = bdsEmployee; ExportControl = tlDmCbNv; tlDmCbNv.Expand = (bool)SQLExec.ExecuteReturnValue("SELECT Expand FROM SYSZONE WHERE ZONE = '" + tlDmCbNv.strZone + "'"); }
void EditEmployee(enuEdit enuNew_Edit) { if (bdsEmployee.Position < 0 && enuNew_Edit == enuEdit.Edit) { return; } //Copy hang hien tai if (bdsEmployee.Position >= 0) { Common.CopyDataRow(((DataRowView)bdsEmployee.Current).Row, ref drCurrent); } else { drCurrent = dtEmployee.NewRow(); } frmEmployee_Edit frmEdit = new frmEmployee_Edit(); frmEdit.Load(enuNew_Edit, drCurrent); //Accept if (frmEdit.isAccept) { if (enuNew_Edit == enuEdit.New) { if (bdsEmployee.Position >= 0) { dtEmployee.ImportRow(drCurrent); } else { dtEmployee.Rows.Add(drCurrent); } dtEmployee = HRMCommon.GetCustomerTable("MA_KV"); bdsEmployee.DataSource = dtEmployee; tlDmCbNv.DataSource = bdsEmployee; bdsEmployee.Position = bdsEmployee.Find("MA_CBNV", drCurrent["MA_CBNV"]); } else { Common.CopyDataRow(drCurrent, ((DataRowView)bdsEmployee.Current).Row); } dtEmployee.AcceptChanges(); } }
private void FillData(string strKey) { //dtEmployee = SQLExec.ExecuteReturnDt("EXEC Sp_GetDmCbNv"); dtEmployee = HRMCommon.GetCustomerTable("MA_KV", this.cboFill.Text); bdsEmployee.DataSource = dtEmployee; tlDmCbNv.DataSource = bdsEmployee; //bdsEmployee.Position = 0; //BHXH dtBHXH = DataTool.SQLGetDataTable("HRBHXH", null, strKey, "Ngay_Begin, Ngay_Tang_BH"); bdsBHXH.DataSource = dtBHXH; dgvBHXH.DataSource = bdsBHXH; //BHYT dtBHYT = DataTool.SQLGetDataTable("HRBHYT", null, strKey, "Ngay_Begin, Ngay_End"); bdsBHYT.DataSource = dtBHYT; dgvBHYT.DataSource = bdsBHYT; //TyLe string strSQLExec1 = "SELECT T1.*, T2.Ten_Tn, T2.Dvt FROM HRPARAVALUE0 T1 LEFT JOIN HRPARALIST T2 ON T1.Ma_Tn = T2.Ma_Tn " + " WHERE T1.Ma_Tn LIKE 'BH%' OR T1.Ma_Tn LIKE 'KP%' ORDER BY Ngay_Ap"; dtTyLe = SQLExec.ExecuteReturnDt(strSQLExec1); bdsTyLe.DataSource = dtTyLe; dgvTyLe.DataSource = bdsTyLe; //TroCap string strSQLExec2 = "SELECT T1.*, T2.Ten_Tn, T2.Dvt FROM HRPARAVALUE0 T1 LEFT JOIN HRPARALIST T2 ON T1.Ma_Tn = T2.Ma_Tn " + " WHERE T1.Ma_Tn LIKE 'PHUCAP%' ORDER BY Ngay_Ap"; dtTroCap = SQLExec.ExecuteReturnDt(strSQLExec2); bdsTroCap.DataSource = dtTroCap; dgvTroCap.DataSource = bdsTroCap; //Uy quyen cho lop co so tim kiem bdsSearch = bdsEmployee; ExportControl = tlDmCbNv; tlDmCbNv.Expand = (bool)SQLExec.ExecuteReturnValue("SELECT Expand FROM SYSZONE WHERE ZONE = '" + tlDmCbNv.strZone + "'"); }
private void FillData(string strKey) { //dtEmployee = SQLExec.ExecuteReturnDt("EXEC Sp_GetDmCbNv"); dtEmployee = HRMCommon.GetCustomerTable("MA_KV", cboFill.Text); bdsEmployee.DataSource = dtEmployee; tlDmCbNv.DataSource = bdsEmployee; //Tham số các khoản thu nhập string strSQLExec = "SELECT T1.*, T2.Ten_Tn, T2.Dvt FROM HRPARAVALUE0 T1 LEFT JOIN HRPARALIST T2 ON T1.Ma_Tn = T2.Ma_Tn " + " ORDER BY Ngay_Ap"; dtTsTn0 = SQLExec.ExecuteReturnDt(strSQLExec); bdsTsTn0.DataSource = dtTsTn0; dgvTsTn0.DataSource = bdsTsTn0; //Uy quyen cho lop co so tim kiem bdsSearch = bdsEmployee; ExportControl = tlDmCbNv; tlDmCbNv.Expand = (bool)SQLExec.ExecuteReturnValue("SELECT Expand FROM SYSZONE WHERE ZONE = '" + tlDmCbNv.strZone + "'"); }
private void FillData(string strKey) { dtEmployee = HRMCommon.GetCustomerTable("MA_KV"); bdsEmployee.DataSource = dtEmployee; tlDmCbNv.DataSource = bdsEmployee; //bdsEmployee.Position = 0; //THUE dtThue = DataTool.SQLGetDataTable("HRTHUE", null, strKey, "Nam, Thang"); bdsThue.DataSource = dtThue; dgvThue.DataSource = bdsThue; //Tham số các khoản thu nhập string strSQLExec = "SELECT T1.*, T2.Ten_Tn, T2.Dvt FROM HRPARAVALUE0 T1 LEFT JOIN HRPARALIST T2 ON T1.Ma_Tn = T2.Ma_Tn " + " ORDER BY Ngay_Ap"; //Uy quyen cho lop co so tim kiem bdsSearch = bdsEmployee; ExportControl = tlDmCbNv; tlDmCbNv.Expand = (bool)SQLExec.ExecuteReturnValue("SELECT Expand FROM SYSZONE WHERE ZONE = '" + tlDmCbNv.strZone + "'"); }
private void FillData(string strKey) { dtEmployee = HRMCommon.GetCustomerTable("MA_KV"); bdsEmployee.DataSource = dtEmployee; tlDmCbNv.DataSource = bdsEmployee; //bdsEmployee.Position = 0; //NGHIPHEP dtNghiPhep = DataTool.SQLGetDataTable("HRNGHIPHEP", null, strKey, "Ngay_Begin, Ngay_End"); bdsNghiPhep.DataSource = dtNghiPhep; dgvNghiPhep.DataSource = bdsNghiPhep; //PHEPNAM dtPhepNam = DataTool.SQLGetDataTable("HRPHEPNAM", null, strKey, "Ma_CbNv"); bdsPhepNam.DataSource = dtPhepNam; dgvPhepNam.DataSource = bdsPhepNam; //Uy quyen cho lop co so tim kiem bdsSearch = bdsEmployee; ExportControl = tlDmCbNv; tlDmCbNv.Expand = (bool)SQLExec.ExecuteReturnValue("SELECT Expand FROM SYSZONE WHERE ZONE = '" + tlDmCbNv.strZone + "'"); }
private void FillData(string strKey) { //Hashtable htPara = new Hashtable(); //htPara.Add("USERID", Element.sysUser_Id); //htPara.Add("PARENTFIELDNAME", "MA_KV"); dtEmployee = HRMCommon.GetCustomerTable("MA_KV", cboFill.Text); bdsEmployee.DataSource = dtEmployee; tlDmCbNv.DataSource = bdsEmployee; //bdsEmployee.Position = 0; //GIADINH dtGiaDinh = DataTool.SQLGetDataTable("HRGIADINH", null, strKey, "Nam_Sinh, Loai_QHGD"); bdsGiaDinh.DataSource = dtGiaDinh; dgvGiaDinh.DataSource = bdsGiaDinh; //CONGTAC //dtCongTac = DataTool.SQLGetDataTable("HRCONGTAC", null, strKey, "Ngay_Begin, Ngay_End"); dtCongTac = SQLExec.ExecuteReturnDt("SELECT * FROM HRCONGTAC ORDER BY Ngay_Begin, Ngay_End"); bdsCongTac.DataSource = dtCongTac; dgvCongTac.DataSource = bdsCongTac; //DAOTAO //dtDaoTao = DataTool.SQLGetDataTable("HRDAOTAO", null, strKey, "Ngay_Begin, Ngay_End"); dtDaoTao = SQLExec.ExecuteReturnDt("SELECT * FROM HRDAOTAO ORDER BY Ngay_Begin, Ngay_End"); bdsDaoTao.DataSource = dtDaoTao; dgvBangCap.DataSource = bdsDaoTao; //KHENTHUONG //dtKhenThuong = DataTool.SQLGetDataTable("HRKHENTHUONG", null, strKey, "Ngay_QD, Ngay_HL"); dtKhenThuong = SQLExec.ExecuteReturnDt("SELECT * FROM HRKHENTHUONG ORDER BY Ngay_QD, Ngay_HL"); bdsKhenThuong.DataSource = dtKhenThuong; dgvKhenThuong.DataSource = bdsKhenThuong; //NGHIPHEP //dtNghiPhep = DataTool.SQLGetDataTable("HRNGHIPHEP", null, strKey, "Ngay_Begin, Ngay_End"); dtNghiPhep = SQLExec.ExecuteReturnDt("SELECT * FROM HRNGHIPHEP ORDER BY Ngay_Begin, Ngay_End"); bdsNghiPhep.DataSource = dtNghiPhep; dgvNghiPhep.DataSource = bdsNghiPhep; //PHUCLOI //dtPhucLoi = DataTool.SQLGetDataTable("HRPHUCLOI", null, strKey, "Ngay_Begin, Ngay_End"); dtPhucLoi = SQLExec.ExecuteReturnDt("SELECT * FROM HRPHUCLOI ORDER BY Ngay_Begin, Ngay_End"); bdsPhucLoi.DataSource = dtPhucLoi; dgvPhucLoi.DataSource = bdsPhucLoi; //DANHGIA //dtDanhGia = DataTool.SQLGetDataTable("HRDANHGIA", null, strKey, "Ngay_DG"); dtDanhGia = SQLExec.ExecuteReturnDt("SELECT * FROM HRDANHGIA ORDER BY Ngay_DG"); bdsDanhGia.DataSource = dtDanhGia; dgvDanhGia.DataSource = bdsDanhGia; //KINHNGHIEM //dtKinhNghiem = DataTool.SQLGetDataTable("HRKINHNGHIEM", null, strKey, "Ngay_Begin, Ngay_End"); dtKinhNghiem = SQLExec.ExecuteReturnDt("SELECT * FROM HRKINHNGHIEM ORDER BY Ngay_Begin, Ngay_End"); bdsKinhNghiem.DataSource = dtKinhNghiem; dgvKinhNghiem.DataSource = bdsKinhNghiem; //KYNANG //dtKyNang = DataTool.SQLGetDataTable("HRKYNANG", null, strKey, "Ky_Nang"); dtKyNang = SQLExec.ExecuteReturnDt("SELECT * FROM HRKYNANG ORDER BY Ky_Nang"); bdsKyNang.DataSource = dtKyNang; dgvKyNang.DataSource = bdsKyNang; //TUYENDUNG //dtTuyenDung = DataTool.SQLGetDataTable("HRTUYENDUNG", null, strKey, "Ngay_Pv"); dtTuyenDung = SQLExec.ExecuteReturnDt("SELECT * FROM HRTUYENDUNG ORDER BY Ngay_Pv"); bdsTuyenDung.DataSource = dtTuyenDung; //DAOTAO dtLamViec = DataTool.SQLGetDataTable("HRLAMVIEC", null, strKey, "Ngay_Begin, Ngay_End"); bdsLamViec.DataSource = dtLamViec; dgvLamViec.DataSource = bdsLamViec; //DAOTAO dtQUALIFY = DataTool.SQLGetDataTable("HRQUALIFY", null, strKey, "Ngay_Dat"); bdsQUALIFY.DataSource = dtQUALIFY; dgvQUALIFY.DataSource = bdsQUALIFY; //Tham số các khoản thu nhập string strSQLExec = "SELECT T1.*, T2.Ten_Tn, T2.Dvt FROM HRPARAVALUE0 T1 LEFT JOIN HRPARALIST T2 ON T1.Ma_Tn = T2.Ma_Tn " + " ORDER BY Ngay_Ap"; //Uy quyen cho lop co so tim kiem bdsSearch = bdsEmployee; ExportControl = tlDmCbNv; tlDmCbNv.Expand = (bool)SQLExec.ExecuteReturnValue("SELECT Expand FROM SYSZONE WHERE ZONE = '" + tlDmCbNv.strZone + "'"); }