public Boolean InsertLoop(Loop loop) { InitDB(); Loop newLoop = new Loop(); newLoop.Name = loop.Name; newLoop.Description = loop.Description; newLoop.Templateid = loop.Templateid; newLoop.Templatename = loop.Templatename; Boolean functionResult = false; try { newLoop.Save(); functionResult = true; } catch (Exception ex) { functionResult = false; } return functionResult; }
public Boolean RemoveLoop(Loop loop) { InitDB(); try { Loop deleteLoop = new Loop(); deleteLoop.LoadByPrimaryKey((long)loop.Id); deleteLoop.MarkAsDeleted(); deleteLoop.Save(); } catch (Exception ex) { return false; } AddUpdateDelta("loop"); return true; }