/// <summary> /// 添加仓库 /// </summary> /// <returns></returns> public WareHouseAddResponse AddWareHouse(WareHouseAddRequest request) { WareHouseAddResponse response = new WareHouseAddResponse(); if (request == null || string.IsNullOrEmpty(request.WareHouseName)) { response.Status = false; response.Message = "仓库名不能为空"; return(response); } if (request == null || string.IsNullOrEmpty(request.WareHouseAddress)) { response.Status = false; response.Message = "仓库地址不能为空"; return(response); } WareHouseInfo ware = new WareHouseInfo() { WareHouseName = request.WareHouseName, WareHouseCapacity = request.WareHouseCapacity, WareHouseAddress = request.WareHouseAddress, WareHouseStatus = request.WareHouseStatus, WareHouseRemark = request.WareHouseRemark }; var res = wdal.AddWareHouse(ware); if (res > 0) { response.IsRegistSuccess = true; response.Message = "添加仓库成功"; } else { response.Status = false; response.Message = "添加仓库失败"; } return(response); }
/// <summary> /// 仓库添加 /// </summary> /// <param name="addRequest"></param> /// <returns></returns> public WareHouseAddResponse WareHouseAdd(WareHouseAddRequest addRequest) { return(ApiRequestHelper.Post <WareHouseAddRequest, WareHouseAddResponse>(addRequest)); }
public WareHouseAddResponse AddWareHouse(WareHouseAddRequest request) { return(wbll.AddWareHouse(request)); }
public JsonResult wareHouseAdd(WareHouseAddRequest request) { return(Json(wbll.WareHouseAdd(request))); }