public override object PerformSelectOneObject() { Ecm.WebReferences.MasterService.Rex_Dm_Ca_Lamviec rex_Dm_Ca_Lamviec = new Ecm.WebReferences.MasterService.Rex_Dm_Ca_Lamviec(); try { int focusedRow = gridView1.GetDataSourceRowIndex(gridView1.FocusedRowHandle); DataRow dr = ds_Collection.Tables[0].Rows[focusedRow]; if (dr != null) { rex_Dm_Ca_Lamviec.Id_Ca_Lamviec = dr["Id_Ca_Lamviec"]; rex_Dm_Ca_Lamviec.Ma_Ca_Lamviec = dr["Ma_Ca_Lamviec"]; rex_Dm_Ca_Lamviec.Ten_Ca_Lamviec = dr["Ten_Ca_Lamviec"]; } //this.dgrex_Dm_Ca_Lamviec.EmbeddedNavigator.Buttons.EndEdit.DoClick(); this.DoClickEndEdit(dgrex_Dm_Ca_Lamviec); SelectedRows = ds_Collection.Tables[0].Select("Chon = true"); ds_Collection.AcceptChanges(); this.FormState = GoobizFrame.Windows.Forms.FormState.View; this.Dispose(); this.Close(); return(rex_Dm_Ca_Lamviec); } catch (Exception ex) { #if DEBUG MessageBox.Show(ex.Message); #endif return(null); } }
public object DeleteObject() { Ecm.WebReferences.MasterService.Rex_Dm_Ca_Lamviec objRex_Dm_Ca_Lamviec = new Ecm.WebReferences.MasterService.Rex_Dm_Ca_Lamviec(); objRex_Dm_Ca_Lamviec.Id_Ca_Lamviec = gridView1.GetFocusedRowCellValue("Id_Ca_Lamviec"); return(objMasterService.Delete_Rex_Dm_Ca_Lamviec(objRex_Dm_Ca_Lamviec)); }
public object UpdateObject() { Ecm.WebReferences.MasterService.Rex_Dm_Ca_Lamviec objRex_Dm_Ca_Lamviec = new Ecm.WebReferences.MasterService.Rex_Dm_Ca_Lamviec(); objRex_Dm_Ca_Lamviec.Id_Ca_Lamviec = gridView1.GetFocusedRowCellValue("Id_Ca_Lamviec"); objRex_Dm_Ca_Lamviec.Ma_Ca_Lamviec = txtMa_Ca_Lamviec.EditValue; objRex_Dm_Ca_Lamviec.Ten_Ca_Lamviec = txtTen_Ca_Lamviec.EditValue; objRex_Dm_Ca_Lamviec.Gio_Batdau = timeEdit_Gio_Batdau.Text; objRex_Dm_Ca_Lamviec.Gio_Ketthuc = timeEdit_Gio_Ketthuc.Text; return(objMasterService.Update_Rex_Dm_Ca_Lamviec(objRex_Dm_Ca_Lamviec)); }
public object InsertObject() { Ecm.WebReferences.MasterService.Rex_Dm_Ca_Lamviec objRex_Dm_Ca_Lamviec = new Ecm.WebReferences.MasterService.Rex_Dm_Ca_Lamviec(); objRex_Dm_Ca_Lamviec.Id_Ca_Lamviec = -1; objRex_Dm_Ca_Lamviec.Ma_Ca_Lamviec = txtMa_Ca_Lamviec.EditValue; objRex_Dm_Ca_Lamviec.Ten_Ca_Lamviec = txtTen_Ca_Lamviec.EditValue; objRex_Dm_Ca_Lamviec.Gio_Batdau = timeEdit_Gio_Batdau.EditValue; objRex_Dm_Ca_Lamviec.Gio_Ketthuc = timeEdit_Gio_Ketthuc.EditValue; return(objMasterService.Insert_Rex_Dm_Ca_Lamviec(objRex_Dm_Ca_Lamviec)); }