public US_V_GD_CONG_TAC(decimal i_dbID) { pm_objDS = new DS_V_GD_CONG_TAC(); pm_strTableName = c_TableName; IMakeSelectCmd v_objMkCmd = new CMakeAndSelectCmd(pm_objDS, c_TableName); v_objMkCmd.AddCondition("ID", i_dbID, eKieuDuLieu.KieuNumber, eKieuSoSanh.Bang); SqlCommand v_cmdSQL; v_cmdSQL = v_objMkCmd.getSelectCmd(); this.FillDatasetByCommand(pm_objDS, v_cmdSQL); pm_objDR = getRowClone(pm_objDS.Tables[pm_strTableName].Rows[0]); }
private void add_new_nhan_su_to_grid(US_V_GD_CONG_TAC ip_us, int ip_index) { DS_V_GD_CONG_TAC v_ds = new DS_V_GD_CONG_TAC(); var v_dr = v_ds.V_GD_CONG_TAC.NewRow(); v_dr[V_GD_CONG_TAC.MA_NV] = ip_us.strMA_NV; v_dr[V_GD_CONG_TAC.HO_DEM] = ip_us.strHO_DEM; v_dr[V_GD_CONG_TAC.TEN] = ip_us.strTEN; v_dr[V_GD_CONG_TAC.NGAY_DI] = ip_us.datNGAY_DI; v_dr[V_GD_CONG_TAC.NGAY_VE] = ip_us.datNGAY_VE; v_dr[V_GD_CONG_TAC.DIA_DIEM] = ip_us.strDIA_DIEM; v_dr[V_GD_CONG_TAC.NOI_DUNG] = ip_us.strNOI_DUNG; v_dr[V_GD_CONG_TAC.ID_NHAN_SU] = ip_us.dcID_NHAN_SU; ip_us.Me2DataRow(v_dr); m_obj_trans.DataRow2GridRow(v_dr, ip_index); v_dr[V_GD_CONG_TAC.MA_QUYET_DINH] = m_txt_ma_quyet_dinh.Text; m_fg.Rows[ip_index].UserData = v_dr; }
private void chon_quyet_dinh() { m_e_form_mode = DataEntryFormMode.UpdateDataState; m_grb_quyet_dinh.Enabled = true; f600_v_dm_quyet_dinh v_frm = new f600_v_dm_quyet_dinh(); v_frm.select_data(CHON_QUYET_DINH.CONG_TAC, ref m_us_dm_quyet_dinh); if (m_us_dm_quyet_dinh.dcID == -1) { return; } m_grb_quyet_dinh.Enabled = false; // Dùng QĐ vừa có để lấy ra Quyết định công tác (GD_CONG_TAC) var v_us = new US_V_GD_CONG_TAC(); var v_ds = new DS_V_GD_CONG_TAC(); v_us.FillDatasetSearchByIdQuyetDinh(v_ds, m_us_dm_quyet_dinh.dcID); v_us.DataRow2Me(v_ds.V_GD_CONG_TAC.Rows[0]); us_quyet_dinh_to_form(v_us); }
public DS_V_GD_CONG_TAC LayDanhSachNhanVienKiemNhiem(DateTime ip_dat_tu_ngay, DateTime ip_dat_den_ngay) { CStoredProc v_sp = new CStoredProc("pr_lay_danh_sach_nhan_vien_bo_nhiem"); DS_V_GD_CONG_TAC v_ds = new DS_V_GD_CONG_TAC(); v_ds.EnforceConstraints = false; v_sp.addDatetimeInputParam("@ip_dat_tu_ngay", ip_dat_tu_ngay); v_sp.addDatetimeInputParam("@ip_dat_den_ngay", ip_dat_den_ngay); v_sp.fillDataSetByCommand(this, v_ds); return v_ds; }
public US_V_GD_CONG_TAC() { pm_objDS = new DS_V_GD_CONG_TAC(); pm_strTableName = c_TableName; pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow(); }
//Clear data in form private void clear_data_in_form() { m_sle_chon_nhan_vien.EditValue = null; m_sle_chon_quyet_dinh.EditValue = null; m_sle_chon_don_vi.EditValue = null; m_sle_chon_vi_tri.EditValue = null; m_sle_chon_loai_cong_tac.EditValue = null; DS_V_GD_CONG_TAC v_ds = new DS_V_GD_CONG_TAC(); m_grc_v_gd_cong_tac.DataSource = v_ds.Tables[0]; }
//---------------------------------------------******----------------------------------------------------// /****Li lich nhan vien****/ /*****/ /****/ /***/ /**/ private decimal find_id_gd_ct(decimal ip_dc_id_nv) { US_V_GD_CONG_TAC v_us = new US_V_GD_CONG_TAC(); DS_V_GD_CONG_TAC v_ds = new DS_V_GD_CONG_TAC(); v_ds.EnforceConstraints = false; v_us.FillDataset(v_ds); string v_str_filter = "ID_NHAN_VIEN = " + ip_dc_id_nv + " AND ID_LOAI_CONG_TAC = " + CONST_ID_LOAI_CONG_TAC.CHINH_THUC; DataRow[] v_dr = v_ds.V_GD_CONG_TAC.Select(v_str_filter); if (v_dr.Count() == 0) { return -1; } else { return CIPConvert.ToDecimal(v_dr.First()["ID"].ToString()); } }
public DS_V_GD_CONG_TAC XemQuaTrinhCongTac(string ip_str_ma_nv) { CStoredProc v_sp = new CStoredProc("pr_xem_qua_trinh_cong_tac"); v_sp.addNVarcharInputParam("@ip_str_ma_nv", ip_str_ma_nv); DS_V_GD_CONG_TAC v_op_ds = new DS_V_GD_CONG_TAC(); v_op_ds.EnforceConstraints = false; v_sp.fillDataSetByCommand(this, v_op_ds); return v_op_ds; }