Exemplo n.º 1
0
 public HttpResponseMessage DeleteItem(RequestItem delItem)
 {
     try
     {
         BBAngularController.Instance.DeleteItem(delItem.ItemId, delItem.ModuleId);
         return Request.CreateResponse(HttpStatusCode.OK, true.ToString());
     }
     catch (Exception ex)
     {
         return Request.CreateResponse(HttpStatusCode.NotFound, ex.Message);
     }
 }
Exemplo n.º 2
0
 public HttpResponseMessage AddItem(RequestItem item)
 {
     try
     {
         ItemInfo newItem = new ItemInfo();
         newItem.ModuleId = item.ModuleId;
         newItem.CreatedByUserId = UserInfo.UserID;
         newItem.CreatedOnDate = DateTime.Now;
         newItem.LastModifiedByUserId = UserInfo.UserID;
         newItem.LastModifiedOnDate = DateTime.Now;
         newItem.AssignedUserId = item.AssignedUserId;
         newItem.ItemName = item.ItemName;
         newItem.ItemDescription = item.ItemDescription;
         int itemId = BBAngularController.Instance.NewItem(newItem);
         return Request.CreateResponse(HttpStatusCode.OK, newItem);
     }
     catch (Exception ex)
     {
         return Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message);
     }
 }