Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("log_list", "操作日志列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }
            PageSize = RequestTool.getpageSize(25);
            id       = RequestTool.RequestInt("id", 0);
            key      = RequestTool.RequestString("key");
            dateFrom = RequestTool.RequestString("dateFrom");
            dateTo   = RequestTool.RequestString("dateTo");
            type     = RequestTool.RequestString("type");
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            string where = "1=1";
            if (dateFrom != "" && dateTo != "")
            {
                where += " and Time_Add>='" + FormatDate(lbsql_dateFrom) + "' and Time_Add<='" + FormatDate(lbsql_dateTo) + " 23:59:59'";
            }
            where += " and TableName='StockCaution'";
            models = B_Lebi_Log.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Log.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&dateFrom=" + dateFrom + "&dateTo=" + dateTo, page, PageSize, recordCount);
        }
Ejemplo n.º 2
0
        protected string billstatus = "";//发票状态
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("order_edit", "编辑订单"))
            {
                NewPageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            string where = "id = " + id + "";
            if (!string.IsNullOrEmpty(EX_Admin.Project().Site_ids))
            {
                where += " and (Site_id in (" + EX_Admin.Project().Site_ids + "))";
            }
            if (!string.IsNullOrEmpty(EX_Admin.Project().Supplier_ids))
            {
                where += " and (Supplier_id in (" + EX_Admin.Project().Supplier_ids + "))";
            }
            model = B_Lebi_Order.GetModel(where);
            if (model == null)
            {
                model = new Lebi_Order();
            }
            if (domain3admin && CurrentAdmin.Site_ids != "")
            {
                if (!("," + CurrentAdmin.Site_ids + ",").Contains("," + model.Site_id + ","))
                {
                    PageError();
                    return;
                }
            }
            oldmodel = B_Lebi_Order.GetModel(model.Order_id);
            if (oldmodel == null)
            {
                oldmodel = new Lebi_Order();
            }
            //if (model.Type_id_OrderType == 212)
            //    str = "- ";
            //if (model.Type_id_OrderType == 212)
            //    Response.Redirect("Torder_view.aspx?id=" + id);
            pros    = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", "");
            Logs    = B_Lebi_Log.GetList("TableName='Order' and Keyid='" + model.id + "'", "id desc");
            torders = B_Lebi_Transport_Order.GetList("Order_id=" + model.id + "", "id desc");
            comms   = B_Lebi_Comment.GetList("TableName='Order' and Keyid=" + model.id + "", "id desc");
            langs   = Language.Languages();
            Lebi_Bill bill = B_Lebi_Bill.GetModel("Order_id=" + model.id + "");

            if (bill == null)
            {
                billstatus = Tag("不开发票");
            }
            else
            {
                billstatus = EX_Type.TypeName(bill.Type_id_BillStatus);
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_order_edit", "编辑订单"))
            {
                NewPageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Order.GetModel("Supplier_id = " + CurrentSupplier.id + " and id = " + id);
            if (model == null)
            {
                PageError();
                return;
            }
            else
            {
                shop = CurrentSupplier;
                if (shop == null)
                {
                    shop = new Lebi_Supplier();
                }

                if (CurrentSupplier.id != model.Supplier_id)
                {
                    PageError();
                    return;
                }
            }
            if (model.Type_id_OrderType == 212)
            {
                str = "- ";
            }
            //if (model.Type_id_OrderType == 212)
            //    Response.Redirect("Torder_view.aspx?id=" + id);
            pros    = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", "");
            Logs    = B_Lebi_Log.GetList("TableName='Order' and Keyid='" + model.id + "'", "id desc");
            torders = B_Lebi_Transport_Order.GetList("Order_id=" + model.id + "", "id desc");
            comms   = B_Lebi_Comment.GetList("TableName='Order' and Keyid=" + model.id + "", "id desc");
            langs   = Language.Languages();
            Lebi_Bill bill = B_Lebi_Bill.GetModel("Order_id=" + model.id + "");

            if (bill == null)
            {
                billstatus = Tag("不开发票");
            }
            else
            {
                billstatus = Tag(EX_Type.TypeName(bill.Type_id_BillStatus));
            }
            TransportCount = B_Lebi_Transport_Order.Counts("Order_id=" + model.id + "");
            CommentCount   = B_Lebi_Comment.Counts("TableName='Order' and Keyid=" + model.id + "");
            LogCount       = B_Lebi_Log.Counts("TableName='Order' and Keyid='" + model.id + "'");
            deliveries     = B_Lebi_Supplier_Delivery.GetList("Supplier_id = " + model.Supplier_id + "", "Sort desc");
            DeliveryCount  = B_Lebi_Supplier_Delivery.Counts("Supplier_id = " + model.Supplier_id + "");
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("log_view", "查看操作日志"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Log.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Log();
            }
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_log_list", "操作日志"))
            {
                PageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Log.GetModel("id = " + id + " and Supplier_id = " + CurrentSupplier.id + "");
            if (model == null)
            {
                model = new Lebi_Log();
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("log_list", "操作日志列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize = RequestTool.getpageSize(25);
            id       = RequestTool.RequestInt("id", 0);
            key      = RequestTool.RequestString("key");
            dateFrom = RequestTool.RequestString("dateFrom");
            dateTo   = RequestTool.RequestString("dateTo");
            type     = RequestTool.RequestString("type");
            lb       = RequestTool.RequestString("lb");
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            string where = "1=1";
            if (id > 0)
            {
                where += " and Admin_id=" + id;
            }
            if (key != "")
            {
                where += " and (Content like lbsql{'%" + key + "%'} or Description like lbsql{'%" + key + "%'} or TableName like lbsql{'%" + key + "%'} or IP_Add like lbsql{'%" + key + "%'})";
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and Time_Add>='" + FormatDate(lbsql_dateFrom) + "' and Time_Add<='" + FormatDate(lbsql_dateTo) + " 23:59:59'";
            }
            if (type == "0")
            {
                where += " and charindex(TableName,'Login')=0";
            }
            if (type == "1")
            {
                where += " and TableName='Login'";
            }
            if (lb != "all")
            {
                where += " and TableName!='system' and TableName!=''";
            }
            models = B_Lebi_Log.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Log.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key + "&lb=" + lb + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&type=" + type + "&id=" + id, page, PageSize, recordCount);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 删除操作日志
        /// </summary>
        public void Log_Del()
        {
            if (!EX_Admin.Power("log_del", "删除操作日志"))
            {
                AjaxNoPower();
                return;
            }
            string ids = RequestTool.RequestString("id");

            if (ids == "")
            {
                Response.Write("{\"msg\":\"" + Tag("请选择要删除的信息") + "\"}");
                return;
            }
            B_Lebi_Log.Delete("id in (lbsql{" + ids + "})");
            string action      = Tag("删除操作日志");
            string description = ids;

            Log.Add(action, "Log", ids, CurrentAdmin, description);
            Response.Write("{\"msg\":\"OK\"}");
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 删除商家
        /// </summary>
        public void User_Del()
        {
            if (!EX_Admin.Power("supplier_user_del", "删除商家"))
            {
                AjaxNoPower();
                return;
            }
            string id = RequestTool.RequestString("ids");

            if (id == "")
            {
                Response.Write("{\"msg\":\"" + Tag("请选择要删除的信息") + "\"}");
                return;
            }
            B_Lebi_Supplier.Delete("id in (lbsql{" + id + "})");
            List <Lebi_Order> modellist = B_Lebi_Order.GetList("Supplier_id in (lbsql{" + id + "})", "");

            foreach (Lebi_Order model in modellist)
            {
                B_Lebi_Order.Delete("id = " + model.id + "");
                B_Lebi_Order_Log.Delete("Order_id = " + model.id + "");
                B_Lebi_Order_Product.Delete("Order_id = " + model.id + "");
            }
            B_Lebi_Brand.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ProPerty.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ProPerty_Tag.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Cash.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Message.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_Money.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_Bank.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_BillType.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_ProductType.Delete("Supplier_id in (lbsql{" + id + "})");
            //B_Lebi_Supplier_Verified.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_Verified_Log.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Log.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ServicePanel.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ServicePanel_Group.Delete("Supplier_id in (lbsql{" + id + "})");
            Log.Add("删除商家", "Supplier_User", id.ToString(), CurrentAdmin, id.ToString());
            Response.Write("{\"msg\":\"OK\"}");
        }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_log_list", "操作日志"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }
            PageSize = RequestTool.getpageSize(25);
            id       = RequestTool.RequestInt("id", 0);
            key      = RequestTool.RequestString("key");
            dateFrom = RequestTool.RequestString("dateFrom");
            dateTo   = RequestTool.RequestString("dateTo");
            type     = RequestTool.RequestString("type");
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            string where = "Supplier_id = " + CurrentSupplier.id + "";
            if (key != "")
            {
                where += " and (Content like lbsql{'%" + key + "%'} or Description like lbsql{'%" + key + "%'} or TableName like lbsql{'%" + key + "%'})";
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)";
            }
            if (type == "0")
            {
                where += " and charindex(TableName,'Login')=0";
            }
            if (type == "1")
            {
                where += " and TableName='Login'";
            }
            models = B_Lebi_Log.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Log.Counts(where);

            PageString = Shop.Bussiness.Pager.GetPaginationString("?page={0}&key=" + key + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&type=" + type, page, PageSize, recordCount);
        }
Ejemplo n.º 10
0
        protected string billstatus = "";//发票状态
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_order_edit", "编辑订单"))
            {
                NewPageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Order.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Order();
            }
            if (model.Type_id_OrderType == 212)
            {
                str = "- ";
            }
            if (model.Type_id_OrderType == 212)
            {
                Response.Redirect("Torder_view.aspx?id=" + id);
            }
            pros    = B_Lebi_Order_Product.GetList("Order_id=" + model.id + " and Supplier_id = " + CurrentSupplier.id + "", "");
            Logs    = B_Lebi_Log.GetList("TableName='Order' and Keyid='" + model.id + "'", "id desc");
            torders = B_Lebi_Transport_Order.GetList("Order_id=" + model.id + " and Supplier_id = " + CurrentSupplier.id + "", "id desc");
            comms   = B_Lebi_Comment.GetList("TableName='Order' and Keyid=" + model.id + "", "id desc");
            langs   = Language.Languages();
            Lebi_Bill bill = B_Lebi_Bill.GetModel("Order_id=" + model.id + "");

            if (bill == null)
            {
                billstatus = Tag("不开发票");
            }
            else
            {
                billstatus = Tag(EX_Type.TypeName(bill.Type_id_BillStatus));
            }
        }
Ejemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("order_edit", "编辑订单"))
            {
                NewPageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Order.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Order();
                shop  = new Lebi_Supplier();
            }
            else
            {
                if (model.Supplier_id > 0)
                {
                    shop = B_Lebi_Supplier.GetModel(model.Supplier_id);
                }
                if (shop == null)
                {
                    shop = new Lebi_Supplier();
                }
                if (domain3admin && CurrentAdmin.Site_ids != "")
                {
                    if (!("," + CurrentAdmin.Site_ids + ",").Contains("," + model.Site_id + ","))
                    {
                        PageError();
                        return;
                    }
                }
            }
            if (model.Type_id_OrderType == 212)
            {
                str = "- ";
            }
            //if (model.Type_id_OrderType == 212)
            //    Response.Redirect("Torder_view.aspx?id=" + id);
            pros    = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", "");
            Logs    = B_Lebi_Log.GetList("TableName='Order' and Keyid='" + model.id + "'", "id desc");
            torders = B_Lebi_Transport_Order.GetList("Order_id=" + model.id + "", "id desc");
            comms   = B_Lebi_Comment.GetList("TableName='Order' and Keyid=" + model.id + "", "id desc");
            langs   = Language.Languages();
            Lebi_Bill bill = B_Lebi_Bill.GetModel("Order_id=" + model.id + "");

            if (bill == null)
            {
                billstatus = Tag("不开发票");
            }
            else
            {
                billstatus = EX_Type.TypeName(bill.Type_id_BillStatus);
            }
            TransportCount = B_Lebi_Transport_Order.Counts("Order_id=" + model.id + "");
            CommentCount   = B_Lebi_Comment.Counts("TableName='Order' and Keyid=" + model.id + "");
            LogCount       = B_Lebi_Log.Counts("TableName='Order' and Keyid='" + model.id + "'");
            deliveries     = B_Lebi_Supplier_Delivery.GetList("Supplier_id = " + model.Supplier_id + "", "Sort desc");
            DeliveryCount  = B_Lebi_Supplier_Delivery.Counts("Supplier_id = " + model.Supplier_id + "");
            if (model.Promotion_Type_ids != "")
            {
                //List<Lebi_Promotion_Type> Promotions = B_Lebi_Promotion_Type.GetList("id in (" + model.Promotion_Type_ids + ")", "");
                //foreach (Lebi_Promotion_Type p in Promotions)
                //{
                //    if (Promotion == "")
                //        Promotion = Lang(p.Name);
                //    else
                //        Promotion += "<br/>" + Lang(p.Name);
                //}
                Promotion = Lang(model.Promotion_Type_Name);
            }
        }