コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     hasChild = "<input type=\"hidden\" id=\"Pronames{0}\" value=\"{1}\" /><img src=\"/Images/TreeLineImages/t.gif\" border=\"0\" /><input name=\"Item\" id=\"Item_{2}_{0}\" type=\"checkbox\" onclick=\"SetNodeSelect(this,{0});\" value=\"{0}\"><img src=\"/Images/TreeLineImages/plus.gif\" border=\"0\" /><a href='javascript:;' id='a{0}' class='list1'><span class='list_span'>{1}</span></a>";
     noChild  = "<input type=\"hidden\" id=\"Pronames{0}\" value=\"{1}\" /><img src=\"/Images/TreeLineImages/t.gif\" border=\"0\" /><input name=\"Item\" id=\"Item_{2}_{0}\" type=\"checkbox\" onclick=\"SetNodeSelect(this,{0});\" value=\"{0}\"><img src=\"/Images/ModelIcon/Article.gif\" border=\"0\" /><a href='javascript:;'>{1}</a>";
     BindNode();
     if (!IsPostBack)
     {
         string type = Request.QueryString["type"];
         if (type == "1")
         {
             DataTable perminfo = pll.GetProductAll(0);
             tr1.Visible = true;
             tr2.Visible = false;
             Add_B.Attributes.Add("OnClick", "GetCheckvalue();return false;");
             DataBind();
         }
         else
         {
             tr1.Visible = false;
             tr2.Visible = true;
             Add_B.Attributes.Add("OnClick", "GetCheckNode();return false;");
         }
     }
     Call.SetBreadCrumb(Master, "<li>商城管理</li><li>促销管理</li><li><a href='AddagioCommodity.aspx'>促销商品列表</a></li>");
 }
コード例 #2
0
        public void MyBind()
        {
            DataTable dt = new DataTable();

            if (!string.IsNullOrEmpty(KeyWord))
            {
                if (DataConverter.CLng(KeyWord) > 0)
                {
                    dt = bll.ProductSearch(NodeID, 10, KeyWord);
                }
                else
                {
                    dt = bll.ProductSearch(NodeID, 0, KeyWord);
                }
            }
            else
            {
                dt = bll.GetProductAll(NodeID, StoreID, QuickSouch, Pid);
            }
            string byfilde = txtbyfilde.SelectedValue.ToString();
            string byOrder = txtbyOrder.SelectedValue.ToString();

            if (!string.IsNullOrEmpty(byfilde))
            {
                dt.DefaultView.Sort = byfilde + " " + byOrder;
                dt = dt.DefaultView.ToTable();
            }
            countsp.InnerText = dt.Rows.Count.ToString();
            EGV.DataSource    = dt;
            EGV.DataBind();
        }
コード例 #3
0
        private void MyBind(string keyword = "")
        {
            DataTable dt = new DataTable();

            switch (Filter)
            {
            case "admin":
            {
                if (!badmin.CheckLogin())
                {
                    function.WriteErrMsg("您还没有登录");
                }
                dt = pll.GetProductAll(0, 0, 0, 0, ProClass);
            }
            break;

            case "user":
            {
                M_UserInfo mu = buser.GetLogin();
                if (mu.UserID < 1)
                {
                    function.WriteErrMsg("您还没有登录");
                }
                M_CommonData storeMod = conBll.SelMyStore(mu.UserName);
                if (storeMod == null)
                {
                    function.WriteErrMsg("您还没有店铺");
                }
                dt = pll.GetProductAll(0, storeMod.GeneralID);        //StoreID
            }
            break;

            default:
                function.WriteErrMsg("参数错误");
                break;
            }
            dt.DefaultView.RowFilter = "ID <> " + ProID + " AND ProName LIKE '%" + keyword + "%'";
            dt.DefaultView.Sort      = "ID ASC";
            RPT.DataSource           = dt;
            RPT.DataBind();
            if (ProClass.Equals("6"))
            {
                AddIDC_Btn.Visible = true; AddPro_Btn.Visible = false;
            }
        }
コード例 #4
0
ファイル: SuitPro.aspx.cs プロジェクト: zoomlacms/web043
 public void MyBind()
 {
     EGV.DataSource = proBll.GetProductAll(new Filter_Product()
     {
         pclass = 2,
         stype  = "ProName",
     });
     EGV.DataBind();
 }
コード例 #5
0
        public void MyBind()
        {
            Filter_Product filter = new Filter_Product()
            {
                NodeID = NodeID, storeid = StoreID, type = QuickSouch, pid = 0, stype = SType_DP.SelectedValue, skey = KeyWord, hasRecycle = 0, proclass = ""
            };

            filter.orderSort = filter.SetSort(txtbyfilde.SelectedValue, txtbyOrder.SelectedValue);
            DataTable dt = bll.GetProductAll(filter);

            countsp.InnerText = dt.Rows.Count.ToString();
            EGV.DataSource    = dt;
            EGV.DataBind();
        }
コード例 #6
0
        private void MyBind()
        {
            DataTable dt = new DataTable();

            if (!string.IsNullOrEmpty(KeyWord))
            {
                dt = proBll.ProductSearch(NodeID, 0, KeyWord);
            }
            else
            {
                dt = proBll.GetProductAll(NodeID);
            }
            RPT.DataSource = dt;
            RPT.DataBind();
        }
コード例 #7
0
ファイル: ProductList.aspx.cs プロジェクト: zoomlacms/web047
    public void MyBind()
    {
        M_UserInfo   mu       = buser.GetLogin();
        M_CommonData storeMod = conBll.SelMyStore_Ex();
        DataTable    dt       = new DataTable();

        if (string.IsNullOrEmpty(KeyWord))
        {
            dt = bll.GetProductAll(NodeID, storeMod.GeneralID, QuickSouch, Pid);
        }
        else
        {
            if (DataConverter.CLng(KeyWord) > 0)
            {
                dt = bll.ProductSearch(10, KeyWord, storeMod.GeneralID);
            }
            else
            {
                dt = bll.ProductSearch(0, KeyWord, storeMod.GeneralID);
            }
        }
        EGV.DataSource = dt;
        EGV.DataBind();
    }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            B_Admin badmin = new B_Admin();

            if (!B_ARoleAuth.Check(ZLEnum.Auth.shop, "StockManage"))
            {
                function.WriteErrMsg("没有权限进行此项操作");
            }
            if (!IsPostBack)
            {
                string menu = Request.QueryString["menu"];
                string danju;
                RangeValidator1.MinimumValue = Convert.ToString(Int32.MinValue);
                RangeValidator1.MaximumValue = Convert.ToString(Int32.MaxValue);
                DataTable Prolist    = pll.GetProductAll(0);
                DataTable newprolist = Prolist.DefaultView.ToTable(false, "ID", "Proname");

                Hashtable ar = new Hashtable();
                foreach (DataRow dr in newprolist.Rows)
                {
                    ar.Add(dr[0].ToString(), dr[1].ToString());
                }
                this.productid.DataSource     = ar;
                this.productid.DataValueField = "key";
                this.productid.DataTextField  = "value";
                this.productid.DataBind();
                if (PID > 0)
                {
                    productid.SelectedValue = PID.ToString();
                }
                string adminname = badmin.GetAdminLogin().AdminName;
                calendars.Text = Convert.ToString(DateTime.Now);
                if (!this.Page.IsPostBack)
                {
                    danju             = Convert.ToString(DateTime.Now.Year) + Convert.ToString(DateTime.Now.Month) + Convert.ToString(DateTime.Now.Day) + Convert.ToString(DateTime.Now.Hour) + Convert.ToString(DateTime.Now.Minute) + Convert.ToString(DateTime.Now.Second) + Convert.ToString(DateTime.Now.Millisecond);
                    danjuhaobak.Value = danju;
                    danjuhao.Text     = "RK" + danju;
                    danjuhaos.Value   = "RK" + danju;
                    adduser.Text      = adminname;
                }
                if (menu == "edit")
                {
                    int     id         = DataConverter.CLng(Request.QueryString["id"]);
                    M_Stock stocktable = bll.GetStockByid(id);
                    stocktyle.SelectedIndex = stocktable.stocktype;
                    danjuhao.Text           = stocktable.danju.ToString();
                    this.danjuhaos.Value    = stocktable.danju.ToString();
                    this.danjuhaobak.Value  = stocktable.danju.ToString().Replace("CK", "").Replace("RK", "");
                    this.adduser.Text       = stocktable.adduser.ToString();
                    this.stockcontent.Text  = stocktable.content.ToString();
                    this.stockid.Value      = stocktable.id.ToString();
                    this.calendars.Text     = stocktable.addtime.ToString();
                    this.productid.Text     = stocktable.proid.ToString();
                    this.Pronum.Text        = stocktable.Pronum.ToString();
                    this.Pronum.Enabled     = false;
                    Button1.Text            = "修改";
                    Label1.Text             = "修改入库出库单";
                }
            }
            Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='ProductManage.aspx'>商城管理</a></li><li><a href='StockManage.aspx'>库存管理</a></li><li class='active'><a href='" + Request.RawUrl + "'>添加入库出库记录</a></li>");
        }