protected override bool InsertObject() { try { if (!ValidInput()) return false; var o = new Tra_Group() { Name = txtName.Text, Descript = txtDescript.Text }; var oki = _bll.Tra_Group.Insert(o); if (oki == null) BasePRE.ShowMessage(STR_DUPLICATE, STR_ADD); return oki != null ? true : false; } catch { return false; } }
protected override bool UpdateObject() { try { if (!ValidInput()) return false; var id = (Guid)grvMain.GetFocusedRowCellValue("Id"); var o = new Tra_Group() { Id = id, Name = txtName.Text, Descript = txtDescript.Text }; var oki = _bll.Tra_Group.Update(o); if (oki == null) BasePRE.ShowMessage(STR_DUPLICATE, STR_EDIT); return oki != null ? true : false; } catch { return false; } }