public US_V_F320_LAP_HOP_DONG(decimal i_dbID) { pm_objDS = new DS_V_F320_LAP_HOP_DONG(); 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 load_data_2_grid(decimal ip_dc_id_nhan_vien) { CHRMCommon.make_stt(m_grv_lap_hd); DS_V_F320_LAP_HOP_DONG v_ds = new DS_V_F320_LAP_HOP_DONG(); US_V_F320_LAP_HOP_DONG v_us = new US_V_F320_LAP_HOP_DONG(); //string v_current_date = DateTime.Now.Date.ToShortDateString(); //v_us.FillDataset(v_ds, "WHERE ID_NHAN_VIEN = " + ip_dc_id_nhan_vien + " AND NGAY_BAT_DAU <= '" + v_current_date + "' AND (NGAY_KET_THUC >= '" + v_current_date + "' OR NGAY_KET_THUC IS NULL)"); v_us.FillDataset_by_ngay_hien_tai(v_ds, ip_dc_id_nhan_vien); m_grc_lap_hd.DataSource = v_ds.Tables[0]; }
private void focus_new_row_created() { int v_row_index = 0; decimal v_id_nv_f330 = 0; string v_da_xoa_f340 = "N"; US_V_F320_LAP_HOP_DONG v_us = new US_V_F320_LAP_HOP_DONG(); DS_V_F320_LAP_HOP_DONG v_ds = new DS_V_F320_LAP_HOP_DONG(); v_id_nv_f330 = CIPConvert.ToDecimal(m_sle_chon_nhan_vien.EditValue); v_us.FillDataset(v_ds); for (v_row_index = 0; v_row_index < v_ds.Tables[0].Rows.Count; v_row_index++) { var v_id_nv = CIPConvert.ToDecimal(m_grv_lap_hd.GetDataRow(v_row_index)["ID_NHAN_VIEN"].ToString()); var v_da_xoa = m_grv_lap_hd.GetDataRow(v_row_index)["DA_XOA"].ToString(); if (v_id_nv == v_id_nv_f330 && v_da_xoa == v_da_xoa_f340) { break; } } m_grv_lap_hd.FocusedRowHandle = v_row_index; }
public US_V_F320_LAP_HOP_DONG() { pm_objDS = new DS_V_F320_LAP_HOP_DONG(); pm_strTableName = c_TableName; pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow(); }
public void FillDataset_by_ngay_hien_tai(DS_V_F320_LAP_HOP_DONG v_ds, decimal ip_dc_id_nhan_vien) { CStoredProc v_sp = new CStoredProc("pr_V_F320_LAP_HOP_DONG_by_id_nv_and_date"); v_sp.addDecimalInputParam("@ip_dc_id_nhan_vien", ip_dc_id_nhan_vien); v_sp.fillDataSetByCommand(this, v_ds); }
public void FillDataset_by_ngay_hien_tai(DS_V_F320_LAP_HOP_DONG v_ds) { CStoredProc v_sp = new CStoredProc("pr_V_F320_LAP_HOP_DONG_by_date"); v_sp.fillDataSetByCommand(this, v_ds); }