public US_RPT_LUONG(decimal i_dbID) { pm_objDS = new DS_RPT_LUONG(); 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 bool bang_luong_thang_do_da_tinh(decimal v_id_nhan_vien, int ip_dat_thang, int ip_dat_nam) { DS_RPT_LUONG v_ds = new DS_RPT_LUONG(); US_RPT_LUONG v_us = new US_RPT_LUONG(); v_us.FillDataset(v_ds, "WHERE ID_NHAN_VIEN = " + v_id_nhan_vien + " AND THANG = " + ip_dat_thang + " AND NAM = " + ip_dat_nam + ""); if (v_ds.Tables[0].Rows.Count != 0) { return true; } else return false; }
private void Update_luong_nv_2_rpt_bang_luong(decimal v_id_nhan_vien) { DS_RPT_LUONG v_ds = new DS_RPT_LUONG(); DataRow v_dr_luong = CHRMCommon.get_luong_1_nhan_vien(v_id_nhan_vien, int.Parse(m_dat_ngay_cham_cong.Value.Month.ToString()), int.Parse(m_dat_ngay_cham_cong.Value.Year.ToString())); var v_dr_luong_nv = v_ds.Tables[0].NewRow(); int v_id_rpt_luong = find_id_rpt_luong(v_id_nhan_vien, int.Parse(m_dat_ngay_cham_cong.Value.Month.ToString()), int.Parse(m_dat_ngay_cham_cong.Value.Year.ToString())); DataRow v_dr_luong_1_nv = CHRMCommon.get_dr(v_dr_luong_nv, v_dr_luong, v_id_nhan_vien, v_id_rpt_luong, int.Parse(m_dat_ngay_cham_cong.Value.Month.ToString()), int.Parse(m_dat_ngay_cham_cong.Value.Year.ToString())); v_ds.Tables[0].Rows.Add(v_dr_luong_1_nv); CHRMCommon.update_luong_1NV_2_rpt(v_id_rpt_luong, v_dr_luong_1_nv); }
private int find_id_rpt_luong(decimal v_id_nhan_vien, int ip_dat_thang, int ip_dat_nam) { DS_RPT_LUONG v_ds = new DS_RPT_LUONG(); US_RPT_LUONG v_us = new US_RPT_LUONG(); v_us.FillDataset(v_ds); string v_str_filter = "ID_NHAN_VIEN = " + v_id_nhan_vien + " AND THANG = " + ip_dat_thang + " AND NAM = " + ip_dat_nam; DataRow[] v_dr = v_ds.RPT_LUONG.Select(v_str_filter); if (v_dr.Count() == 0) { return -1; } else { return int.Parse(v_dr.First()["ID"].ToString()); } }
public void Get_tat_ca_nhan_vien_can_tinh_luong_thao_tac_lai(out DS_RPT_LUONG op_ds, decimal ip_thang, decimal ip_nam) { op_ds = new DS_RPT_LUONG(); op_ds.EnforceConstraints = false; CStoredProc v_sp = new CStoredProc("pr_GET_DANH_SACH_NHAN_VIEN_TINH_LUONG_THAO_TAC_LAI"); v_sp.addDecimalInputParam("@THANG", ip_thang); v_sp.addDecimalInputParam("@NAM", ip_nam); v_sp.fillDataSetByCommand(this, op_ds); }
public US_RPT_LUONG() { pm_objDS = new DS_RPT_LUONG(); pm_strTableName = c_TableName; pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow(); }