public override object PerformSelectOneObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Loai_Bophan rex_Dm_Loai_Bophan = new Ecm.WebReferences.MasterService.Rex_Dm_Loai_Bophan();
            try
            {
                int     focusedRow = gridView1.GetDataSourceRowIndex(gridView1.FocusedRowHandle);
                DataRow dr         = ds_Loai_Bophan.Tables[0].Rows[focusedRow];
                if (dr != null)
                {
                    rex_Dm_Loai_Bophan.Id_Loai_Bophan  = dr["Id_Loai_Bophan"];
                    rex_Dm_Loai_Bophan.Ma_Loai_Bophan  = dr["Ma_Loai_Bophan"];
                    rex_Dm_Loai_Bophan.Ten_Loai_Bophan = dr["Ten_Loai_Bophan"];
                }
                Selected_Rex_Dm_Loai_Bophan = rex_Dm_Loai_Bophan;
                this.Dispose();
                this.Close();
                return(rex_Dm_Loai_Bophan);
            }
            catch (Exception ex)
            {
#if DEBUG
                MessageBox.Show(ex.Message);
#endif
                return(null);
            }
        }
 public object UpdateObject()
 {
     Ecm.WebReferences.MasterService.Rex_Dm_Loai_Bophan objRex_Dm_Loai_Bophan = new Ecm.WebReferences.MasterService.Rex_Dm_Loai_Bophan();
     objRex_Dm_Loai_Bophan.Id_Loai_Bophan  = gridView1.GetFocusedRowCellValue("Id_Loai_Bophan");
     objRex_Dm_Loai_Bophan.Ma_Loai_Bophan  = txtMa_Loai_Bophan.EditValue;
     objRex_Dm_Loai_Bophan.Ten_Loai_Bophan = txtTen_Loai_Bophan.EditValue;
     return(objMasterService.Update_Rex_Dm_Loai_Bophan(objRex_Dm_Loai_Bophan));
 }
 public object InsertObject()
 {
     Ecm.WebReferences.MasterService.Rex_Dm_Loai_Bophan objRex_Dm_Loai_Bophan = new Ecm.WebReferences.MasterService.Rex_Dm_Loai_Bophan();
     objRex_Dm_Loai_Bophan.Id_Loai_Bophan  = -1;
     objRex_Dm_Loai_Bophan.Ma_Loai_Bophan  = txtMa_Loai_Bophan.EditValue;
     objRex_Dm_Loai_Bophan.Ten_Loai_Bophan = txtTen_Loai_Bophan.EditValue;
     return(objMasterService.Insert_Rex_Dm_Loai_Bophan(objRex_Dm_Loai_Bophan));
 }
 public object DeleteObject()
 {
     Ecm.WebReferences.MasterService.Rex_Dm_Loai_Bophan objRex_Dm_Loai_Bophan = new Ecm.WebReferences.MasterService.Rex_Dm_Loai_Bophan();
     objRex_Dm_Loai_Bophan.Id_Loai_Bophan = gridView1.GetFocusedRowCellValue("Id_Loai_Bophan");
     return(objMasterService.Delete_Rex_Dm_Loai_Bophan(objRex_Dm_Loai_Bophan));
 }