public ActionResult Save(C.Vendor model) { model.User.UserType = C.Enums.WFSUserTypeEnum.VendorAdmin; var resp = _vendorMgr.SaveVendor(new C.ReqResp.SaveVendorRequest() { Subject = model }); if (resp.Status == Status.Success) { var uiresponse = resp.ToUIResult<VendorEditModel, C.Vendor>((vendor) => new VendorEditModel(resp.Value) , (vm) => string.Empty); uiresponse.AdditionalPayload = new { addressHtml = RenderPartialViewToString("DisplayAddress", uiresponse.Subject.Vendor) , contactHtml = RenderPartialViewToString("DisplayContact", uiresponse.Subject.Vendor) }; return Json(uiresponse); } else { var uiresponse = resp.ToUIResult<VendorEditModel, C.Vendor>((vendor) => new VendorEditModel(vendor) , (vm) => { vm.Merge(resp); return RenderPartialViewToString("EditVendor", vm); }); return Json(uiresponse); } }
public static void ForUpdate(this UserOrderProfile existing, C.OrderProfile model) { existing.FirstName = model.FirstName; existing.LastName = model.LastName; existing.LunchPeriodId = model.LunchPeriodId; existing.SchoolGradeId = model.GradeId; existing.TeacherId = model.TeacherId; existing.Title = model.Title; }
public static void ForUpdate(this WFSUserAddress existing, C.PhoneAddress modified) { existing.Address1 = modified.Address1; existing.Address2 = modified.Address2; existing.City = modified.City; existing.State = modified.State; existing.ZipCode = modified.ZipCode; existing.PhoneNumber = modified.PhoneNumber; existing.PhoneExt = modified.PhoneExt; }
public static IExtendedOrganization GetExtensionClass(C.Enums.OrganizationTypeEnum type) { switch (type) { case WFS.Contract.Enums.OrganizationTypeEnum.Vendor: return new ExtendVendor(); case WFS.Contract.Enums.OrganizationTypeEnum.School: return new ExtendSchool(); default: break; } return null; }
public static void ForUpdate(this School existing, C.School School) { School.Map(existing); }
public static void ForUpdate(this Organization existing, C.Vendor vendor) { vendor.Map(existing); }
public static void ForUpdate(this SupportTicket existing, C.SupportTicket ticket) { existing.ResolvedUserID = ticket.ResolvedByUserID; existing.ResolvedText = ticket.ResolvedText; existing.ResolvedDate = DateTime.Today; }
public static void ForUpdate(this VendorFoodCategory existing, C.FoodCategory foodCategory) { foodCategory.Map(existing); }
public static void ForUpdate(this FoodItem existing, C.FoodItem FoodItem) { FoodItem.Map(existing); }
public static void ForUpdate(this VendorFoodOption existing, C.FoodOption FoodOption) { FoodOption.Map(existing); }