⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 outstock_list.aspx.cs

📁 易想商城系统
💻 CS
字号:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;
using YXShop.Common;
using YXShop.Web.Admin.Control;
using Shop.Web.UI;
using System.Text;

namespace YXShop.Web.Admin.Product
{
    public partial class outStock_List : System.Web.UI.Page
    {
        BasePage bp = new BasePage();
        YXShop.BLL.YXShop_OutOfStock BLL = new YXShop.BLL.YXShop_OutOfStock();
        public PageSet ps;
        protected void Page_Load(object sender, EventArgs e)
        {
            this.PageNavigator1.OnPageChange += new PageChangeHandler(PageNavigator1_PageChange);
            if (Request["act"] == "del" && !string.IsNullOrEmpty(Request["OOS_ID"]))
            {
                try
                {
                    BLL.Del(Convert.ToString(Request["OOS_ID"]));
                    YXShop.Common.alert.showAndGo("缺货登记信息删除成功!", "?");
                }
                catch
                {
                    YXShop.Common.alert.showAndGo("对不起,标签删除失败,请重试!", "?");
                }
            }
            else 
            {
            
            }
            if (!IsPostBack)
            {
                StartLoad(1);
            }
        }

        #region 列表信息
        //获得列表
        protected void PageNavigator1_PageChange(object sender, int PageIndex)
        {
            StartLoad(PageIndex);
        }

        protected void StartLoad(int PageIndex)
        {
            int i = 0;
            int j = 0;
            List<YXShop.Model.YXShop_OutOfStock> data = BLL.GetList("", PageIndex, 20, out i, out j);
            this.PageNavigator1.PageCount = j;
            this.PageNavigator1.PageIndex = PageIndex;
            this.PageNavigator1.RecordCount = i;
            Questionlists.DataSource = data;                              //设置datalist数据源
            Questionlists.DataBind();                                   //绑定数据源
        }
        #endregion

        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {

        }

        protected void btnOpreate_Click(object sender, EventArgs e)
        {
            string cmtIDList = Request["cbID"];
            if (cmtIDList.Trim().Length == 0)
            {
                bp.PageError("请选择数据项!", "javascript:history.back();", true);
            }
            else
            {
                YXShop.BLL.YXShop_OutOfStock BLL = new YXShop.BLL.YXShop_OutOfStock();
                if (BLL.Del(Request["cbID"]) == 1)
                {
                    bp.PageRight("缺货登记信息删除成功!。<li><a href=\"outStock_List.aspx\" class=\"reshow\">返回缺货登记管理</a></li>", "outStock_List.aspx", true);
                }
                else
                {
                    bp.PageError("错误的参数!", "javascript:history.back();", true);
                }
            }
        }

        public string linkInfo(string OOS_Telephone, string OOS_Mobile, string OOS_QQ, string OOS_Email, string OOS_MSN)
        {
            string info = "";
            info += "固定电话:"+OOS_Telephone+"\n";
            info += "移动电话:" + OOS_Mobile + "\n";
            info += "电子邮件:" + OOS_Email + "\n";
            info += "MSN:" + OOS_MSN + "\n";
            info += "QQ:" + OOS_QQ;
            return info;
        }
        public string proInfo(string proList)
        {
            StringBuilder proInfoList = new StringBuilder();
            string[] classAndPro = proList.Split('|');            
            string[] classList=classAndPro[0].Split(',');
            string[] proL = classAndPro[1].Split(',');
            YXShop.BLL.Pro_Categories BLLPC = new YXShop.BLL.Pro_Categories();            
            YXShop.Model.Pro_Categories ModelPC = new YXShop.Model.Pro_Categories();
            DataSet ds = BLLPC.YXshop_getClassByIDList(classAndPro[0]);           
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    proInfoList.Append(ds.Tables[0].Rows[i]["ProC_Name"] + "==》" + proL[i] + "<br />");
                }
            }
            return proInfoList.ToString();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -