Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("statis_sales", "销售报表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            display      = RequestTool.RequestInt("display", 0);
            Pay_id       = RequestTool.RequestInt("Pay_id", 0);
            Transport_id = RequestTool.RequestInt("Transport_id", 0);
            dateFrom     = RequestTool.RequestString("dateFrom");
            if (dateFrom == "")
            {
                dateFrom = System.DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");
            }
            dateTo = RequestTool.RequestString("dateTo");
            if (dateTo == "")
            {
                dateTo = System.DateTime.Now.AddDays(0).ToString("yyyy-MM-dd");
            }
            Y_dateFrom = Convert.ToDateTime(dateFrom).Year;
            M_dateFrom = Convert.ToDateTime(dateFrom).Month;
            D_dateFrom = Convert.ToDateTime(dateFrom).Day;
            Y_dateTo   = Convert.ToDateTime(dateTo).Year;
            M_dateTo   = Convert.ToDateTime(dateTo).Month;
            D_dateTo   = Convert.ToDateTime(dateTo).Day;
            pays       = B_Lebi_Pay.GetList("", "Sort desc");
            transports = B_Lebi_Transport.GetList("", "Sort desc");
        }
Beispiel #2
0
        public string GetOptionTransport(int ID)
        {
            List <Lebi_Transport> models = B_Lebi_Transport.GetList("", "");
            string str = "<option value=\"\">请选择</option>";

            foreach (Lebi_Transport model in models)
            {
                string sel = "";
                if (ID == model.id)
                {
                    sel = "selected";
                }
                str += "<option value=\"" + model.id + "\" " + sel + ">" + model.Name + "</option>";
            }
            return(str);
        }
Beispiel #3
0
        public string transportlist(int sid)
        {
            List <Lebi_Transport> models = B_Lebi_Transport.GetList("", "Sort desc");
            string str = "";

            foreach (Lebi_Transport m in models)
            {
                string sel = "";
                if (m.id == sid)
                {
                    sel = "selected";
                }
                str += "<option code=\"" + m.Type_id_TransportType + "\" value=\"" + m.id + "\" " + sel + ">" + m.Name + "</option>";
            }
            return(str);
        }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_transport_list", "配送方式"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }
            key          = RequestTool.RequestString("key");
            PageSize     = RequestTool.getpageSize(25);
            string where = "1=1";
            //if (pid > 0)
            //    where += " and Parentid="+pid;
            if (key != "")
            {
                where += " and [Name] like lbsql{'%" + key + "%'}";
            }
            models = B_Lebi_Transport.GetList(where, "Sort asc", PageSize, page);
            int recordCount = B_Lebi_Transport.Counts(where);

            PageString = Shop.Bussiness.Pager.GetPaginationString("?page={0}&key=" + key, page, PageSize, recordCount);
        }
Beispiel #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("statis_orderproduct", "订单报表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            key          = RequestTool.RequestString("key");
            peisongdian  = RequestTool.RequestString("peisongdian");
            IsPay        = RequestTool.RequestInt("IsPay", -1);
            Pay_id       = RequestTool.RequestInt("Pay_id", 0);
            Transport_id = RequestTool.RequestInt("Transport_id", 0);
            supplier_id  = RequestTool.RequestString("supplier_id");
            dateFrom     = RequestTool.RequestString("dateFrom");
            if (dateFrom == "")
            {
                dateFrom = System.DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");
            }
            dateTo = RequestTool.RequestString("dateTo");
            if (dateTo == "")
            {
                dateTo = System.DateTime.Now.AddDays(0).ToString("yyyy-MM-dd");
            }

            suppliers = B_Lebi_Supplier.GetList("", "");
            where     = "1=1";

            if (IsPay != -1)
            {
                where += " and IsPaid = " + IsPay;
            }
            if (Pay_id != 0)
            {
                where += " and Pay_id = " + Pay_id;
            }
            if (Transport_id != 0)
            {
                where += " and Transport_id = " + Transport_id;
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and Time_Add>='" + dateFrom + "' and Time_Add<='" + dateTo + " 23:59:59'";
            }
            if (supplier_id != "")
            {
                try
                {
                    supplier_id = Convert.ToInt32(supplier_id).ToString();
                }
                catch
                {
                    supplier_id = "0";
                }
                where += " and Supplier_id = " + supplier_id;
            }
            if (peisongdian != "")
            {
                where += " and  Supplier_Delivery_id  in (select w.id from [Lebi_Supplier_Delivery] as w where w.Name like '%" + peisongdian + "%')";
            }

            if (key != "")
            {
                where += " and (Code like lbsql{'%" + key + "%'} or T_Name like lbsql{'%" + key + "%'}))";
            }
            PageSize = RequestTool.getpageSize(25);
            page     = RequestTool.RequestInt("page");
            orders   = B_Lebi_Order.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Order.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key + "&peisongdian=" + peisongdian + "&supplier_id=" + supplier_id + "&dateTo=" + dateTo + "&dateFrom=" + dateFrom + "&IsPay=" + IsPay + "&Pay_id=" + Pay_id + "&Transport_id=" + Transport_id, page, PageSize, recordCount);
            where      = Server.UrlEncode(where);
            pays       = B_Lebi_Pay.GetList("", "Sort desc");
            transports = B_Lebi_Transport.GetList("", "Sort desc");
            //Response.Write(where);
        }
Beispiel #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("statis_orderproduct", "订单报表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            key          = RequestTool.RequestString("key");
            orderkey     = RequestTool.RequestString("orderkey");
            IsPay        = RequestTool.RequestInt("IsPay", -1);
            Pay_id       = RequestTool.RequestInt("Pay_id", 0);
            Transport_id = RequestTool.RequestInt("Transport_id", 0);
            supplier_id  = RequestTool.RequestString("supplier_id");
            dateFrom     = RequestTool.RequestString("dateFrom");
            if (dateFrom == "")
            {
                dateFrom = System.DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");
            }
            dateTo = RequestTool.RequestString("dateTo");
            if (dateTo == "")
            {
                dateTo = System.DateTime.Now.AddDays(0).ToString("yyyy-MM-dd");
            }

            suppliers = B_Lebi_Supplier.GetList("", "");
            where     = "1=1";

            if (IsPay != -1)
            {
                where += " and w.IsPaid = " + IsPay;
            }
            if (Pay_id != 0)
            {
                where += " and w.Pay_id = " + Pay_id;
            }
            if (Transport_id != 0)
            {
                where += " and w.Transport_id = " + Transport_id;
            }
            where += " and (datediff(d,w.Time_Add,'" + dateFrom + "')<=0 and datediff(d,w.Time_Add,'" + dateTo + "')>=0)";
            if (supplier_id != "")
            {
                try
                {
                    supplier_id = Convert.ToInt32(supplier_id).ToString();
                }
                catch
                {
                    supplier_id = "0";
                }
                where += " and w.Supplier_id = " + supplier_id;
            }
            if (orderkey != "")
            {
                where += " and  w.Code like '%" + orderkey + "%'";
            }
            where = "Order_id in (select w.id from Lebi_Order as w where " + where + ")";
            if (key != "")
            {
                where += " and (Product_Name like lbsql{'%" + key + "%'} or Product_Number like lbsql{'%" + key + "%'})";
            }
            PageSize = RequestTool.getpageSize(25);
            //PageSize = 100;
            page = RequestTool.RequestInt("page");
            pros = B_Lebi_Order_Product.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Order_Product.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key + "&orderkey=" + orderkey + "&supplier_id=" + supplier_id + "&dateTo=" + dateTo + "&dateFrom=" + dateFrom + "&IsPay=" + IsPay + "&Pay_id=" + Pay_id + "&Transport_id=" + Transport_id, page, PageSize, recordCount);
            where      = Server.UrlEncode(where);
            pays       = B_Lebi_Pay.GetList("", "Sort desc");
            transports = B_Lebi_Transport.GetList("", "Sort desc");
            //Response.Write(where);
        }