private void xoa_lop_mon(decimal v_count)
        {
            for (int i = 0; i < v_count; i++)
            {
                var v_data_row = m_grv.GetDataRow(m_grv.GetSelectedRows()[i]);
                US_GD_LOP_MON v_us_gd_lop_mon = new US_GD_LOP_MON(CIPConvert.ToDecimal(v_data_row["ID"].ToString()));
                decimal v_dc_id_lop_mon = CIPConvert.ToDecimal(v_us_gd_lop_mon.dcID.ToString());
                DataSet v_ds = new DataSet();
                v_ds.Tables.Add(new DataTable());
                US_DUNG_CHUNG v_us_dc = new US_DUNG_CHUNG();
                v_us_dc.FillDatasetWithQuery(v_ds, "Select * from gd_diem where id_lop_mon=" + v_dc_id_lop_mon.ToString());
                if (v_ds.Tables[0].Rows.Count > 0)
                {
                    for (int j = 0; j < v_ds.Tables[0].Rows.Count; j++)
                    {

                        var v_id_gdd = CIPConvert.ToDecimal(v_ds.Tables[0].Rows[j]["ID"].ToString());
                        var v_us_gdd= new US_GD_DIEM(v_id_gdd);
                         var v_ds_gdd = new DataSet();
                         v_ds_gdd.Tables.Add(new DataTable());
                         v_us_dc.FillDatasetWithQuery(v_ds_gdd, "Select * from gd_chung_chi where id_gd_diem=" + v_id_gdd.ToString());
                         if (v_ds_gdd.Tables[0].Rows.Count > 0)
                        {
                            var v_dtr_gdcc = v_ds_gdd.Tables[0].Rows[0];
                            var v_us_gdcc = new US_GD_CHUNG_CHI(CIPConvert.ToDecimal(v_dtr_gdcc["ID"].ToString()));
                            v_us_gdcc.strDA_XOA = "Y";
                            v_us_gdcc.Update();
                        }
                        v_us_gdd.strDA_XOA = "Y";
                        v_us_gdd.Update();
                    }
                }

                v_us_gd_lop_mon.strDA_XOA = "Y";
                v_us_gd_lop_mon.Update();
            }
        }
 private void update_lop_mon(DataRow v_dr)
 {
     US_GD_LOP_MON v_us = new US_GD_LOP_MON(CIPConvert.ToDecimal(v_dr[GD_LOP_MON.ID].ToString()));
     if (v_dr[GD_LOP_MON.DIEM_QUA_MON].ToString().Trim() != "")
     {
         v_us.dcDIEM_QUA_MON = CIPConvert.ToDecimal(v_dr[GD_LOP_MON.DIEM_QUA_MON].ToString());
     }
     if (v_dr[GD_LOP_MON.THOI_GIAN].ToString().Trim() != "")
     {
         v_us.datTHOI_GIAN = (DateTime)v_dr[GD_LOP_MON.THOI_GIAN];
     }
     if (v_dr[GD_LOP_MON.DIA_DIEM].ToString().Trim() != "")
     {
         v_us.strDIA_DIEM = v_dr[GD_LOP_MON.DIA_DIEM].ToString();
     }
     if (v_dr[GD_LOP_MON.SO_LUONG].ToString().Trim() != "")
     {
         v_us.dcSO_LUONG = CIPConvert.ToDecimal(v_dr[GD_LOP_MON.SO_LUONG].ToString());
     }
     v_us.Update();
 }