/// <summary> /// Updates an existing department /// </summary> public static bool UpdateDepartment(int id, string title, int importance, string description, string imageUrl) { DepartmentDetails record = new DepartmentDetails(id, DateTime.Now, "", title, importance, description, imageUrl); bool ret = SiteProvider.Store.UpdateDepartment(record); BizObject.PurgeCacheItems("store_department"); return ret; }
/// <summary> /// Returns a Department object filled with the data taken from the input DepartmentDetails /// </summary> private static Department GetDepartmentFromDepartmentDetails(DepartmentDetails record) { if (record == null) return null; else { return new Department(record.ID, record.AddedDate, record.AddedBy, record.Title, record.Importance, record.Description, record.ImageUrl); } }
/// <summary> /// Creates a new department /// </summary> public static int InsertDepartment(string title, int importance, string description, string imageUrl) { DepartmentDetails record = new DepartmentDetails(0, DateTime.Now, BizObject.CurrentUserName, title, importance, description, imageUrl); int ret = SiteProvider.Store.InsertDepartment(record); BizObject.PurgeCacheItems("store_department"); return ret; }
public abstract int InsertDepartment(DepartmentDetails department);
public abstract bool UpdateDepartment(DepartmentDetails department);
public abstract bool UpdateDepartment(DepartmentDetails department);
public abstract int InsertDepartment(DepartmentDetails department);