private void load_data_2_cbo_nhom_nguoi_dung() { //US_HT_NHOM_NGUOI_SU_DUNG v_us_nhom_nguoi_dung = new US_HT_NHOM_NGUOI_SU_DUNG(); //DS_HT_NHOM_NGUOI_SU_DUNG v_ds_nhom_nguoi_dung = new DS_HT_NHOM_NGUOI_SU_DUNG(); //v_us_nhom_nguoi_dung.FillDataset(v_ds_nhom_nguoi_dung); //v_ds_nhom_nguoi_dung.EnforceConstraints = false; US_HT_USER_GROUP v_us_nhom_nguoi_dung = new US_HT_USER_GROUP(); DS_HT_USER_GROUP v_ds_nhom_nguoi_dung = new DS_HT_USER_GROUP(); v_us_nhom_nguoi_dung.FillDataset(v_ds_nhom_nguoi_dung); v_ds_nhom_nguoi_dung.EnforceConstraints = false; m_cbo_nhom_quyen.ValueMember = HT_USER_GROUP.ID; m_cbo_nhom_quyen.DisplayMember = HT_USER_GROUP.USER_GROUP_NAME; m_cbo_nhom_quyen.DataSource = v_ds_nhom_nguoi_dung.HT_USER_GROUP; }
////public void display_for_update(US_HT_USER_GROUP i_us) //{ // m_us = i_us; // us_obj_2_form(); // this.ShowDialog(); //} public void display_for_update(US_HT_USER_GROUP i_us) { m_us = i_us; us_obj_2_form(); this.ShowDialog(); }
private void us_object2grid(US_HT_USER_GROUP i_us , int i_grid_row) { DataRow v_dr = (DataRow)m_fg.Rows[i_grid_row].UserData; i_us.Me2DataRow(v_dr); m_obj_trans.DataRow2GridRow(v_dr, i_grid_row); }
private void delete_ht_user_group() { if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg)) return; if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row)) return; if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted) return; US_HT_USER_GROUP v_us = new US_HT_USER_GROUP(); grid2us_object(v_us, m_fg.Row); try { v_us.BeginTransaction(); v_us.Delete(); v_us.CommitTransaction(); m_fg.Rows.Remove(m_fg.Row); } catch (Exception v_e) { v_us.Rollback(); CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e, new CDBClientDBExceptionInterpret()); v_objErrHandler.showErrorMessage(); } }
private void grid2us_object(US_HT_USER_GROUP i_us , int i_grid_row) { DataRow v_dr; v_dr = (DataRow)m_fg.Rows[i_grid_row].UserData; m_obj_trans.GridRow2DataRow(i_grid_row, v_dr); i_us.DataRow2Me(v_dr); }