Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
 /// <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);
      }
 }
Exemplo n.º 3
0
 /// <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);