Ejemplo n.º 1
0
 public VendorCreateHandler(GlobalSolusindoDb db, tblM_User user, VendorValidator vendorValidator, VendorFactory vendorFactory, VendorQuery vendorQuery, AccessControl accessControl) : base(db, user)
 {
     this.vendorValidator         = vendorValidator;
     this.vendorFactory           = vendorFactory;
     this.vendorQuery             = vendorQuery;
     this.vendorEntryDataProvider = new VendorEntryDataProvider(db, user, accessControl, vendorQuery);
 }
Ejemplo n.º 2
0
 public IHttpActionResult GetForm(int id)
 {
     if (id > 0)
     {
         ThrowIfUserHasNoRole(readRole);
     }
     using (VendorEntryDataProvider vendorEntryDataProvider = new VendorEntryDataProvider(Db, ActiveUser, AccessControl, new VendorQuery(Db)))
     {
         var data = vendorEntryDataProvider.Get(id);
         SaveLog("Vendor", "GetForm", JsonConvert.SerializeObject(new { primaryKey = id }));
         return(Ok(new SuccessResponse(data)));
     }
 }