Exemplo n.º 1
0
        ///// <summary>
        ///// 获取指定订单中属于仓库类别列表的物品信息对话框
        ///// </summary>
        ///// <param name="orderFormNumber">订单号</param>
        ///// <param name="simpleMode">是否是简单模式的标志, 是则只显示最基本的物品信息列(图号、名称、规格)</param>
        ///// <returns>成功则返回获取到的对话框,失败返回null</returns>
        //static public FormQueryInfo GetOrderFormGoodsDialog(string orderFormNumber, List<string> lstDepotType, bool simpleMode)
        //{
        //    IOrderFormGoodsServer orderFormGoodsServer = ServerModuleFactory.GetServerModule<IOrderFormGoodsServer>();
        //    IQueryable<View_B_OrderFormGoods> queryResult;

        //    if (!orderFormGoodsServer.GetOrderFormGoods(BasicInfo.ListRoles, BasicInfo.LoginID, orderFormNumber, out queryResult, out m_err))
        //    {
        //        MessageDialog.ShowErrorMessage(m_err);
        //        return null;
        //    }

        //    List<View_B_OrderFormGoods> orderFormGoods = queryResult.ToList();
        //    IQueryable<View_F_GoodsPlanCost> result = GetPlanCostGoods(null, lstDepotType);

        //    if (result != null || result.Count() == 0)
        //    {
        //        List<View_F_GoodsPlanCost> goodsInfo = result.ToList();

        //        for (int i = 0; i < orderFormGoods.Count; i++)
        //        {
        //            if (null == goodsInfo.Find(p => orderFormGoods[i].图号型号 == p.图号型号 && orderFormGoods[i].物品名称 == p.物品名称 && orderFormGoods[i].规格 == p.规格))
        //            {
        //                orderFormGoods.RemoveAt(i);
        //                i--;
        //            }
        //        }
        //    }


        //    System.Data.DataTable dataTable = GlobalObject.GeneralFunction.ConvertToDataTable(orderFormGoods);
        //    FormQueryInfo form = new FormQueryInfo(dataTable);

        //    if (simpleMode)
        //    {
        //        form.ShowColumns = new string[] { "图号型号", "物品名称", "规格" };
        //    }

        //    return form;
        //}

        /// <summary>
        /// 获取指定订单的物品在仓库中的信息对话框
        /// </summary>
        /// <param name="orderFormNumber">订单号</param>
        /// <returns>成功则返回获取到的对话框,失败返回null</returns>
        static public FormQueryInfo GetOrderFormGoodsStockInfoDialog(string orderFormNumber, string strStorageID)
        {
            IStoreServer server = ServerModuleFactory.GetServerModule <IStoreServer>();
            IQueryable <View_OrderFormGoodsStockInfo> queryResult = server.GetOrderFormGoodsStockInfo(orderFormNumber, strStorageID);

            //FormQueryInfo form = new FormQueryInfo(queryResult);
            System.Data.DataTable dataTable = GlobalObject.GeneralFunction.ConvertToDataTable <View_OrderFormGoodsStockInfo>(queryResult);
            FormQueryInfo         form      = new FormQueryInfo(dataTable);

            return(form);
        }