public override object PerformSelectOneObject()
        {
            Ecm.WebReferences.MasterService.Rex_Dm_Tinhoc rex_Dm_Tinhoc = new Ecm.WebReferences.MasterService.Rex_Dm_Tinhoc();
            try
            {
                int     focusedRow = gridView1.GetDataSourceRowIndex(gridView1.FocusedRowHandle);
                DataRow dr         = ds_Tinhoc.Tables[0].Rows[focusedRow];
                if (dr != null)
                {
                    rex_Dm_Tinhoc.Id_Tinhoc  = dr["Id_Tinhoc"];
                    rex_Dm_Tinhoc.Ma_Tinhoc  = dr["Ma_Tinhoc"];
                    rex_Dm_Tinhoc.Ten_Tinhoc = dr["Ten_Tinhoc"];
                }
                Selected_Rex_Dm_Tinhoc = rex_Dm_Tinhoc;
                this.Dispose();
                this.Close();
                return(rex_Dm_Tinhoc);
            }
            catch (Exception ex)
            {
#if DEBUG
                MessageBox.Show(ex.Message);
#endif
                return(null);
            }
        }
 public object UpdateObject()
 {
     Ecm.WebReferences.MasterService.Rex_Dm_Tinhoc objRex_Dm_Tinhoc = new Ecm.WebReferences.MasterService.Rex_Dm_Tinhoc();
     objRex_Dm_Tinhoc.Id_Tinhoc  = gridView1.GetFocusedRowCellValue("Id_Tinhoc");
     objRex_Dm_Tinhoc.Ma_Tinhoc  = txtMa_Tinhoc.EditValue;
     objRex_Dm_Tinhoc.Ten_Tinhoc = txtTen_Tinhoc.EditValue;
     return(objMasterService.Update_Rex_Dm_Tinhoc(objRex_Dm_Tinhoc));
 }
 public object InsertObject()
 {
     Ecm.WebReferences.MasterService.Rex_Dm_Tinhoc objRex_Dm_Tinhoc = new Ecm.WebReferences.MasterService.Rex_Dm_Tinhoc();
     objRex_Dm_Tinhoc.Id_Tinhoc  = -1;
     objRex_Dm_Tinhoc.Ma_Tinhoc  = txtMa_Tinhoc.EditValue;
     objRex_Dm_Tinhoc.Ten_Tinhoc = txtTen_Tinhoc.EditValue;
     return(objMasterService.Insert_Rex_Dm_Tinhoc(objRex_Dm_Tinhoc));
 }
 public object DeleteObject()
 {
     Ecm.WebReferences.MasterService.Rex_Dm_Tinhoc objRex_Dm_Tinhoc = new Ecm.WebReferences.MasterService.Rex_Dm_Tinhoc();
     objRex_Dm_Tinhoc.Id_Tinhoc = gridView1.GetFocusedRowCellValue("Id_Tinhoc");
     return(objMasterService.Delete_Rex_Dm_Tinhoc(objRex_Dm_Tinhoc));
 }