private void delete_gd_lcd(decimal v_id_hop_dong)
 {
     US_GD_LUONG_CHE_DO v_us = new US_GD_LUONG_CHE_DO();
     DS_GD_LUONG_CHE_DO v_ds = new DS_GD_LUONG_CHE_DO();
     v_us.FillDataset(v_ds, "where id_hop_dong = " + v_id_hop_dong);
     for (int i = 0; i < v_ds.Tables[0].Rows.Count; i++)
     {
         decimal v_id_gd_lcd = Convert.ToDecimal(v_ds.Tables[0].Rows[i]["ID"]);
         v_us = new US_GD_LUONG_CHE_DO(v_id_gd_lcd);
         v_us.Delete();
     }
 }
        private decimal find_id_gd_lcd(decimal ip_dc_id_gd_hd)
        {
            try
            {
                US_GD_LUONG_CHE_DO v_us = new US_GD_LUONG_CHE_DO();
                DS_GD_LUONG_CHE_DO v_ds = new DS_GD_LUONG_CHE_DO();

                v_us.FillDataset(v_ds);

                string v_str_filter = "ID_HOP_DONG = " + ip_dc_id_gd_hd + " AND DA_XOA = 'N'";
                DataRow[] v_dr = v_ds.GD_LUONG_CHE_DO.Select(v_str_filter);

                if (v_dr.Count() == 0)
                {
                    return -1;
                }
                else
                {
                    return CIPConvert.ToDecimal(v_dr.First()["ID"].ToString());
                }
            }
            catch (Exception v_e)
            {
                throw v_e;
            }
        }