Exemple #1
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);
            }
        }
Exemple #2
0
 public SearchResult SearchQuote(Sender sender, SearchQuoteMainArgs args)
 {
     try
     {
         using (ObjectProxy op = new ObjectProxy())
         {
             return(op.SearchQuote(args));
         }
     }
     catch (Exception ex)
     {
         PLogger.LogError(ex);
         throw ex;
     }
 }
        public void SearchCustomerTransDetail()
        {
            try
            {
                using (ProxyBE p = new ProxyBE())
                {
                    SearchQuoteMainArgs args = new SearchQuoteMainArgs();
                    args.RowNumberFrom = pagingParm.RowNumberFrom;
                    args.RowNumberTo   = pagingParm.RowNumberTo;
                    args.OrderBy       = "Created desc";

                    if (!string.IsNullOrEmpty(Request["SolutionCode"]))
                    {
                        args.SolutionCode = Request["SolutionCode"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["SolutionName"]))
                    {
                        args.SolutionName = Request["SolutionName"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["CustomerName"]))
                    {
                        args.CustomerName = Request["CustomerName"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["QuoteNo"]))
                    {
                        args.QuoteNo = Request["QuoteNo"].ToString();
                    }
                    if (!string.IsNullOrEmpty(Request["Status"]))
                    {
                        args.Status = Request["Status"].ToString();
                    }
                    if (CurrentUser.PartnerID != Guid.Empty)
                    {
                        args.PartnerID = CurrentUser.PartnerID;
                    }

                    SearchResult sr = p.Client.SearchQuote(SenderUser, args);
                    Response.Write(JSONHelper.Dataset2Json(sr.DataSet));

                    #region
                    //SearchOrderArgs
                    //SearchCustomerTransDetailArgs args = new SearchCustomerTransDetailArgs();
                    //args.RowNumberFrom = pagingParm.RowNumberFrom;
                    //args.RowNumberTo = pagingParm.RowNumberTo;
                    //args.OrderBy = "Created desc";

                    //if (CurrentUser.PartnerID!=Guid.Empty)
                    //{
                    //   args.PartnerID = CurrentUser.PartnerID;
                    //}
                    //if(!string.IsNullOrEmpty(Request["CustomerName"]))
                    //{
                    //    args.CustomerName = Request["CustomerName"].ToString();
                    //}
                    //if (!string.IsNullOrEmpty(Request["LinkMan"]))
                    //{
                    //    args.LinkMan = Request["LinkMan"].ToString();
                    //}
                    //if (!string.IsNullOrEmpty(Request["Mobile"]))
                    //{
                    //    args.Mobile = Request["Mobile"].ToString();
                    //}
                    //SearchResult sr = p.Client.SearchCustomerTransDetail(SenderUser,args);

                    #endregion
                }
            }
            catch (Exception ex)
            {
                WriteError(ex.Message, ex);
            }
        }