Beispiel #1
0
    public void init()
    {
        string str0 = Request.QueryString["SalesOrderID"].ToString();

        VSalesOrder vb = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getByID(str0);

        if (vb == null)
        {
            Response.Write("没有你要的数据");
            Response.End();
        }
        SalesOrderID.Text = vb.SalesOrderID;

        RealName.Text      = vb.RealName;
        ShopID.Text        = vb.ShopID.ToString();
        DeliveryType.Text  = vb.DeliveryType;
        ClosingType.Text   = vb.ClosingType;
        CreateDate.Text    = vb.CreateDate;
        Description.Text   = vb.Description;
        Label2.Text        = vb.AttachPay.ToString();
        Label1.Text        = vb.SalesIncome.ToString();
        State.Text         = changString(vb.State.ToString());
        DeliveryPlace.Text = vb.DeliveryPlace;
        Discount.Text      = vb.Discount.ToString();

        setSalesTypeName(vb.SalesType);
        CustomerID.Text   = vb.CustomerID;
        PlatformName.Text = vb.PlatformName;
        CustomerTel.Text  = vb.CustomerTel;
        CustomerPost.Text = vb.CustomerPost;
        CustomerArea.Text = vb.CustomerArea;

        setShopName(vb.ShopID);
    }
Beispiel #2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        SalesDispatchDAL sdal = new SalesDispatchDAL();

        sdal.sentUpdate(int.Parse(OrderID.Text.ToString()), DateTime.Now.ToString("yyyy-MM-dd"), 3, " 问题描述:" + issueInfo.Text.ToString(), float.Parse("0.00"));


        VSalesDispatch vs = Leyp.SQLServerDAL.Sales.Factory.getSalesDispatchDAL().getByID(int.Parse(OrderID.Text.ToString()));

        //在接着得到销售订单

        VSalesOrder vso = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getByID(vs.SalesOrderID);

        //得到下单用户

        string username = vso.UserName;



        ServiceInfo s = new ServiceInfo();

        s.CreateDate   = DateTime.Now.ToString("yyyy-MM-dd");
        s.Content      = "订单号:" + vs.SalesOrderID + "配送错误,请您查询。原因是:" + issueInfo.Text;
        s.ServiceTitle = "配送问题--" + DateTime.Now.ToString("yyyy-MM-dd");
        s.UserName     = username;
        s.TypeID       = 2;
        if (Leyp.SQLServerDAL.Factory.getServiceInfoDAL().insertNewEntity(s))
        {
            Jscript.RefreshParent("MySalesDispatch.aspx");
            Jscript.CloseWindow();
        }
    }
    public void init()
    {
        List <VSalesOut> list = Leyp.SQLServerDAL.Sales.Factory.getSalesOutDAL().getSearchList("1000", "3000", 1);
        int count             = list.Count;

        if (count == 0)
        {
            Response.Write("所有数据处理完成!没有需要审核的单据   &nbsp; &nbsp;&nbsp; &nbsp; <a href=\"Manager_SalesOutOrder.aspx\">返回列表</a>");
            Response.End();
        }
        else
        {
            int       index = new Random().Next(count);
            VSalesOut vb    = list[index];

            AuditingCount.Text = count.ToString();

            SalesOutID.Text   = vb.SalesOutID;
            SalesOrderID.Text = vb.SalesOrderID;
            //Consignee.Text = vb.Consignee;
            RealName.Text = vb.RealName;



            CreateDate.Text  = vb.CreateDate;
            Description.Text = vb.Description;


            State.Text         = changString(vb.State.ToString());
            DeliveryName0.Text = vb.DeliveryName;


            Accounts ac = Leyp.SQLServerDAL.Factory.getAccountsDAL().getByID(vb.AccountsID);
            AccountsName.Text = ac.AccountsName; //财务帐号


            VSalesOrder vo = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getByID(vb.SalesOrderID);

            ProductsPrice.Text = vb.TotalPrice.ToString();
            float p = float.Parse("0.00");
            p = vb.TotalPrice + vo.AttachPay - vo.Discount;
            TotalPrice.Text = p.ToString();

            CustomerID.Text   = vo.CustomerID;
            CustomerTel.Text  = vo.CustomerTel;
            CustomerPost.Text = vo.CustomerPost;
            CustomerArea.Text = vo.CustomerArea;

            TradePlace.Text = vo.DeliveryPlace;

            AttachPay.Text = vo.AttachPay.ToString();
            Discount.Text  = vo.Discount.ToString();


            TradeDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
        }
    }
    protected void init()
    {
        object action = Request.QueryString["action"];

        if (action != null)
        {
            if (action.ToString().Equals("view"))
            {
                string str0 = Request.QueryString["baginData"].ToString();
                string str1 = Request.QueryString["endData"].ToString();
                string str2 = Request.QueryString["side"].ToString();

                if (str0.Equals(""))
                {
                    str0 = "1000";
                }
                if (str1.Equals(""))
                {
                    str1 = "3000";
                }

                List <VSalesOut> list = new List <VSalesOut>();
                list = Leyp.SQLServerDAL.Sales.Factory.getSalesOutDAL().getSearchList(str0, str1, int.Parse(str2));

                CollectionPager1.DataSource    = list;
                CollectionPager1.BindToControl = OrderList;
                OrderList.DataSource           = CollectionPager1.DataSourcePaged;
            }
            else if (action.ToString().Equals("sel"))
            {
                string    id = Request.QueryString["ID"].ToString();
                VSalesOut o  = new VSalesOut();
                o = Leyp.SQLServerDAL.Sales.Factory.getSalesOutDAL().getByID(id);
                VSalesOrder os = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getByID(o.SalesOrderID);

                Jscript.CloseWindowReturnValues(o.SalesOutID + "$$$" + os.DeliveryType);
                return;
            }
        }
        else  //初始化页面
        {
            List <VSalesOut> list = new List <VSalesOut>();
            list = Leyp.SQLServerDAL.Sales.Factory.getSalesOutDAL().getSearchList("1000", "2050", 2);

            CollectionPager1.DataSource    = list;
            CollectionPager1.BindToControl = OrderList;
            OrderList.DataSource           = CollectionPager1.DataSourcePaged;
        }
    }
Beispiel #5
0
        public List <VSalesOrder> getReportListByPlatformID(string beginDate, string endDate, int PlatformID)
        {
            string             s    = "";
            List <VSalesOrder> list = new List <VSalesOrder>();

            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@beginDate", SqlDbType.NVarChar), new SqlParameter("@endDate", SqlDbType.NVarChar), new SqlParameter("@PlatformID", SqlDbType.Int) };
            parameters[0].Value = beginDate;
            parameters[1].Value = endDate;
            parameters[2].Value = PlatformID;
            SqlDataReader reader = SQLHelper.RunProcedure("p_SalesOrder_getReportListByPlatformID", parameters);

            while (reader.Read())
            {
                VSalesOrder item = new VSalesOrder();
                s = reader.GetValue(reader.GetOrdinal("SalesIncome")).ToString();
                item.SalesIncome   = float.Parse(s);
                item.AuditingUser  = reader.GetString(reader.GetOrdinal("AuditingUser"));
                item.ClosingDate   = reader.GetString(reader.GetOrdinal("ClosingDate"));
                item.RealName      = reader.GetString(reader.GetOrdinal("RealName"));
                item.Description   = reader.GetString(reader.GetOrdinal("Description"));
                item.ClosingType   = reader.GetString(reader.GetOrdinal("ClosingType"));
                item.ShopID        = reader.GetInt32(reader.GetOrdinal("ShopID"));
                item.SalesType     = reader.GetInt32(reader.GetOrdinal("SalesType"));
                item.DeliveryPlace = reader.GetString(reader.GetOrdinal("DeliveryPlace"));
                item.DeliveryType  = reader.GetString(reader.GetOrdinal("DeliveryType"));
                item.CreateDate    = reader.GetString(reader.GetOrdinal("CreateDate"));
                item.SalesOrderID  = reader.GetString(reader.GetOrdinal("SalesOrderID"));
                item.UserName      = reader.GetString(reader.GetOrdinal("UserName"));
                s = reader.GetValue(reader.GetOrdinal("AttachPay")).ToString();
                item.AttachPay = float.Parse(s);
                s                 = reader.GetValue(reader.GetOrdinal("Discount")).ToString();
                item.Discount     = float.Parse(s);
                item.State        = reader.GetInt32(reader.GetOrdinal("State"));
                item.CustomerName = reader.GetString(reader.GetOrdinal("CustomerName"));
                item.CustomerPost = reader.GetString(reader.GetOrdinal("CustomerPost"));
                item.CustomerTel  = reader.GetString(reader.GetOrdinal("CustomerTel"));
                item.CustomerArea = reader.GetString(reader.GetOrdinal("CustomerArea"));
                item.CustomerID   = reader.GetString(reader.GetOrdinal("CustomerID"));
                item.PlatformName = reader.GetString(reader.GetOrdinal("PlatformName"));
                item.PlatformID   = reader.GetInt32(reader.GetOrdinal("PlatformID"));
                list.Add(item);
            }
            reader.Close();
            return(list);
        }
    /// <summary>
    ///
    /// </summary>
    private void kuaiShenhe(string SalesOrderID)
    {
        VSalesOrder vs = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getByID(SalesOrderID);

        if (vs == null)
        {
            return;
        }
        SalesOut s = new SalesOut();

        s.UserName     = getUserName();
        s.Consignee    = "未知";
        s.CreateDate   = DateTime.Now.ToString("yyyy-MM-dd");
        s.SalesOrderID = vs.SalesOrderID;
        s.SalesOutID   = "SO" + StrHelper.GetRamCode();
        s.Description  = "无";
        s.DeliveryID   = Leyp.SQLServerDAL.Sales.Factory.getSalesPlatformDAL().getList()[0].PlatformID;
    }
Beispiel #7
0
        public VSalesOrder getByID(string SalesOrderID)
        {
            bool        flag  = false;
            string      s     = "";
            VSalesOrder order = new VSalesOrder();

            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@SalesOrderID", SqlDbType.NVarChar) };
            parameters[0].Value = SalesOrderID;
            SqlDataReader reader = SQLHelper.RunProcedure("p_SalesOrder_getByID", parameters);

            while (reader.Read())
            {
                s = reader.GetValue(reader.GetOrdinal("SalesIncome")).ToString();
                order.SalesIncome   = float.Parse(s);
                order.AuditingUser  = reader.GetString(reader.GetOrdinal("AuditingUser"));
                order.ClosingDate   = reader.GetString(reader.GetOrdinal("ClosingDate"));
                order.RealName      = reader.GetString(reader.GetOrdinal("RealName"));
                order.Description   = reader.GetString(reader.GetOrdinal("Description"));
                order.ClosingType   = reader.GetString(reader.GetOrdinal("ClosingType"));
                order.ShopID        = reader.GetInt32(reader.GetOrdinal("ShopID"));
                order.SalesType     = reader.GetInt32(reader.GetOrdinal("SalesType"));
                order.DeliveryPlace = reader.GetString(reader.GetOrdinal("DeliveryPlace"));
                order.DeliveryType  = reader.GetString(reader.GetOrdinal("DeliveryType"));
                order.CreateDate    = reader.GetString(reader.GetOrdinal("CreateDate"));
                order.SalesOrderID  = reader.GetString(reader.GetOrdinal("SalesOrderID"));
                order.UserName      = reader.GetString(reader.GetOrdinal("UserName"));
                s = reader.GetValue(reader.GetOrdinal("AttachPay")).ToString();
                order.AttachPay = float.Parse(s);
                s = reader.GetValue(reader.GetOrdinal("Discount")).ToString();
                order.Discount     = float.Parse(s);
                order.State        = reader.GetInt32(reader.GetOrdinal("State"));
                order.CustomerName = reader.GetString(reader.GetOrdinal("CustomerName"));
                order.CustomerPost = reader.GetString(reader.GetOrdinal("CustomerPost"));
                order.CustomerTel  = reader.GetString(reader.GetOrdinal("CustomerTel"));
                order.CustomerArea = reader.GetString(reader.GetOrdinal("CustomerArea"));
                order.CustomerID   = reader.GetString(reader.GetOrdinal("CustomerID"));
                order.PlatformName = reader.GetString(reader.GetOrdinal("PlatformName"));
                order.PlatformID   = reader.GetInt32(reader.GetOrdinal("PlatformID"));
                flag = true;
            }
            reader.Close();
            return(flag ? order : null);
        }
    private void init()
    {
        string SalesOrderIDs = Request.QueryString["SalesOrderID"].ToString();


        VSalesOrder v = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getByID(SalesOrderIDs);

        if (v.SalesOrderID == "" || v.SalesOrderID == null)
        {
            Response.Write("没有数据");
            Response.End();
        }
        else if (!v.UserName.Equals(getUserName().ToString()))
        {
            Response.Write("操作失败");
            Response.End();
        }
        else
        {
            SalesOrderID.Text = SalesOrderIDs.ToString();
        }
    }
Beispiel #9
0
    protected void init()
    {
        string action = Request.QueryString["action"].ToString();

        if (action.Equals("delMySalesOrder"))//用户删除自己的订单
        {
            string        AuditingId = Request.QueryString["AuditingId"].ToString();
            StringBuilder sb         = new StringBuilder();
            string[]      a          = AuditingId.Split('#');
            Leyp.SQLServerDAL.Sales.SalesOrderDAL bl = new Leyp.SQLServerDAL.Sales.SalesOrderDAL();
            int num = 0;
            for (int i = 0; i < a.Length; i++)
            {
                VSalesOrder v = new VSalesOrder();
                v = bl.getByID(a[i]);
                if (v != null)
                {
                    if (v.UserName.Equals(getUserName()))//如果是该用户的单据
                    {
                        if (bl.deleteEitity(a[i]))
                        {
                            num++;
                        }
                        else
                        {
                            sb.Append("订单号:" + a[i] + " 已经审核不能再审核 <br/>");
                        }
                    }
                    else
                    {
                        sb.Append("订单号:" + a[i] + " 无权删除 <br/>");
                    }
                }
            }
            sb.Append("成功删除 " + num + "条");
            Response.Write(sb.ToString());
        }
    }
Beispiel #10
0
    private void createExcel(List <VSalesOrder> list)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("<table width=350 border=0><tr><td>订单号</td><td>日期</td><td>交货方式</td><td>结算方式</td><td>顾客名称</td><td>合计金额</td> <td>状态</td></tr>");
        int len = list.Count;


        for (int i = 0; i < len; i++)
        {
            VSalesOrder vs = list[i];

            sb.Append(" <tr>");
            sb.Append("<td>" + vs.SalesOrderID + "</td>");
            sb.Append("<td>" + vs.CreateDate + "</td>");
            sb.Append("<td>" + vs.DeliveryType + "</td>");
            sb.Append("<td>" + vs.ClosingType + "</td>");
            sb.Append("<td>" + vs.CustomerName + "</td>");
            sb.Append("<td>" + vs.SalesIncome.ToString() + "</td>");
            sb.Append("<td>" + changString(vs.State.ToString()) + "</td>");
            sb.Append(" </tr>");
        }
        sb.Append("</table>");

        string sr = StrHelper.GetRamCode();

        string     path    = System.Web.HttpContext.Current.Server.MapPath("../UploadFiles/" + sr + ".xls");
        FileStream NewText = File.Create(path);

        NewText.Close();

        FileStream TextFile = File.Open(path, FileMode.Append);

        TextFile.Write((System.Text.Encoding.Default.GetBytes(sb.ToString().ToCharArray())), 0, System.Text.Encoding.Default.GetBytes(sb.ToString().ToCharArray()).Length);
        TextFile.Close();

        Response.Redirect("../UploadFiles/" + sr + ".xls");
    }
Beispiel #11
0
    protected void Total_Click(object sender, EventArgs e)
    {
        string beginTime  = baginData.Text.ToString();
        string endTime    = endData.Text.ToString();
        int    PlatformID = int.Parse(Platform.SelectedValue.ToString());

        List <VSalesOrder> list = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getReportListByPlatformID(beginTime, endTime, PlatformID);
        int   count             = list.Count;
        float totalprice        = float.Parse("0.00");

        for (int i = 0; i < count; i++)
        {
            VSalesOrder v = list[i];
            totalprice = totalprice + v.SalesIncome;
        }
        Btime.Text    = beginTime;
        Etime.Text    = endTime;
        OrderNum.Text = count.ToString();

        TotoalCost.Text = totalprice.ToString();

        Panel1.Visible = true;
    }
Beispiel #12
0
    private void init()
    {
        List <VSalesOrder> list = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getSearchList("1000", "3000", 0);

        if (list.Count == 0)
        {
            Response.Write("所有数据处理完成!没有需要审核的单据   &nbsp; &nbsp;&nbsp; &nbsp; <a href=\"Manager_SalesOrderList.aspx\">返回列表</a>");
            Response.End();
        }
        else
        {
            int         index = new Random().Next(list.Count);
            VSalesOrder vb    = list[index];
            SalesOrderID.Text = vb.SalesOrderID;

            RealName.Text      = vb.RealName;
            ShopID.Text        = vb.ShopID.ToString();
            DeliveryType.Text  = vb.DeliveryType;
            ClosingType.Text   = vb.ClosingType;
            CreateDate.Text    = vb.CreateDate;
            Description.Text   = vb.Description;
            Label2.Text        = vb.AttachPay.ToString();
            Label1.Text        = vb.SalesIncome.ToString();
            State.Text         = changString(vb.State.ToString());
            DeliveryPlace.Text = vb.DeliveryPlace;
            Discount.Text      = vb.Discount.ToString();

            setSalesTypeName(vb.SalesType);
            CustomerID.Text   = vb.CustomerID;
            PlatformName.Text = vb.PlatformName;
            CustomerTel.Text  = vb.CustomerTel;
            CustomerPost.Text = vb.CustomerPost;
            CustomerArea.Text = vb.CustomerArea;

            setShopName(vb.ShopID);
        }
    }
    protected void init()
    {
        object action = Request.QueryString["action"];
        List <VSalesDispatch> list = new List <VSalesDispatch>();

        Leyp.SQLServerDAL.Sales.SalesDispatchDAL dl = new Leyp.SQLServerDAL.Sales.SalesDispatchDAL();
        if (action == null)
        {
        }
        else if (action.ToString().Equals("MyOrder"))
        {
            List <VSalesOrder> listOrder = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getSearchListByUserName("1000", "3000", 2, getUserName());
            for (int i = 0; i < listOrder.Count; i++)    //通过已经审核的销售订单查找用户的单据发货情况
            {
                VSalesOrder    vo = listOrder[i];
                VSalesDispatch vd = dl.getBySalesOrderID(vo.SalesOrderID);
                if (vd != null)
                {
                    list.Add(vd);
                }
            }
        }
        else if (action.ToString().Equals("OrderID"))
        {
            string         OrderID = Request.QueryString["SalesOrderID"].ToString();
            VSalesDispatch ds      = dl.getBySalesOrderID(OrderID);
            if (ds != null)
            {
                list.Add(ds);
            }
        }

        CollectionPager1.DataSource    = list;
        CollectionPager1.BindToControl = OrderList;
        OrderList.DataSource           = CollectionPager1.DataSourcePaged;
    }
Beispiel #14
0
    /// <summary>
    /// 根据SalesOrderID 快速生成
    /// </summary>
    /// <param name="SalesOrderID"></param>

    private void buildNode(string SalesOrderID, int DeliveryID)
    {
        bool result = true;

        VSalesOrder vo = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getByID(SalesOrderID);

        if (vo == null)
        {
            Response.Write("订单号:" + SalesOrderID + " 有误<br>");
            return;
        }
        if (vo.State != 1)//订单没有审核
        {
            Response.Write("订单号:" + SalesOrderID + " 没有审核或已经处理<br>");
            return;
        }

        string SalesOutID = getSalesOutID();
        // int DeliveryID = Leyp.SQLServerDAL.Factory.getDeliveryDAL().getDefaultEitity().DeliveryID;//得到默认得
        SalesOut s = new SalesOut();

        s.Consignee    = "未知";
        s.CreateDate   = DateTime.Now.ToString("yyyy-MM-dd");
        s.DeliveryID   = DeliveryID;
        s.TradeDate    = DateTime.Now.ToString("yyyy-MM-dd");
        s.Deposits     = float.Parse("0.00");
        s.Description  = "无";
        s.UserName     = getUserName();
        s.State        = 0;
        s.SalesOutID   = SalesOutID;
        s.SalesOrderID = SalesOrderID;
        s.AccountsID   = "无";


        Leyp.SQLServerDAL.Sales.Factory.getSalesOutDAL().insertSalesDetailFrist(SalesOrderID, SalesOutID);//临时添加详细

        List <VSalesOutDetail> list = Leyp.SQLServerDAL.Sales.Factory.getSalesOutDetailDAL().getBySalesOutIDinit(SalesOutID);

        for (int i = 0; i < list.Count; i++)
        {
            if (result == false)
            {
                break;
            }



            VSalesOutDetail       v          = list[i];
            int                   ProductsID = v.ProductsID;
            List <VProductsStock> list0      = Leyp.SQLServerDAL.Factory.getProductsStockDAL().getStockList(ProductsID); //寻找库存

            if (list0 == null || list0.Count == 0)                                                                       //没有库存
            {
                result = false;
                break;
            }

            VProductsStock vp = null;

            for (int j = 0; j < list0.Count; j++)
            {
                VProductsStock vps = list0[j];
                if (vps.Num >= v.Quantity)//有库存 并且数量合理
                {
                    vp = vps;
                    break;
                }
            }

            if (vp == null)//没有库存 失败!
            {
                result = false;
                break;
            }


            SalesOutDetail d = new SalesOutDetail();
            d.SalesOutID    = v.SalesOutID;
            d.ProductsID    = v.ProductsID;
            d.Price         = v.Price;
            d.Quantity      = v.Quantity;
            d.DiscountRate  = v.DiscountRate;
            d.Description   = v.Description;
            d.DetailID      = v.DetailID;
            d.StoreHouseID  = vp.HouseID;
            d.HouseDetailID = vp.HouseDetailID;
            Leyp.SQLServerDAL.Sales.Factory.getSalesOutDetailDAL().updateEitity(d);
        }

        if (result == true)
        {
            if (Leyp.SQLServerDAL.Sales.Factory.getSalesOutDAL().insertNewEntity(s))
            {
                Response.Write("单号:" + SalesOrderID + "  --生成成功<br>");
            }
        }
        else
        {
            Response.Write("订单号:" + SalesOrderID + "  不能生成,可能库存不足<br>");
        }
    }
Beispiel #15
0
    public void init()
    {
        string str0 = Request.QueryString["SalesOutID"].ToString();

        VSalesOut vb = Leyp.SQLServerDAL.Sales.Factory.getSalesOutDAL().getByID(str0);

        if (vb == null)
        {
            Response.Write("没有你要的数据");
            Response.End();
        }
        SalesOutID.Text   = vb.SalesOutID;
        SalesOrderID.Text = vb.SalesOrderID;
        Consignee.Text    = vb.Consignee;
        RealName.Text     = vb.RealName;

        TradeDate.Text = vb.TradeDate;
        //TradePlace.Text = vb.TradePlace;

        CreateDate.Text  = vb.CreateDate;
        Description.Text = vb.Description;


        State.Text         = changString(vb.State.ToString());
        DeliveryName0.Text = vb.DeliveryName;


        Accounts ac = Leyp.SQLServerDAL.Factory.getAccountsDAL().getByID(vb.AccountsID);

        AccountsName.Text = ac.AccountsName;//财务帐号


        VSalesOrder vo = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getByID(vb.SalesOrderID);

        ProductsPrice.Text = vb.TotalPrice.ToString();
        float p = float.Parse("0.00");

        p = vb.TotalPrice + vo.AttachPay - vo.Discount;
        TotalPrice.Text = p.ToString();

        CustomerID.Text   = vo.CustomerID;
        CustomerTel.Text  = vo.CustomerTel;
        CustomerPost.Text = vo.CustomerPost;
        CustomerArea.Text = vo.CustomerArea;

        TradePlace.Text = vo.DeliveryPlace;

        AttachPay.Text = vo.AttachPay.ToString();
        Discount.Text  = vo.Discount.ToString();


        if (vb.State == 3) //表示已经发货
        {
            Panel1.Visible = true;
            VSalesDispatch vs = Leyp.SQLServerDAL.Sales.Factory.getSalesDispatchDAL().getBySalesOutID(str0);

            DeliveryDate.Text  = vs.DeliveryDate;
            SentDate.Text      = vs.SentDate;
            ConsignorName.Text = vs.RealName;
            DeliveryName.Text  = vs.DeliveryType;
            Description1.Text  = vs.Description;
        }
    }
Beispiel #16
0
    private void init()
    {
        object SalesID = Request.QueryString["SalesOutID"];

        if (SalesID == null)
        {
            Response.Write("没有您要的数据");
            Response.End();
            return;
        }

        VSalesOut vs = Leyp.SQLServerDAL.Sales.Factory.getSalesOutDAL().getByID(SalesID.ToString());

        if (vs == null)
        {
            Response.Write("没有您要的数据");
            Response.End();
            return;
        }
        if (vs.State > 0)
        {
            Response.Write("单据已经审核,不能修改");
            Response.End();
            return;
        }

        VSalesOrder vo = Leyp.SQLServerDAL.Sales.Factory.getSalesOrderDAL().getByID(vs.SalesOrderID);//

        if (vo == null)
        {
            Response.Write("没有您要的数据");
            Response.End();
            return;
        }



        SalesOutID.Text   = vs.SalesOutID;
        CreateDate.Text   = vs.CreateDate;
        SalesOrderID.Text = vs.SalesOrderID;

        TradeDate.Text = vs.TradeDate;

        Consignee.Text   = vs.Consignee;
        Description.Text = vs.Description;

        CustomerName.Text = vo.CustomerName;
        CustomerPost.Text = vo.CustomerPost;
        CustomerTel.Text  = vo.CustomerTel;
        CustomerArea.Items.FindByValue(vo.CustomerArea.ToString()).Selected = true;
        DeliveryIDh.Value = vs.DeliveryID.ToString();
        AccountsIDh.Value = vs.AccountsID;
        Platformh.Value   = vo.PlatformID.ToString();

        string str  = vo.CustomerID;
        string str0 = str.Substring(0, 2);

        CustomerIDTypeh.Value = str0;
        CustomerID.Text       = str.Substring(2, str.Length - 2);
        CustomerIDType.Items.FindByValue(str0).Selected = true;

        AttachPay.Text = vo.AttachPay.ToString();
        Discount.Text  = vo.Discount.ToString();



        DeliveryPlace.Text = vo.DeliveryPlace;
    }