Beispiel #1
0
        public async Task <ActionResult> AddShippingAddress(ShippingAddress newShippingAddress)
        {
            if (ModelState.IsValid)
            {
                var response = await _shippingAddressService.AddShippingAddress(newShippingAddress);

                return(Json(response));
            }
            else
            {
                return(Json(new { success = false, responseText = "Add shipping address failed" }));
            }
        }
 /// <summary>
 /// 添加收货地址
 /// </summary>
 public static void AddShippingAddress(ShippingAddressInfo shipinfo)
 {
     _iShippingAddressService.AddShippingAddress(shipinfo);
 }
Beispiel #3
0
 public JsonResult AddShippingAddress(Entities.ShippingAddressInfo info)
 {
     info.UserId = CurrentUser.Id;
     _iShippingAddressService.AddShippingAddress(info);
     return(Json(new { success = true, msg = "添加成功", id = info.Id }));
 }
Beispiel #4
0
        public async Task <IActionResult> AddShippingAddress(ShippingAddressCreateVM ShippingAddressAddVM)
        {
            await _service.AddShippingAddress(ShippingAddressAddVM);

            return(RedirectToAction(nameof(IndexShippingAddress)));
        }