Esempio n. 1
0
        public void SearchProducts()
        {
            try
            {
                using (ProxyBE op = new ProxyBE())
                {
                    SearchProductArgs args = new SearchProductArgs();
                    args.OrderBy       = "[CategoryID] asc,[ProductCode]";
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;


                    if (!string.IsNullOrEmpty(Request["CategoryID"]))
                    {
                        args.CategoryID = new Guid(Request["CategoryID"]);
                    }

                    SearchResult sr = op.Client.SearchProduct(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                PLogger.LogError(ex);
                Response.Write(ex.Message);
            }
        }
Esempio n. 2
0
        public void SearchSMSLogs()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchSMSLogArgs args = new SearchSMSLogArgs();

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

                    if (!string.IsNullOrEmpty(Request["CreatedFrom"]))
                    {
                        args.CreatedFrom = Convert.ToDateTime(Request["CreatedFrom"]);
                    }
                    if (!string.IsNullOrEmpty(Request["CreatedTo"]))
                    {
                        args.CreatedTo = Convert.ToDateTime(Request["CreatedTo"]).AddDays(1);
                    }

                    //Where
                    SearchResult sr = p.Client.SearchSMSLogs(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                PLogger.LogError(ex);
                Response.Write(ex.Message);
            }
        }
Esempio n. 3
0
 public void SearchPrivilegeByCurrentUser()
 {
     try
     {
         using (ProxyBE p = new ProxyBE())
         {
             SearchPrivilegeArgs args = new SearchPrivilegeArgs();
             args.OrderBy       = "[MainSequence],[Sequence]";
             args.RowNumberFrom = pagingParm.RowNumberFrom;
             args.RowNumberTo   = pagingParm.RowNumberTo;
             //用户
             if (CurrentUser.UserType == (int)UserType.U)
             {
                 args.RKeyUserIDs = new List <Guid>()
                 {
                     CurrentUser.UserID
                 };
             }
             //经销商
             if (CurrentUser.UserType == (int)UserType.D)
             {
                 args.CategoryIDs = new List <Guid>();
                 args.CategoryIDs.Add(Guid.Parse(CategoryID));
             }
             args.IsDisabled = true;
             SearchResult sr = p.Client.SearchPrivilege(SenderUser, args);
             Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
         }
     }
     catch (Exception ex)
     {
         PLogger.LogError(ex);
         Response.Write(ex.Message);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// 获取用户
 /// </summary>
 public void ListToUser()
 {
     try
     {
         using (ProxyBE p = new ProxyBE())
         {
             SearchDepartmentArgs sargs = new SearchDepartmentArgs();
             if (!string.IsNullOrEmpty(parm.DepartmentCode))
             {
                 List <string> DepartmentCode = new List <string>();
                 DepartmentCode.Add(parm.DepartmentCode);
                 sargs.DepartmentCodes = DepartmentCode;
             }
             if (!string.IsNullOrEmpty(parm.DepartmentName))
             {
                 List <string> DepartmentName = new List <string>();
                 DepartmentName.Add(parm.DepartmentName);
                 sargs.DepartmentNames = DepartmentName;
             }
             sargs.OrderBy       = pagingParm.SortOrder;
             sargs.RowNumberFrom = pagingParm.RowNumberFrom;
             sargs.RowNumberTo   = pagingParm.RowNumberTo;
             //Where
             SearchResult sr = p.Client.SearchDepartment(SenderUser, sargs);
             Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
         }
     }
     catch (Exception ex)
     {
         WriteError(ex.Message, ex);
     }
 }
Esempio n. 5
0
 public void GetQuoteDetail()
 {
     try
     {
         if (string.IsNullOrEmpty(Request["QuoteID"]))
         {
             throw new Exception("报价单:QuoteID,调用参数无效。");
         }
         Guid QuoteID = new Guid(Request["QuoteID"].ToString());
         using (ProxyBE p = new ProxyBE())
         {
             SearchQuoteDetailArgs args = new SearchQuoteDetailArgs();
             args.QuoteID = QuoteID;
             if (!string.IsNullOrEmpty(Request["ItemGroup"]))
             {
                 args.ItemGroup = Request["ItemGroup"].ToString();
             }
             else
             {
                 args.ItemGroup = "";
             }
             SearchResult sr = p.Client.SearchQuoteDetail(SenderUser, args);
             Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
         }
     }
     catch (Exception ex)
     {
         PLogger.LogError(ex);
         WriteError(ex.Message);
     }
 }
        public void List()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchComponentTypeArgs args = new SearchComponentTypeArgs();
                    if (!string.IsNullOrEmpty(parm.ComponentTypeCode))
                    {
                        args.ComponentTypeCode = parm.ComponentTypeCode;
                    }
                    if (!string.IsNullOrEmpty(parm.ComponentTypeName))
                    {
                        args.ComponentTypeName = parm.ComponentTypeName;
                    }
                    if (!string.IsNullOrEmpty(Request["Status"]))
                    {
                        args.Status = Convert.ToBoolean(Request["Status"]);
                    }
                    args.OrderBy       = string.IsNullOrEmpty(pagingParm.SortOrder.Trim()) ? "ComponentTypeID" : pagingParm.SortOrder;
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    //Where

                    SearchResult sr = p.Client.SearchComponentType(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }
Esempio n. 7
0
        public void SearchProductComponents()
        {
            try
            {
                string ComponentID = Request["ComponentID"];
                if (string.IsNullOrEmpty(ComponentID))
                {
                    Response.Write("{\"total\":0,\"rows\":[]}");
                }
                using (ProxyBE p = new ProxyBE())
                {
                    SearchComponentMaterialArgs args = new SearchComponentMaterialArgs();

                    args.OrderBy = "Created desc";
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo = pagingParm.RowNumberTo;
                    args.ComponentID = int.Parse(ComponentID);

                    SearchResult sr = p.Client.SearchComponentMaterialByComponentID(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                PLogger.LogError(ex);
                Response.Write(ex.Message);
            }
        }
Esempio n. 8
0
        public void SearchCars()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchCarArgs sargs = new SearchCarArgs();
                    sargs.OrderBy       = "Created desc";
                    sargs.RowNumberFrom = pagingParm.RowNumberFrom;
                    sargs.RowNumberTo   = pagingParm.RowNumberTo;

                    //Where
                    if (!string.IsNullOrEmpty(parm.PlateNo))
                    {
                        sargs.PlateNo = parm.PlateNo;
                    }
                    if (!string.IsNullOrEmpty(parm.DriverName))
                    {
                        sargs.DriverName = parm.DriverName;
                    }
                    if (!string.IsNullOrEmpty(parm.Mobile))
                    {
                        sargs.Mobile = parm.Mobile;
                    }
                    SearchResult sr = p.Client.SearchCar(SenderUser, sargs);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }
Esempio n. 9
0
        public void SearchWarehouseOutMain()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchWarehouseOutMainArgs args = new SearchWarehouseOutMainArgs();

                    args.OrderBy = "[CheckOutDate] Desc";
                    if (!string.IsNullOrEmpty(Parm.BillNo))
                    {
                        args.BillNo = Parm.BillNo;
                    }
                    if (!string.IsNullOrEmpty(Parm.HandlerMan))
                    {
                        args.HandlerMan = Parm.HandlerMan;
                    }
                    if (!string.IsNullOrEmpty(Request["WareShopName"]))
                    {
                        args.WorkShopName = Request["WareShopName"].ToString();
                    }

                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;

                    SearchResult sr = p.Client.SearchWarehouseOutMain(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                //WriteError(ex.Message, ex);
                throw ex;
            }
        }
Esempio n. 10
0
 public void GetAllPrivilegeCategorys()
 {
     try
     {
         using (ProxyBE p = new ProxyBE())
         {
             SearchPrivilegeCategoryArgs sargs = new SearchPrivilegeCategoryArgs();
             if (!string.IsNullOrEmpty(pagingParm.SortOrder.Trim()))
             {
                 sargs.OrderBy = pagingParm.SortOrder;
             }
             else
             {
                 sargs.OrderBy = "[Sequence] ASC";
             }
             sargs.RowNumberFrom = pagingParm.RowNumberFrom;
             sargs.RowNumberTo   = pagingParm.RowNumberTo;
             SearchResult sr = p.Client.SearchPrivilegeCategory(SenderUser, sargs);
             Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
         }
     }
     catch (Exception ex)
     {
         WriteError("查询菜单组:" + ex.Message);
     }
 }
Esempio n. 11
0
        /// <summary>
        /// 出库详细
        /// </summary>
        public void SearchOutMainDetail()
        {
            try
            {
                if (string.IsNullOrEmpty(Request["OutID"]))
                {
                    throw new Exception("入库ID参数无效。");
                }
                using (ProxyBE p = new ProxyBE())
                {
                    SearchWarehouseOutDetailArgs args = new SearchWarehouseOutDetailArgs();
                    args.OrderBy       = "[Qty]";
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    args.OutID         = new Guid(Request["OutID"]);

                    SearchResult sr = p.Client.SearchWarehouseOutDetail(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                Response.Write(ex);
            }
        }
Esempio n. 12
0
 public void SearchWorkShops()
 {
     try
     {
         using (ProxyBE p = new ProxyBE())
         {
             SearchWorkShopArgs args = new SearchWorkShopArgs();
             args.OrderBy = "[WorkShopCode]";
             if (!string.IsNullOrEmpty(Request["WorkCenterCode"]))
             {
                 args.WorkShopCode = Request["WorkCenterCode"].ToString();
             }
             if (!string.IsNullOrEmpty(Request["WorkCenterName"]))
             {
                 args.WorkShopName = Request["WorkCenterName"].ToString();
             }
             args.RowNumberFrom = pagingParm.RowNumberFrom;
             args.RowNumberTo   = pagingParm.RowNumberTo;
             SearchResult sr = p.Client.SearchWorkShop(SenderUser, args);
             Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
         }
     }
     catch (Exception ex)
     {
         Response.Write(ex);
     }
 }
        public void SearchTransDetail()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchPartnerTransDetailArgs args = new SearchPartnerTransDetailArgs();
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    args.OrderBy       = "Created desc";

                    if (!string.IsNullOrEmpty(Request["OrderID"]))
                    {
                        args.OrderID = Guid.Parse(Request["OrderID"]);
                    }

                    SearchResult sr = p.Client.SearchPartnerTransDetail(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }
Esempio n. 14
0
 public void SearchWorkCenters()
 {
     try
     {
         using (ProxyBE p = new ProxyBE())
         {
             SearchWorkCenterArgs args = new SearchWorkCenterArgs();
             args.OrderBy = "[Sequence]";
             if (!string.IsNullOrEmpty(parm.WorkCenterCode))
             {
                 args.WorkCenterCode = parm.WorkCenterCode;
             }
             if (!string.IsNullOrEmpty(parm.WorkCenterName))
             {
                 args.WorkCenterName = parm.WorkCenterName;
             }
             args.RowNumberFrom = pagingParm.RowNumberFrom;
             args.RowNumberTo   = pagingParm.RowNumberTo;
             SearchResult sr = p.Client.SearchWorkCenter(SenderUser, args);
             Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
         }
     }
     catch (Exception ex)
     {
         //WriteError(ex.Message, ex);
         Response.Write(ex);
     }
 }
Esempio n. 15
0
 /// <summary>
 /// 订单上架:所选仓位
 /// </summary>
 public void SearchOrderLocation()
 {
     try
     {
         using (ProxyBE p = new ProxyBE())
         {
             SearchLocationArgs args = new SearchLocationArgs();
             args.OrderBy = "[Created] Desc";
             if (!string.IsNullOrEmpty(parm.CabinetNum))
             {
                 args.CabinetNum = parm.CabinetNum;
             }
             if (!string.IsNullOrEmpty(parm.LocationCode))
             {
                 args.LocationCode = parm.LocationCode;
             }
             if (!string.IsNullOrEmpty(parm.LayerNum))
             {
                 args.LayerNum = parm.LayerNum;
             }
             args.Category      = "成品仓";
             args.Flag          = false;
             args.RowNumberFrom = pagingParm.RowNumberFrom;
             args.RowNumberTo   = pagingParm.RowNumberTo;
             SearchResult sr = p.Client.SearchLocation(SenderUser, args);
             Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
         }
     }
     catch (Exception ex)
     {
         WriteError(ex.Message, ex);
     }
 }
Esempio n. 16
0
        public void SearchPartnerTask()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchPartnerTaskArgs args = new SearchPartnerTaskArgs();
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    args.OrderBy       = "Created desc";

                    //工厂
                    if (CurrentUser.UserType == (int)UserType.U)
                    {
                        args.Resource = "方案审核组";
                        args.StepNo   = "3,4,5,6,7";

                        //string filterList = "fumanduo";
                        //if (filterList.IndexOf(CurrentUser.UserCode) != -1)
                        //    args.UserCodes = filterList;
                    }
                    //经销商
                    if (CurrentUser.UserType == (int)UserType.D)
                    {
                        args.Resource = CurrentUser.UserCode;
                        if (CurrentUser.PartnerID != Guid.Empty)
                        {
                            args.PartnerID = CurrentUser.PartnerID;
                        }
                        //args.StepNo = "1,2";
                        args.StepNo = "2";
                    }

                    if (!string.IsNullOrEmpty(Request["TaskType"]))
                    {
                        args.TaskType = Request["TaskType"].ToString();
                    }

                    if (!string.IsNullOrEmpty(Request["TaskNo"]))
                    {
                        args.TaskNo = Request["TaskNo"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["StepName"]))
                    {
                        args.StepNames = new List <string>();
                        args.StepNames.Add(Request["StepName"].ToString());
                    }
                    args.CompanyID = CurrentUser.CompanyID;//Liu
                    SearchResult sr = p.Client.SearchPartnerTask(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }
Esempio n. 17
0
        public void SearchPartnerUser()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchPartnerUserArgs args = new SearchPartnerUserArgs();
                    args.OrderBy       = pagingParm.SortOrder;
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    if (!string.IsNullOrEmpty(Request["IsSystem"]))
                    {
                        args.IsSystem = Convert.ToBoolean(Request["IsSystem"]);
                    }

                    if (!string.IsNullOrEmpty(parm.UserCode))
                    {
                        List <string> UserCode = new List <string>();
                        UserCode.Add(parm.UserCode);
                        args.UserCodes = UserCode;
                    }
                    if (!string.IsNullOrEmpty(parm.UserName))
                    {
                        List <string> UserName = new List <string>();
                        UserName.Add(parm.UserName);
                        args.UserNames = UserName;
                    }
                    if (!string.IsNullOrEmpty(Request["IsDisabled"]) && Request["IsDisabled"] != "请选择")
                    {
                        args.IsDisabled = Convert.ToBoolean(Request["IsDisabled"]);
                    }
                    if (!string.IsNullOrEmpty(Request["IsMemberClass"]) && Request["IsMemberClass"] != "请选择")
                    {
                        args.MemberClass = Convert.ToInt32(Request["IsMemberClass"]);
                    }
                    if (!string.IsNullOrEmpty(Request["IsEndDate"]))
                    {
                        args.EndDate = Request["IsEndDate"];
                    }
                    if (!string.IsNullOrEmpty(parm.Mobile))
                    {
                        args.Mobile = parm.Mobile;
                    }
                    if (CurrentUser.PartnerID != Guid.Empty)
                    {
                        args.PartnerID = CurrentUser.PartnerID;
                    }
                    SearchResult sr = p.Client.SearchPartnerUser(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }
Esempio n. 18
0
 public void GetWorkShift2WorkShops()
 {
     using (ProxyBE op = new ProxyBE())
     {
         SearchWorkShift2WorkShopArgs args = new SearchWorkShift2WorkShopArgs();
         args.WorkShopID = Guid.Parse(Request["WorkShopID"].ToString());
         SearchResult sr = op.Client.SearchWorkShift2WorkShop(SenderUser, args);
         Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
     }
 }
Esempio n. 19
0
        public void SearchProductionSet()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchProductionSetArgs args = new SearchProductionSetArgs();

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

                    if (!string.IsNullOrEmpty(Request["SetID"]))
                    {
                        args.SetID = parm.SetID;
                    }
                    if (!string.IsNullOrEmpty(Request["Started"]))
                    {
                        args.Started = parm.Started;
                    }
                    if (!string.IsNullOrEmpty(Request["Ended"]))
                    {
                        args.Ended = parm.Ended;
                    }
                    if (!string.IsNullOrEmpty(Request["Weeks"]))
                    {
                        args.Weeks = parm.Weeks;
                    }
                    if (!string.IsNullOrEmpty(Request["Days"]))
                    {
                        args.Days = parm.Days;
                    }
                    if (!string.IsNullOrEmpty(Request["TotalAreal"]))
                    {
                        // args.TotalAreal = parm.TotalAreal;
                    }
                    if (!string.IsNullOrEmpty(Request["Created"]))
                    {
                        args.Created = parm.Created;
                    }
                    if (!string.IsNullOrEmpty(Request["CreatedBy"]))
                    {
                        args.CreatedBy = parm.CreatedBy;
                    }

                    SearchResult sr = p.Client.SearchProductionSet(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                PLogger.LogError(ex);
                Response.Write(ex.Message);
            }
        }
Esempio n. 20
0
        public void SearchQuotes()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchQuoteMainArgs args = new SearchQuoteMainArgs();
                    args.OrderBy       = "Created Desc";
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;

                    if (!string.IsNullOrEmpty(Request["SolutionID"]))
                    {
                        args.SolutionID = Guid.Parse(Request["SolutionID"].ToString());
                    }
                    if (!string.IsNullOrEmpty(Request["SolutionName"]))
                    {
                        args.SolutionName = Request["SolutionName"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["SolutionCode"]))
                    {
                        args.SolutionCode = Request["SolutionCode"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["CustomerID"]))
                    {
                        args.CustomerID = Guid.Parse(Request["CustomerID"].ToString());
                    }
                    if (!string.IsNullOrEmpty(Request["CustomerName"]))
                    {
                        args.CustomerName = Request["CustomerName"].ToString().Trim();
                    }
                    if (!string.IsNullOrEmpty(Request["Status"]))
                    {
                        args.Status = Request["Status"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["QuoteNo"]))
                    {
                        args.QuoteNo = Request["QuoteNo"].ToString().Trim();
                    }
                    if (CurrentUser.PartnerID != Guid.Empty)
                    {
                        args.PartnerID = CurrentUser.PartnerID;
                    }
                    SearchResult sr = p.Client.SearchQuote(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                PLogger.LogError(ex.Message);
                Response.Write(ex.Message);
            }
        }
Esempio n. 21
0
        public void SearchSuppliers()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchSupplierArgs args = new SearchSupplierArgs();

                    args.OrderBy = "[Created] Desc";
                    if (!string.IsNullOrEmpty(parm.Category))
                    {
                        args.Category = parm.Category;
                    }
                    if (!string.IsNullOrEmpty(parm.SupplierCode))
                    {
                        args.SupplierCode = parm.SupplierCode;
                    }

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

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

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

                    if (!string.IsNullOrEmpty(parm.City))
                    {
                        args.City = parm.City;
                    }
                    if (!string.IsNullOrEmpty(parm.Address))
                    {
                        args.Address = parm.Address;
                    }
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    SearchResult sr = p.Client.SearchSupplier(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                //WriteError(ex.Message, ex);
                throw ex;
            }
        }
Esempio n. 22
0
        public void SearchWorkFlow()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchWorkFlowArgs args = new SearchWorkFlowArgs();

                    args.OrderBy       = "SortNo asc";
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;

                    if (!string.IsNullOrEmpty(Request["WorkFlowID"]))
                    {
                        args.WorkFlowID = parm.WorkFlowID;
                    }
                    if (!string.IsNullOrEmpty(Request["WorkFlowCode"]))
                    {
                        args.WorkFlowCode = parm.WorkFlowCode;
                    }
                    if (!string.IsNullOrEmpty(Request["WorkFlowName"]))
                    {
                        args.WorkFlowName = parm.WorkFlowName;
                    }
                    if (!string.IsNullOrEmpty(Request["ImageUrl"]))
                    {
                        args.ImageUrl = parm.ImageUrl;
                    }
                    if (!string.IsNullOrEmpty(Request["Remark"]))
                    {
                        args.Remark = parm.Remark;
                    }
                    if (!string.IsNullOrEmpty(Request["Created"]))
                    {
                        args.Created = parm.Created;
                    }
                    if (!string.IsNullOrEmpty(Request["CreatedBy"]))
                    {
                        args.CreatedBy = parm.CreatedBy;
                    }

                    SearchResult sr = p.Client.SearchWorkFlow(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                PLogger.LogError(ex);
                Response.Write(ex.Message);
            }
        }
Esempio n. 23
0
        /// <summary>
        /// Search User
        /// </summary>
        public void SearchUser()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchUserArgs sargs = new SearchUserArgs();
                    sargs.OrderBy       = pagingParm.SortOrder;
                    sargs.RowNumberFrom = pagingParm.RowNumberFrom;
                    sargs.RowNumberTo   = pagingParm.RowNumberTo;
                    sargs.IsSystem      = false;

                    if (!string.IsNullOrEmpty(parm.UserCode))
                    {
                        List <string> UserCode = new List <string>();
                        UserCode.Add(parm.UserCode);
                        sargs.UserCodes = UserCode;
                    }
                    if (!string.IsNullOrEmpty(parm.UserName))
                    {
                        List <string> UserName = new List <string>();
                        UserName.Add(parm.UserName);
                        sargs.UserNames = UserName;
                    }
                    if (!string.IsNullOrEmpty(Request["IsDisabled"]) && Request["IsDisabled"] != "请选择")
                    {
                        sargs.IsDisabled = Convert.ToBoolean(Request["IsDisabled"]);
                    }

                    if (!string.IsNullOrEmpty(Request["DepartmentID"]) && Request["DepartmentID"] != "请选择")
                    {
                        sargs.DepartmentID = Guid.Parse(Request["DepartmentID"].ToString());
                    }

                    if (!string.IsNullOrEmpty(parm.IDNumber))
                    {
                        sargs.IDNumber = parm.IDNumber;
                    }
                    if (!string.IsNullOrEmpty(parm.Mobile))
                    {
                        sargs.Mobile = parm.Mobile;
                    }
                    SearchResult sr = p.Client.SearchUser(SenderUser, sargs);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }
Esempio n. 24
0
        public void SearchWorkOrder()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchWorkOrderArgs args = new SearchWorkOrderArgs();

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

                    if (!string.IsNullOrEmpty(Request["WorkOrderID"]))
                    {
                        args.WorkOrderID = parm.WorkOrderID;
                    }
                    if (!string.IsNullOrEmpty(Request["WorkOrderNo"]))
                    {
                        args.WorkOrderNo = parm.WorkOrderNo;
                    }
                    if (!string.IsNullOrEmpty(Request["OrderID"]))
                    {
                        args.OrderID = parm.OrderID;
                    }
                    if (!string.IsNullOrEmpty(Request["ProductionID"]))
                    {
                        args.ProductionID = parm.ProductionID;
                    }
                    if (!string.IsNullOrEmpty(Request["Status"]))
                    {
                        args.Status = parm.Status;
                    }
                    if (!string.IsNullOrEmpty(Request["Created"]))
                    {
                        args.Created = parm.Created;
                    }
                    if (!string.IsNullOrEmpty(Request["CreatedBy"]))
                    {
                        args.CreatedBy = parm.CreatedBy;
                    }

                    SearchResult sr = p.Client.SearchWorkOrder(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                PLogger.LogError(ex);
                Response.Write(ex.Message);
            }
        }
Esempio n. 25
0
        public void SearchMaterialPrice()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchMaterialQuotePriceArgs args = new SearchMaterialQuotePriceArgs();
                    args.OrderBy       = "MaterialCode";
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;

                    if (!string.IsNullOrEmpty(Request["Category"]))
                    {
                        args.Categorys = new List <string>();
                        args.Categorys.Add(Request["Category"].ToString());
                    }

                    if (!string.IsNullOrEmpty(Request["SubCategory"]))
                    {
                        args.SubCategorys = new List <string>();
                        args.SubCategorys.Add(Request["SubCategory"].ToString());
                    }

                    if (!string.IsNullOrEmpty(Request["MaterialName"]))
                    {
                        args.MaterialName = Request["MaterialName"].ToString();
                    }

                    if (!string.IsNullOrEmpty(Request["Style"]))
                    {
                        args.Style = Request["Style"].ToString();
                    }

                    if (!string.IsNullOrEmpty(Request["Color"]))
                    {
                        args.Color = Request["Color"].ToString();
                    }

                    SearchResult sr = p.Client.SearchMaterialQuotePrice(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }
Esempio n. 26
0
        /// <summary>
        /// List
        /// </summary>
        public void List()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchDepartmentArgs sargs = new SearchDepartmentArgs();

                    if (!string.IsNullOrEmpty(parm.DepartmentCode))
                    {
                        List <string> DepartmentCode = new List <string>();
                        DepartmentCode.Add(parm.DepartmentCode);
                        sargs.DepartmentCodes = DepartmentCode;
                    }
                    if (!string.IsNullOrEmpty(parm.DepartmentName) && parm.DepartmentName != "请选择")
                    {
                        List <string> DepartmentName = new List <string>();
                        DepartmentName.Add(parm.DepartmentName);
                        sargs.DepartmentNames = DepartmentName;
                    }


                    //if (!string.IsNullOrEmpty(Request["Closed"]))
                    //{
                    //    sargs.ClosedFrom = DateTime.Today;

                    //}


                    if (!string.IsNullOrEmpty(Request["IsDisabled"]))
                    {
                        sargs.IsDisabled = Convert.ToBoolean(Request["IsDisabled"]);
                    }
                    sargs.OrderBy       = string.IsNullOrEmpty(pagingParm.SortOrder.Trim()) ? "DepartmentID" : pagingParm.SortOrder;
                    sargs.RowNumberFrom = pagingParm.RowNumberFrom;
                    sargs.RowNumberTo   = pagingParm.RowNumberTo;
                    //Where

                    SearchResult sr = p.Client.SearchDepartment(SenderUser, sargs);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }
Esempio n. 27
0
        /// <summary>
        /// 成品仓库
        /// </summary>
        public void SearchMaterials()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchMaterialArgs args = new SearchMaterialArgs();
                    args.OrderBy       = "Category,MaterialCode";
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    //Where

                    if (!string.IsNullOrEmpty(Request["MaterialID"]))
                    {
                        args.MaterialIDs = new List <Guid>();
                        args.MaterialIDs.Add(Guid.Parse(Request["MaterialID"].ToString()));
                    }

                    if (!string.IsNullOrEmpty(Request["MaterialCode"]))
                    {
                        args.MaterialCode = Request["MaterialCode"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["MaterialName"]))
                    {
                        args.MaterialName = Request["MaterialName"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["Category"]))
                    {
                        args.Categorys = new List <string>();
                        args.Categorys.Add(Request["Category"].ToString());
                    }
                    if (!string.IsNullOrEmpty(Request["SubCategory"]))
                    {
                        args.SubCategorys = new List <string>();
                        args.SubCategorys.Add(Request["SubCategory"].ToString());
                    }
                    SearchResult sr = p.Client.SearchMaterial(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
                throw ex;
            }
        }
Esempio n. 28
0
        public void SearchRoomDesigners()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchRoomDesignerArgs sargs = new SearchRoomDesignerArgs();
                    sargs.OrderBy = "[Created] desc";

                    //Where
                    if (!string.IsNullOrEmpty(Request["CustomerName"]))
                    {
                        sargs.CustomerName = Request["CustomerName"].ToString();
                    }
                    if (!string.IsNullOrEmpty(parm.Status))
                    {
                        sargs.Status = parm.Status.Split(',').ToList();
                    }
                    if (CurrentUser.PartnerID != Guid.Empty)
                    {
                        sargs.PartnerID = CurrentUser.PartnerID;
                    }
                    //if (!string.IsNullOrEmpty(CurrentUser.Position))
                    //{
                    //    if (CurrentUser.Position.Equals("量尺",StringComparison.CurrentCultureIgnoreCase))
                    //    {

                    //    }
                    //}
                    if (CurrentUser.UserID != Guid.Empty)
                    {
                        sargs.Designer = Convert.ToString(CurrentUser.UserID);
                    }
                    sargs.RowNumberFrom = pagingParm.RowNumberFrom;
                    sargs.RowNumberTo   = pagingParm.RowNumberTo;
                    SearchResult sr = p.Client.SearchRoomDesigner(SenderUser, sargs);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }
Esempio n. 29
0
 public void SearchWarehouseOutMain()
 {
     try
     {
         using (ProxyBE p = new ProxyBE())
         {
             SearchTransportMainArgs args = new SearchTransportMainArgs();
             args.OrderBy = "[Created] Desc";
             if (!string.IsNullOrEmpty(Parm.TransportNo))
             {
                 args.TransportNo = Parm.TransportNo;
             }
             if (!string.IsNullOrEmpty(Request["PlateNo"]))
             {
                 args.PlateNo = Request["PlateNo"];
             }
             if (!string.IsNullOrEmpty(Request["DriverName"]))
             {
                 args.DriverName = Request["DriverName"];
             }
             if (!string.IsNullOrEmpty(Request["EnterpriseName"]))
             {
                 args.EnterpriseName = Request["EnterpriseName"];
             }
             if (!string.IsNullOrEmpty(Parm.Source))
             {
                 args.DriverName = Parm.Source;
             }
             if (!string.IsNullOrEmpty(Parm.Target))
             {
                 args.DriverName = Parm.Target;
             }
             args.RowNumberFrom = pagingParm.RowNumberFrom;
             args.RowNumberTo   = pagingParm.RowNumberTo;
             SearchResult sr = p.Client.SearchTransportMain(SenderUser, args);
             Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 30
0
        public void SearchMaterialPrice()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchMaterial2SupplierArgs sargs = new SearchMaterial2SupplierArgs();

                    sargs.OrderBy       = "[Price]";
                    sargs.RowNumberFrom = pagingParm.RowNumberFrom;
                    sargs.RowNumberTo   = pagingParm.RowNumberTo;

                    //Where
                    //if (!string.IsNullOrEmpty(parm.))
                    //{
                    //    sargs.MaterialName = parm.MaterialName;
                    //}
                    //if (!string.IsNullOrEmpty(parm.Category))
                    //{
                    //    sargs.Category = parm.Category;
                    //}
                    //if (!string.IsNullOrEmpty(parm.SubCategory))
                    //{
                    //    sargs.SubCategory = parm.SubCategory;
                    //}
                    //if (!string.IsNullOrEmpty(parm.Color))
                    //{
                    //    sargs.Color = parm.Color;
                    //}
                    //if (!string.IsNullOrEmpty(parm.Style))
                    //{
                    //    sargs.Style = parm.Style;
                    //}
                    SearchResult sr = p.Client.SeachMaterial2Supplier(SenderUser, sargs);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }