private decimal get_so_luong_cham_cong() { US_GD_CHAM_CONG_LAM_THEM v_us = new US_GD_CHAM_CONG_LAM_THEM(); DS_GD_CHAM_CONG_LAM_THEM v_ds = new DS_GD_CHAM_CONG_LAM_THEM(); v_us.FillDatasetGetChamCongTheoThang(v_ds, m_txt_thang.Text, m_txt_nam.Text); return v_ds.Tables[0].Rows.Count; }
private void insert_gd_cham_cong_lam_them() { for (int i = 0; i < m_grv.RowCount; i++) { var v_dr = m_grv.GetDataRow(i); US_GD_CHAM_CONG_LAM_THEM v_us = new US_GD_CHAM_CONG_LAM_THEM(); v_us.dcID_NHAN_VIEN = get_id_nv_by_ma_nv(v_dr[0].ToString()); v_us.dcTHANG = decimal.Parse(m_txt_thang.Text); v_us.dcNAM = decimal.Parse(m_txt_nam.Text); v_us.dcSO_NGAY_LAM_THEM = decimal.Parse(v_dr[4].ToString()); v_us.UseTransOfUSObject(m_us); m_us = v_us; v_us.Insert(); } m_us.CommitTransaction(); }
private void delete_du_lieu_cu() { US_GD_CHAM_CONG_LAM_THEM v_us = new US_GD_CHAM_CONG_LAM_THEM(); v_us.BeginTransaction(); m_us = v_us; v_us.DeleteAllChamCongLamThemThang(Convert.ToDecimal(m_txt_thang.Text), Convert.ToDecimal(m_txt_nam.Text)); }