/// <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="psm">仓库模型</param> /// <returns>返回添加仓库模型所影响的行数</returns> public static int AddWareHouse(WareHouseModel psm) { return(WareHouseDAL.AddWareHouse(psm)); }