Exemplo n.º 1
0
        private void delete_v_dm_quyet_dinh()
        {
            if (!CGridUtils.IsThere_Any_NonFixed_Row(m_grv_dm_quyet_dinh))
            {
                return;
            }
            if (!CGridUtils.isValid_NonFixed_RowIndex(m_grv_dm_quyet_dinh, m_grv_dm_quyet_dinh.Row))
            {
                return;
            }
            if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)
            {
                return;
            }
            US_V_DM_QUYET_DINH v_us = new US_V_DM_QUYET_DINH();

            grid2us_object(v_us, m_grv_dm_quyet_dinh.Row);
            try {
                v_us.BeginTransaction();
                v_us.Delete();
                v_us.CommitTransaction();
                m_grv_dm_quyet_dinh.Rows.Remove(m_grv_dm_quyet_dinh.Row);
            } catch (Exception v_e) {
                v_us.Rollback();
                CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
                                                                              new CDBClientDBExceptionInterpret());
                v_objErrHandler.showErrorMessage();
            }
        }
Exemplo n.º 2
0
 public void display_for_update(US_V_DM_QUYET_DINH ip_m_us_v_dm_quyet_dinh)
 {
     m_e_form_mode = DataEntryFormMode.UpdateDataState;
     us_object_2_form(ip_m_us_v_dm_quyet_dinh);
     m_e_file_mode  = DataEntryFileMode.EditFile;
     m_str_link_old = m_lbl_file_name.Text;
     this.ShowDialog();
 }
Exemplo n.º 3
0
        private void us_object2grid(US_V_DM_QUYET_DINH i_us
                                    , int i_grid_row)
        {
            DataRow v_dr = (DataRow)m_grv_dm_quyet_dinh.Rows[i_grid_row].UserData;

            i_us.Me2DataRow(v_dr);
            m_obj_trans.DataRow2GridRow(v_dr, i_grid_row);
        }
Exemplo n.º 4
0
        private void grid2us_object(US_V_DM_QUYET_DINH i_us
                                    , int i_grid_row)
        {
            DataRow v_dr;

            v_dr = (DataRow)m_grv_dm_quyet_dinh.Rows[i_grid_row].UserData;
            m_obj_trans.GridRow2DataRow(i_grid_row, v_dr);
            i_us.DataRow2Me(v_dr);
        }
Exemplo n.º 5
0
        private bool trung_ma_quyet_dinh(string ip_str_ma_don_vi)
        {
            var v_ds = new DS_V_DM_QUYET_DINH();
            var v_us = new US_V_DM_QUYET_DINH();

            v_us.FillDataset_By_Ma_qd(v_ds, ip_str_ma_don_vi);
            decimal v_count = v_ds.V_DM_QUYET_DINH.Count;

            if (v_count > 0)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 6
0
        private bool check_trung_ma_quyet_dinh(string ip_str_ma_quyet_dinh)
        {
            DS_V_DM_QUYET_DINH v_ds = new DS_V_DM_QUYET_DINH();
            US_V_DM_QUYET_DINH v_us = new US_V_DM_QUYET_DINH();
            decimal            count_ma_quyet_dinh;

            v_us.FillDataset_By_Ma_qd(v_ds, ip_str_ma_quyet_dinh);
            count_ma_quyet_dinh = v_ds.V_DM_QUYET_DINH.Count;
            if (count_ma_quyet_dinh > 0)
            {
                return(false);
            }
            return(true);
        }
Exemplo n.º 7
0
 private void update_v_gd_quyet_dinh()
 {
     if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg))
     {
         return;
     }
     if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row))
     {
         return;
     }
     if (m_fg.Rows[m_fg.Row].UserData != null)
     {
         grid2us_object(m_us, m_fg.Row);
         US_V_DM_QUYET_DINH      v_us  = new US_V_DM_QUYET_DINH(m_us.dcID);
         F600_V_DM_QUYET_DINH_DE v_fDE = new F600_V_DM_QUYET_DINH_DE();
         v_fDE.display_for_update(v_us);
         load_data_2_grid();
     }
 }
Exemplo n.º 8
0
        private void us_object_2_form(US_V_DM_QUYET_DINH ip_us_v_dm_quyet_dinh)
        {
            m_us.dcID = ip_us_v_dm_quyet_dinh.dcID;

            //m_txt_link.Text = ip_us_v_dm_quyet_dinh.strLINK;
            m_txt_ma_quyet_dinh.Text = ip_us_v_dm_quyet_dinh.strMA_QUYET_DINH;
            m_txt_noi_dung.Text      = ip_us_v_dm_quyet_dinh.strNOI_DUNG;
            if (ip_us_v_dm_quyet_dinh.datNGAY_HET_HIEU_LUC.Year > 1900)
            {
                m_dat_ngay_het_hieu_luc.Value = ip_us_v_dm_quyet_dinh.datNGAY_HET_HIEU_LUC;
            }
            else
            {
                m_dat_ngay_het_hieu_luc.Checked = false;
            }
            if (ip_us_v_dm_quyet_dinh.datNGAY_CO_HIEU_LUC.Year > 1900)
            {
                m_dat_ngay_co_hieu_luc.Value = ip_us_v_dm_quyet_dinh.datNGAY_CO_HIEU_LUC;
            }
            else
            {
                m_dat_ngay_co_hieu_luc.Checked = false;
            }
            if (ip_us_v_dm_quyet_dinh.datNGAY_KY.Year > 1900)
            {
                m_dat_ngay_ky.Value = ip_us_v_dm_quyet_dinh.datNGAY_KY;
            }
            else
            {
                m_dat_ngay_ky.Checked = false;
            }

            m_cbo_loai_quyet_dinh.SelectedValue = ip_us_v_dm_quyet_dinh.dcID_LOAI_QD;
            m_str_link_old       = ip_us_v_dm_quyet_dinh.strLINK;
            m_lbl_file_name.Text = ip_us_v_dm_quyet_dinh.strLINK;
            if (ip_us_v_dm_quyet_dinh.strLINK == "")
            {
                return;
            }
            string[] v_strs = ip_us_v_dm_quyet_dinh.strLINK.Split('\\');
        }
Exemplo n.º 9
0
 internal void display(US_V_DM_QUYET_DINH m_us)
 {
     throw new NotImplementedException();
 }