/// <summary> /// 返回Mis2014系统定义的子入库单实例列表 /// </summary> /// <param name="pOrderId">子入库单ID</param> /// <param name="pSubOrderList">返回子入库单实例列表,若失败则返回Count=0的列表</param> /// <returns>若添加成功则返回string.Empty; 否则返回添加失败的错误描述</returns> static protected string GetMisSubEntryOrderList(string pOrderId, out List <Product_Warehouse_ProductInput> pSubOrderList) { string retStr = string.Empty; pSubOrderList = null; // reset pSubOrderList // validate argument int orderId = -1; // stores an integer value of pOrderId if (!int.TryParse(pOrderId, out orderId)) { retStr = string.Format("ERROR!! 异常的输入参数pOrderId={0}", pOrderId); return(retStr); } try { // temp variables definition // fileter for query sub entry order list List <CommonFilterModel> filters = new List <CommonFilterModel>(1) { new CommonFilterModel("MainId", "=", orderId.ToString()) }; // TODO: donot use MainId Product_Warehouse_ProductMainInput entity = new Product_Warehouse_ProductMainInput(); // main entry order entity var wcfSubListRet = WCF <Product_Warehouse_ProductInput> .Query(1, 1000, filters, null); // TODO: donot use 1 and 1000 if (null != wcfSubListRet && null != wcfSubListRet.Data) { pSubOrderList = wcfSubListRet.Data; retStr = string.Empty; } else { retStr = string.Format("ERROR!! 获取子入库单列表失败, pOrderId={0}, wcfSubListRet={1}", pOrderId, wcfSubListRet); } } catch (Exception ex) { retStr = string.Format("Exception ERROR!! 获取子入库单列表失败, pOrderId={0}, Message={1}", pOrderId, ex.Message); } return(retStr); }
/// <summary> /// 从源主订单srcOrder复制,相当于重载operator= /// </summary> /// <param name="srcObj">源主订单</param> /// <returns>若成功则返回string.Empty;否则返回错误描述</returns> public string Copy(Product_Warehouse_ProductMainInput srcObj) { if (null != srcObj) { ProductInputMainId = srcObj.ProductInputMainId; ProductInputMainCode = srcObj.ProductInputMainCode; YanShouRen = srcObj.YanShouRen; AddUserId = srcObj.AddUserId; AddTime = srcObj.AddTime; isdel = srcObj.isdel; WarehouseId = srcObj.WarehouseId; iscandel = srcObj.iscandel; Remark = srcObj.Remark; CompanyTypeId = srcObj.CompanyTypeId; isPrint = srcObj.isPrint; return(string.Empty); } else { string errMsg = string.Format("MangoEntryOrder.Copy(), invalid null input param."); C_WMS.Data.Utility.MyLog.Instance.Warning(errMsg); return(errMsg); } }
/// <summary> /// construct by srcObj /// </summary> /// <param name="srcObj"></param> public MangoEntryOrder(Product_Warehouse_ProductMainInput srcObj) { Copy(srcObj); }