private bool check_quy_tien_dang_su_dung_yn(decimal id_quy_tnk)
 {
     US_GD_THU_NHAP_KHAC v_us_gd_tnk = new US_GD_THU_NHAP_KHAC();
     DS_GD_THU_NHAP_KHAC v_ds_gd_tnk = new DS_GD_THU_NHAP_KHAC();
     v_us_gd_tnk.LayDuLieuThuNhapKhacTheoIDQuy(v_ds_gd_tnk, id_quy_tnk);
     if (v_ds_gd_tnk.Tables[0].Rows.Count != 0)
         return true;
     else return false;
 }
 private void delete_gd_thu_nhap_khac(US_GD_QUY_THU_NHAP_KHAC v_us_gd_quy_tnk)
 {
     US_GD_THU_NHAP_KHAC v_us = new US_GD_THU_NHAP_KHAC();
     DS_GD_THU_NHAP_KHAC v_ds = new DS_GD_THU_NHAP_KHAC();
     v_us.XoaTNKTheoIDQuy(v_us_gd_quy_tnk.dcID);
     //for (int i = 0; i < m_dt_thu_nhap_khac.Rows.Count; i++)
     //{
     //    US_GD_THU_NHAP_KHAC v_us = new US_GD_THU_NHAP_KHAC(decimal.Parse(m_dt_thu_nhap_khac.Rows[i][0].ToString()));
     //    v_us.Delete();
     //}
 }
 public US_GD_THU_NHAP_KHAC(decimal i_dbID)
 {
     pm_objDS = new DS_GD_THU_NHAP_KHAC();
     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 check_quy_tien_dang_su_dung_yn(US_GD_QUY_THU_NHAP_KHAC v_us)
 {
     m_dt_thu_nhap_khac.Clear();
     US_GD_THU_NHAP_KHAC v_us_gd_tnk = new US_GD_THU_NHAP_KHAC();
     DS_GD_THU_NHAP_KHAC v_ds_gd_tnk = new DS_GD_THU_NHAP_KHAC();
     v_us_gd_tnk.LayDuLieuThuNhapKhacTheoIDQuy(v_ds_gd_tnk, v_us.dcID);
     if (v_ds_gd_tnk.Tables[0].Rows.Count != 0)
     {
         m_dt_thu_nhap_khac = v_ds_gd_tnk.Tables[0];
         return true;
     }
     else return false;
 }
        private void focus_new_row_created(decimal v_id_gd_thu_nhap_khac)
        {
            int v_row_index = 0;
            decimal v_id_gd_moi_lap = 0;

            US_GD_THU_NHAP_KHAC v_us = new US_GD_THU_NHAP_KHAC();
            DS_GD_THU_NHAP_KHAC v_ds = new DS_GD_THU_NHAP_KHAC();

            v_id_gd_moi_lap = v_id_gd_thu_nhap_khac;

            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_gd_qd = CIPConvert.ToDecimal(m_grv_quan_ly_thu_nhap_khac.GetDataRow(v_row_index)["ID"].ToString());

                if (v_id_gd_qd == v_id_gd_moi_lap)
                {
                    break;
                }
            }

            m_grv_quan_ly_thu_nhap_khac.FocusedRowHandle = v_row_index;
        }
 public US_GD_THU_NHAP_KHAC()
 {
     pm_objDS = new DS_GD_THU_NHAP_KHAC();
     pm_strTableName = c_TableName;
     pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow();
 }
 public void FillDatasetTheoQuyThangNam(DS_GD_THU_NHAP_KHAC v_ds, string ip_id_quy_tnk, string ip_thang, string ip_nam)
 {
     CStoredProc v_cstore = new CStoredProc("pr_TNK_thu_nhap_getTheoDK");
     v_cstore.addDecimalInputParam("@thang", ip_thang);
     v_cstore.addDecimalInputParam("@nam", ip_nam);
     v_cstore.addDecimalInputParam("@id_quy_tnk", ip_id_quy_tnk);
     v_cstore.fillDataSetByCommand(this, v_ds);
 }