Ejemplo n.º 1
0
        protected void BatDel_Btn_Click(object sender, EventArgs e)
        {
            string CID = Request.Form["idchk"];//订单ID列表

            if (!String.IsNullOrEmpty(CID))
            {
                DataTable Ode     = orderBll.GetOrderbyOrderlist(CID);//获得订单列表
                int       odcount = Ode.Rows.Count;
                for (int p = 0; p < odcount; p++)
                {
                    int CartproOrderid = DataConverter.CLng(Ode.Rows[p]["id"]); //订单ID

                    //历遍清单所有商品数量,查找库存///////////////////
                    DataTable Unew = Cll.GetCartProOrderID(CartproOrderid); //获得详细清单列表

                    for (int s = 0; s < Unew.Rows.Count; s++)
                    {
                        int Onum = DataConverter.CLng(Unew.Rows[s]["Pronum"]);
                        int Opid = DataConverter.CLng(Unew.Rows[s]["ProID"]);

                        M_Product pdin = Pll.GetproductByid(Opid);//获得商品信息

                        if (pdin.JisuanFs == 1)
                        {
                            int pstock = pdin.Stock + Onum;//库存结果,返回的商品数量
                            Pll.ProUpStock(Opid, pstock);
                        }
                    }
                    //////////////////////////////////////////////////////
                }
                orderBll.Delorderlist(CID);
                function.WriteSuccessMsg("删除成功", "OrderList.aspx");
            }
        }
        //发货(disuse)
        private void fahuo(int id, DataTable Unew, M_OrderList orlist)
        {
            for (int s = 0; s < Unew.Rows.Count; s++)
            {
                int Onum = DataConverter.CLng(Unew.Rows[s]["Pronum"]);
                int Opid = DataConverter.CLng(Unew.Rows[s]["ProID"]);

                M_Product pdin = proBll.GetproductByid(Opid);//获得商品信息

                if (pdin.JisuanFs == 0)
                {
                    int pstock = pdin.Stock - Onum;//库存结果,返回的商品数量
                    proBll.ProUpStock(Opid, pstock);
                }
                M_Stock SData = new M_Stock();
                SData.id        = 0;
                SData.proid     = Opid;
                SData.stocktype = 1;
                SData.proname   = pdin.Proname;
                SData.danju     = "CK" + orlist.OrderNo.ToString();
                SData.adduser   = orlist.Reuser.ToString();
                SData.addtime   = DateTime.Now;
                SData.content   = "订单:" + orlist.Reuser.ToString() + "发货";
                SData.Pronum    = DataConverter.CLng(Unew.Rows[0]["Pronum"]);
                Sll.AddStock(SData);
            }

            string str = "StateLogistics=1";

            if (!string.IsNullOrEmpty(txtMS.Text))
            {
                str += ",ExpressDelivery='" + txtMS.Text + "'";
            }
            oll.UpOrderinfo(str, id);
            PromotionComfirm(orlist);
        }
Ejemplo n.º 3
0
        public void fahuo(int id, String Email)
        {
            B_CartPro   cpl = new B_CartPro();
            B_OrderList oll = new B_OrderList();
            B_Product   pll = new B_Product();
            B_Stock     Sll = new B_Stock();

            //历遍清单所有商品数量,查找库存///////////////////
            DataTable   Unew   = cpl.GetCartProOrderID(id); //获得详细清单列表
            M_OrderList orlist = oll.GetOrderListByid(id);

            for (int s = 0; s < Unew.Rows.Count; s++)
            {
                int Onum = ZoomLa.Common.DataConverter.CLng(Unew.Rows[s]["Pronum"]);
                int Opid = ZoomLa.Common.DataConverter.CLng(Unew.Rows[s]["ProID"]);

                M_Product pdin = pll.GetproductByid(Opid);//获得商品信息

                if (pdin.JisuanFs == 0)
                {
                    int pstock = pdin.Stock - Onum;//库存结果,返回的商品数量
                    pll.ProUpStock(Opid, pstock);
                }
                M_Stock SData = new M_Stock();
                SData.id        = 0;
                SData.proid     = Opid;
                SData.stocktype = 1;
                SData.proname   = pdin.Proname;
                SData.danju     = "CK" + orlist.OrderNo.ToString();
                SData.adduser   = orlist.Reuser.ToString();
                SData.addtime   = DateTime.Now;
                SData.content   = "订单:" + orlist.Reuser.ToString() + "发货";
                SData.Pronum    = ZoomLa.Common.DataConverter.CLng(Unew.Rows[0]["Pronum"]);
                Sll.AddStock(SData);
            }

            string str = "StateLogistics=1";

            if (!string.IsNullOrEmpty(Email))
            {
                str += ",ExpressDelivery='" + Email + "'";
            }
            oll.UpOrderinfo(str, id);
            PromotionComfirm(orlist);
        }
        protected void Button1_Click1(object sender, EventArgs e)
        {
            string CID = Request.Form["idchk"];//订单ID列表

            if (!String.IsNullOrEmpty(CID))
            {
                DataTable Ode = bll.GetOrderbyOrderlist(CID);//获得订单列表

                int odcount = Ode.Rows.Count;

                for (int p = 0; p < odcount; p++)
                {
                    int CartproOrderid = DataConverter.CLng(Ode.Rows[p]["id"]); //订单ID

                    //历遍清单所有商品数量,查找库存///////////////////
                    DataTable Unew = Cll.GetCartProOrderID(CartproOrderid); //获得详细清单列表

                    for (int s = 0; s < Unew.Rows.Count; s++)
                    {
                        int Onum = DataConverter.CLng(Unew.Rows[s]["Pronum"]);
                        int Opid = DataConverter.CLng(Unew.Rows[s]["ProID"]);

                        M_Product pdin = Pll.GetproductByid(Opid);//获得商品信息

                        if (pdin.JisuanFs == 1)
                        {
                            int pstock = pdin.Stock + Onum;//库存结果,返回的商品数量
                            Pll.ProUpStock(Opid, pstock);
                        }
                    }
                }
                bll.DelByIDS(CID);
                Response.Write("<script language=javascript>alert('删除成功!');location.href='TravelOrder_Manager.aspx'</script>");
            }
            else
            {
                Response.Write("<script language=javascript>alert('删除失败!');location.href='TravelOrder_Manager.aspx'</script>");
            }
        }