Пример #1
0
 public SearchResult SearchWarehouseInMain(Sender sender, SearchWarehouseInMainArgs args)
 {
     try
     {
         using (ObjectProxy op = new ObjectProxy())
         {
             return(op.SearchWarehouseInMain(args));
         }
     }
     catch (Exception ex)
     {
         PLogger.LogError(ex);
         throw ex;
     }
 }
 /// <summary>
 /// 获取对应InMain数据
 /// </summary>
 public void GetInMain()
 {
     try
     {
         if (string.IsNullOrEmpty(Request["InID"]))
         {
             throw new Exception("入库ID参数无效。");
         }
         using (ProxyBE p = new ProxyBE())
         {
             SearchWarehouseInMainArgs args = new SearchWarehouseInMainArgs();
             args.InID = new Guid(Request["InID"]);
             SearchResult sr = p.Client.SearchWarehouseInMain(SenderUser, args);
             Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
         }
     }
     catch (Exception ex)
     {
         WriteError(ex.Message, ex);
     }
 }
        public void SearchWarehouseInMain()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchWarehouseInMainArgs args = new SearchWarehouseInMainArgs();
                    args.OrderBy = "[CheckInDate] Desc";
                    if (!string.IsNullOrEmpty(Parm.BillNo))
                    {
                        args.BillNo = Parm.BillNo;
                    }
                    if (!string.IsNullOrEmpty(Parm.HandlerMan))
                    {
                        args.HandlerMan = Parm.HandlerMan;
                    }
                    //args少BattchNo
                    //if (!string.IsNullOrEmpty(Parm.BattchNo))
                    //{
                    //    args.BattchNo = Parm.BattchNo;
                    //}
                    if (!string.IsNullOrEmpty(Request["SupplierName"]))
                    {
                        args.SupplierName = Request["SupplierName"].ToString();
                    }

                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    SearchResult sr = p.Client.SearchWarehouseInMain(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }