public override object PerformSelectOneObject() { Ecm.WebReferences.MasterService.Rex_Dm_Xeploai rex_Dm_Xeploai = new Ecm.WebReferences.MasterService.Rex_Dm_Xeploai(); try { int focusedRow = gridView1.GetDataSourceRowIndex(gridView1.FocusedRowHandle); DataRow dr = ds_Xeploai.Tables[0].Rows[focusedRow]; if (dr != null) { rex_Dm_Xeploai.Id_Xeploai = dr["Id_Xeploai"]; rex_Dm_Xeploai.Ma_Xeploai = dr["Ma_Xeploai"]; rex_Dm_Xeploai.Ten_Xeploai = dr["Ten_Xeploai"]; } Selected_Rex_Dm_Xeploai = rex_Dm_Xeploai; this.Dispose(); this.Close(); return(rex_Dm_Xeploai); } catch (Exception ex) { #if DEBUG MessageBox.Show(ex.Message); #endif return(null); } }
public object DeleteObject() { Ecm.WebReferences.MasterService.Rex_Dm_Xeploai objRex_Dm_Xeploai = new Ecm.WebReferences.MasterService.Rex_Dm_Xeploai(); objRex_Dm_Xeploai.Id_Xeploai = gridView1.GetFocusedRowCellValue("Id_Xeploai"); return(objMasterService.Delete_Rex_Dm_Xeploai(objRex_Dm_Xeploai)); }
public object UpdateObject() { Ecm.WebReferences.MasterService.Rex_Dm_Xeploai objRex_Dm_Xeploai = new Ecm.WebReferences.MasterService.Rex_Dm_Xeploai(); objRex_Dm_Xeploai.Id_Xeploai = gridView1.GetFocusedRowCellValue("Id_Xeploai"); objRex_Dm_Xeploai.Ma_Xeploai = txtMa_Xeploai.EditValue; objRex_Dm_Xeploai.Ten_Xeploai = txtTen_Xeploai.EditValue; return(objMasterService.Update_Rex_Dm_Xeploai(objRex_Dm_Xeploai)); }
public object InsertObject() { Ecm.WebReferences.MasterService.Rex_Dm_Xeploai objRex_Dm_Xeploai = new Ecm.WebReferences.MasterService.Rex_Dm_Xeploai(); objRex_Dm_Xeploai.Id_Xeploai = -1; objRex_Dm_Xeploai.Ma_Xeploai = txtMa_Xeploai.EditValue; objRex_Dm_Xeploai.Ten_Xeploai = txtTen_Xeploai.EditValue; return(objMasterService.Insert_Rex_Dm_Xeploai(objRex_Dm_Xeploai)); }