public IHttpActionResult Update(int id, DTO.ShowroomReceiptMng.ShowroomReceipt dtoItem)
 {
     Library.DTO.Notification notification;
     Module.Framework.BLL     fwBll = new Module.Framework.BLL();
     if (id > 0 && !fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanUpdate))
     {
         return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
     }
     else if (id == 0 && !fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanCreate))
     {
         return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
     }
     // validation
     if (!Helper.CommonHelper.ValidateDTO <DTO.ShowroomReceiptMng.ShowroomReceipt>(dtoItem, out notification))
     {
         return(Ok(new Library.DTO.ReturnData <DTO.ShowroomReceiptMng.ShowroomReceipt>()
         {
             Data = dtoItem, Message = notification
         }));
     }
     // save data
     BLL.ShowroomReceiptMng bll = new BLL.ShowroomReceiptMng();
     bll.UpdateData(id, ref dtoItem, ControllerContext.GetAuthUserId(), out notification);
     return(Ok(new Library.DTO.ReturnData <DTO.ShowroomReceiptMng.ShowroomReceipt>()
     {
         Data = dtoItem, Message = notification
     }));
 }