Esempio n. 1
0
 public SearchResult SearchOrderByProductionOrder(Sender sender, SearchOrderArgs args)
 {
     try
     {
         using (ObjectProxy op = new ObjectProxy())
         {
             return(op.SearchOrderByProductionOrder(args));
         }
     }
     catch (Exception ex)
     {
         PLogger.LogError(ex);
         throw ex;
     }
 }
Esempio n. 2
0
 public SearchResult SearchCloudSplitOrder(Sender sender, SearchOrderArgs args)
 {
     try
     {
         using (ObjectProxy op = new ObjectProxy())
         {
             //return op.SearchCloudSplitOrder(args);
             SearchResult SearchResult = new SearchResult();
             return(SearchResult);
         }
     }
     catch (Exception ex)
     {
         PLogger.LogError(ex);
         throw ex;
     }
 }
Esempio n. 3
0
        public void SearchOrders()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchOrderArgs args = new SearchOrderArgs();

                    args.OrderBy       = "Created desc";
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;

                    SearchResult sr = p.Client.SearchOrderByProductionOrder(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                PLogger.LogError(ex);
                Response.Write(ex.Message);
            }
        }
        public void SearchPartnerTransDetail()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchOrderArgs args = new SearchOrderArgs();
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    args.OrderBy       = "created desc";

                    if (!string.IsNullOrEmpty(Request["CustomerName"]))
                    {
                        args.CustomerName = Request["CustomerName"];
                    }
                    if (!string.IsNullOrEmpty(Request["Status"]))
                    {
                        args.Status = new List <string>();
                        args.Status.Add(Request["Status"].ToString());
                    }
                    if (!string.IsNullOrEmpty(Request["OrderNo"]))
                    {
                        args.OrderNo = Request["OrderNo"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["PurchaseNo"]))
                    {
                        args.PurchaseNo = Request["PurchaseNo"].ToString();
                    }
                    SearchResult sr = p.Client.SearchOrder(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }
Esempio n. 5
0
        public void SearchOrders()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchOrderArgs args = new SearchOrderArgs();

                    args.OrderBy       = "Created desc";
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;

                    if (!string.IsNullOrEmpty(Request["OrderIDs"]))
                    {
                        args.OrderIDs = new List <Guid>();
                        foreach (string id in Request["OrderIDs"].ToString().Split(',').ToList())
                        {
                            args.OrderIDs.Add(new Guid(id));
                        }
                    }
                    if (!string.IsNullOrEmpty(parm.Status) && Request["Status"] != "全部")
                    {
                        args.Status = parm.Status.Split(',').ToList();
                    }
                    if (!string.IsNullOrEmpty(parm.OrderType) && Request["OrderType"] != "全部")
                    {
                        args.OrderTypes = parm.OrderType.Split(',').ToList();
                    }
                    if (!string.IsNullOrEmpty(parm.OrderNo))
                    {
                        args.OrderNo = parm.OrderNo;
                    }
                    if (!string.IsNullOrEmpty(parm.PurchaseNo))
                    {
                        args.PurchaseNo = parm.PurchaseNo;
                    }

                    if (!string.IsNullOrEmpty(parm.BattchNum))
                    {
                        args.BattchNo = parm.BattchNum;
                    }

                    if (!string.IsNullOrEmpty(parm.OutOrderNo))
                    {
                        args.OutOrderNo = parm.OutOrderNo;
                    }
                    if (!string.IsNullOrEmpty(parm.Mobile))
                    {
                        args.Mobile = parm.Mobile;
                    }
                    if (!string.IsNullOrEmpty(parm.BattchNum))
                    {
                        args.BattchNo = parm.BattchNum;
                    }
                    if (!string.IsNullOrEmpty(parm.Address))
                    {
                        args.Address = parm.Address;
                    }
                    if (!string.IsNullOrEmpty(parm.CustomerName))
                    {
                        args.CustomerName = parm.CustomerName;
                    }
                    if (!string.IsNullOrEmpty(Request["BookingDateFrom"]))
                    {
                        args.BookingDateFrom = parm.BookingDateFrom;
                    }
                    if (!string.IsNullOrEmpty(Request["BookingDateTo"]))
                    {
                        args.BookingDateTo = parm.BookingDateTo.AddDays(1);
                    }
                    if (!string.IsNullOrEmpty(Request["ShipDateFrom"]))
                    {
                        args.ShipDateFrom = parm.ShipDateFrom;
                    }
                    if (!string.IsNullOrEmpty(Request["ShipDateTo"]))
                    {
                        args.ShipDateTo = parm.ShipDateTo.AddDays(1);
                    }
                    if (!string.IsNullOrEmpty(Request["StepNo"]))
                    {
                        args.StepNo = parm.StepNo.ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["Review"]) && !string.IsNullOrEmpty(Request["pid"]))
                    {
                        OrderStep model = p.Client.GetOrderStepByPrivilegeID(SenderUser, new Guid(Request["pid"]));
                        args.StepNo = (model == null ? "-1" : (model.StepNo - 1).ToString());
                    }

                    if (CurrentUser.UserType == (int)UserType.D)
                    {
                        args.PartnerID = CurrentUser.PartnerID;
                    }

                    SearchResult sr = p.Client.SearchOrder(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                PLogger.LogError(ex);
                Response.Write(ex.Message);
            }
        }