private void form_2_us_object() { m_us.strMA_HOP_DONG = m_txt_ma_hop_dong.Text.Trim(); m_us.dcID_LOAI_HOP_DONG = (decimal)m_cbo_loai_hop_dong.SelectedValue; m_us.dcID_PHAP_NHAN = CAppContext_201.getCurrentIDPhapnhan(); m_us.datNGAY_CO_HIEU_LUC = m_dat_ngay_co_hieu_luc.Value; m_us.strTRANG_THAI_HOP_DONG = m_cbo_trang_thai.SelectedIndex.Equals(0) ? "Y" : "N"; m_us.strNGUOI_KY = m_txt_nguoi_ky.Text.Trim(); m_us.strCHUC_VU_NGUOI_KY = m_txt_chuc_vu_nguoi_ky.Text.Trim(); m_us.datNGAY_KY_HOP_DONG = m_dat_ngay_ky_hop_dong.Value; if (m_us_dm_nhan_su.dcID == -1) { DS_DM_NHAN_SU m_ds_dm_nhan_su = new DS_DM_NHAN_SU(); m_us_dm_nhan_su.FillDataset_search_by_ma_nv(m_ds_dm_nhan_su, m_lbl_ma_nhan_vien.Text); m_us.dcID_NHAN_SU = (decimal)m_ds_dm_nhan_su.Tables[0].Rows[0].ItemArray[0]; } else { m_us.dcID_NHAN_SU = m_us_dm_nhan_su.dcID; } if (m_dat_ngay_het_han.Checked == false) { m_us.SetNGAY_HET_HANNull(); } else { m_us.datNGAY_HET_HAN = m_dat_ngay_het_han.Value; } m_us.strLINK = m_lbl_file_name.Text; }
private void load_info_staff_to_form() { string[] v_strs = m_txt_tim_kiem_nhan_vien.Text.Split('-'); DS_DM_NHAN_SU v_ds_dm_nhan_su = new DS_DM_NHAN_SU(); m_us_dm_nhan_su.FillDataset_search_by_ma_nv(v_ds_dm_nhan_su, v_strs[v_strs.Length - 1].Trim()); if (v_ds_dm_nhan_su.Tables[0].Rows.Count == 0) { return; } m_us_dm_nhan_su.DataRow2Me(v_ds_dm_nhan_su.DM_NHAN_SU.Rows[0]); load_info_staff(m_us_dm_nhan_su); // DucVT // Lấy chức vụ bằng Id nhân sự DS_V_GD_QUA_TRINH_LAM_VIEC v_ds_gd_qtlv = new DS_V_GD_QUA_TRINH_LAM_VIEC(); US_V_GD_QUA_TRINH_LAM_VIEC v_us_gd_qtlv = new US_V_GD_QUA_TRINH_LAM_VIEC(); v_us_gd_qtlv.FillDataSet_Now_By_Ma_NV_Id_PN(v_ds_gd_qtlv, v_ds_dm_nhan_su.DM_NHAN_SU.Rows[0][DM_NHAN_SU.MA_NV].ToString(), CAppContext_201.getCurrentIDPhapnhan()); if (v_ds_gd_qtlv.V_GD_QUA_TRINH_LAM_VIEC.Rows.Count > 0) { m_lbl_ma_chuc_vu.Text = v_ds_gd_qtlv.V_GD_QUA_TRINH_LAM_VIEC.Rows[0][V_GD_QUA_TRINH_LAM_VIEC.MA_CV].ToString(); m_lbl_ma_don_vi.Text = v_ds_gd_qtlv.V_GD_QUA_TRINH_LAM_VIEC.Rows[0][V_GD_QUA_TRINH_LAM_VIEC.MA_DON_VI].ToString(); } // ~DucVT }
private void chon_nhan_su() { DS_DM_NHAN_SU v_ds_dm_nhan_su = new DS_DM_NHAN_SU(); US_DM_NHAN_SU v_us_dm_nhan_su = new US_DM_NHAN_SU(); v_us_dm_nhan_su.FillDataset_search_by_ma_nv(v_ds_dm_nhan_su, m_txt_ma_nv.Text.Trim()); if (v_ds_dm_nhan_su.Tables[0].Rows.Count == 0) { return; } m_txt_ho_ten.Text = v_ds_dm_nhan_su.Tables[0].Rows[0]["HO_DEM"] + " " + v_ds_dm_nhan_su.Tables[0].Rows[0]["TEN"]; }
private void chon_nhan_su() { string[] v_strs = m_txt_ma_ns.Text.Split('-'); DS_DM_NHAN_SU v_ds_dm_nhan_su = new DS_DM_NHAN_SU(); US_DM_NHAN_SU v_us_dm_nhan_su = new US_DM_NHAN_SU(); v_us_dm_nhan_su.FillDataset_search_by_ma_nv(v_ds_dm_nhan_su, v_strs[v_strs.Length - 1].Trim()); if (v_ds_dm_nhan_su.Tables[0].Rows.Count == 0) { return; } m_lbl_ma_nhan_vien.Text = v_ds_dm_nhan_su.Tables[0].Rows[0]["MA_NV"].ToString(); m_lbl_ho_va_ten.Text = v_ds_dm_nhan_su.Tables[0].Rows[0]["HO_DEM"] + " " + v_ds_dm_nhan_su.Tables[0].Rows[0]["TEN"]; m_lbl_ngay_sinh.Text = v_ds_dm_nhan_su.Tables[0].Rows[0]["NGAY_SINH"].ToString().Split(' ')[0]; m_lbl_dia_chi.Text = v_ds_dm_nhan_su.Tables[0].Rows[0]["CHO_O"].ToString(); }
private void form_2_us_nhan_vien() { m_us.dcID_DU_AN = m_us_du_an.dcID; m_us.strMA_DU_AN = m_us_du_an.strMA_DU_AN; m_us.strTEN_DU_AN = m_us_du_an.strTEN_DU_AN; US_DM_NHAN_SU v_us_nhan_su = new US_DM_NHAN_SU(); DS_DM_NHAN_SU v_ds_nhan_su = new DS_DM_NHAN_SU(); v_us_nhan_su.FillDataset_search_by_ma_nv(v_ds_nhan_su, m_lbl_ma_nhan_vien.Text); if (v_ds_nhan_su.DM_NHAN_SU.Rows.Count > 0) { m_us.dcID_NHAN_SU = (decimal)v_ds_nhan_su.DM_NHAN_SU.Rows[0][DM_NHAN_SU.ID]; m_us.strMA_NV = v_ds_nhan_su.DM_NHAN_SU.Rows[0][DM_NHAN_SU.MA_NV].ToString(); m_us.strHO_DEM = v_ds_nhan_su.DM_NHAN_SU.Rows[0][DM_NHAN_SU.HO_DEM].ToString(); m_us.strTEN = v_ds_nhan_su.DM_NHAN_SU.Rows[0][DM_NHAN_SU.TEN].ToString(); } m_us.dcID_VI_TRI = (decimal)m_cbo_vi_tri.SelectedValue; m_us.strVI_TRI = m_cbo_vi_tri.Text; US_V_GD_TRANG_THAI_LAO_DONG v_us_trang_thai_ld = new US_V_GD_TRANG_THAI_LAO_DONG(); DS_V_GD_TRANG_THAI_LAO_DONG v_ds_trang_thai_ld = new DS_V_GD_TRANG_THAI_LAO_DONG(); v_us_trang_thai_ld.FillDatasetByManhanvien_trang_thai_hien_tai(v_ds_trang_thai_ld, m_lbl_ma_nhan_vien.Text, CAppContext_201.getCurrentIDPhapnhan()); if (v_ds_trang_thai_ld.V_GD_TRANG_THAI_LAO_DONG.Rows.Count > 0) { m_us.strTRANG_THAI_LAO_DONG = v_ds_trang_thai_ld.V_GD_TRANG_THAI_LAO_DONG.Rows[0][V_GD_TRANG_THAI_LAO_DONG.TRANG_THAI_LAO_DONG].ToString(); } m_us.datTHOI_DIEM_TG = m_dat_tham_gia.Value; m_us.datTHOI_DIEM_KT = m_dat_ngay_kt.Value; m_us.dcTHOI_GIAN_TG = CIPConvert.ToDecimal(m_txt_thoi_gian_tham_gia.Text); m_us.dcID_DANH_HIEU = (decimal)m_cbo_danh_hieu.SelectedValue; m_us.strDANH_HIEU = m_cbo_danh_hieu.Text; m_us.strMA_QUYET_DINH = m_txt_ma_quyet_dinh.Text; m_us.strLOAI_QD = m_lbl_loai_quyet_dinh.Text; m_us.strMO_TA = m_txt_mo_ta.Text; }
private void form_to_us_object_v_trang_thai_ld() { //m_us_trang_thai_ld.dcID = m_us_v_trang_thai_ld.dcID; //m_us_trang_thai_ld.dcID_NHAN_SU = m_us_v_trang_thai_ld.dcID_NHAN_SU; if (m_us_v_trang_thai_ld.dcID == 0) { DS_DM_NHAN_SU v_ds_dm_nhan_su = new DS_DM_NHAN_SU(); US_DM_NHAN_SU v_us_dm_nhan_su = new US_DM_NHAN_SU(); v_us_dm_nhan_su.FillDataset_search_by_ma_nv(v_ds_dm_nhan_su, m_txt_ma_nv.Text); m_us_v_trang_thai_ld.dcID_NHAN_SU = (decimal)v_ds_dm_nhan_su.Tables[0].Rows[0].ItemArray[0]; } m_us_v_trang_thai_ld.dcID_PHAP_NHAN = CAppContext_201.getCurrentIDPhapnhan(); m_us_v_trang_thai_ld.dcID_TRANG_LAO_DONG = CIPConvert.ToDecimal(m_cbo_trang_thai_moi.SelectedValue); if (m_txt_ma_quyet_dinh.Text.Trim() != "") { m_us_v_trang_thai_ld.dcID_QUYET_DINH = m_us_quyet_dinh.dcID; } else { m_us_v_trang_thai_ld.SetID_QUYET_DINHNull(); } m_us_v_trang_thai_ld.datNGAY_CO_HIEU_LUC = m_dat_ngay_co_hieu_luc.Value; if (m_dat_ngay_het_hieu_luc.Checked) { m_us_v_trang_thai_ld.datNGAY_HET_HIEU_LUC = m_dat_ngay_het_hieu_luc.Value; } else { m_us_v_trang_thai_ld.SetNGAY_HET_HIEU_LUCNull(); } if (m_ckb_trang_thai_hien_tai_yn.Checked == true) { m_us_v_trang_thai_ld.strTRANG_THAI_HIEN_TAI = "Y"; } else { m_us_v_trang_thai_ld.strTRANG_THAI_HIEN_TAI = "N"; } }