Beispiel #1
0
    protected void Btn_Query_Click(object sender, EventArgs e)
    {
        float buyTotalPrice      = BuyInfoLogic.QueryBuyInfoTotalPrice("", "", 0, this.StartTime.Text, this.EndTime.Text);
        float buyBackTotalPrice  = BuyBackInfoLogic.QueryBuyBackTotalMoney("", "", 0, this.StartTime.Text, this.EndTime.Text);
        float sellTotalPrice     = SellLogic.QuerySellTotalPrice("", "", this.StartTime.Text, this.EndTime.Text);
        float sellBackTotalPrice = SellBackLogic.QuerySellBackTotalPrice("", "", this.StartTime.Text, this.EndTime.Text);
        float profits            = sellTotalPrice + buyBackTotalPrice - buyTotalPrice - sellBackTotalPrice;

        this.BuyTotalPrice.Text      = buyTotalPrice.ToString();
        this.BuyBackTotalPrice.Text  = buyBackTotalPrice.ToString();
        this.SellTotalPrice.Text     = sellTotalPrice.ToString();
        this.SellBackTotalPrice.Text = sellBackTotalPrice.ToString();
        this.Profits.Text            = sellTotalPrice.ToString() + " + " + buyBackTotalPrice.ToString() + " - " + buyTotalPrice.ToString() + " - " + sellBackTotalPrice.ToString() + " = " + profits.ToString();
    }
    protected void Btn_Query_Click(object sender, EventArgs e)
    {
        /*取得查询参数信息*/
        string goodNo      = this.GoodNo.Text;
        string goodName    = this.GoodName.Text;
        int    goodClassId = Int32.Parse(this.GoodClassId.SelectedValue);
        string startTime   = this.StartTime.Text;
        string endTime     = this.EndTime.Text;
        /*调用业务层执行商品进货退货信息的查询并重新绑定到GridView控件*/
        DataSet buyBackInfoDs = BuyBackInfoLogic.QueryBuyBackInfo(goodNo, goodName, goodClassId, startTime, endTime);

        this.GridView1.DataSourceID = null;
        this.GridView1.DataSource   = buyBackInfoDs;
        this.GridView1.PageIndex    = 0;
        this.GridView1.DataBind();
        this.TotalPrice.Text = BuyBackInfoLogic.QueryBuyBackTotalMoney(goodNo, goodName, goodClassId, startTime, endTime).ToString();
    }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            /*判断管理员是否已经登陆了系统*/
            if (Session["adminFlag"] == null)
            {
                Response.Write("<script>top.location.href='../login.aspx';</script>");
                return;
            }
        }
        float buyTotalPrice      = BuyInfoLogic.QueryBuyInfoTotalPrice("", "", 0, "", "");
        float buyBackTotalPrice  = BuyBackInfoLogic.QueryBuyBackTotalMoney("", "", 0, "", "");
        float sellTotalPrice     = SellLogic.QuerySellTotalPrice("", "", "", "");
        float sellBackTotalPrice = SellBackLogic.QuerySellBackTotalPrice("", "", "", "");
        float profits            = sellTotalPrice + buyBackTotalPrice - buyTotalPrice - sellBackTotalPrice;

        this.BuyTotalPrice.Text      = buyTotalPrice.ToString();
        this.BuyBackTotalPrice.Text  = buyBackTotalPrice.ToString();
        this.SellTotalPrice.Text     = sellTotalPrice.ToString();
        this.SellBackTotalPrice.Text = sellBackTotalPrice.ToString();
        this.Profits.Text            = sellTotalPrice.ToString() + " + " + buyBackTotalPrice.ToString() + " - " + buyTotalPrice.ToString() + " - " + sellBackTotalPrice.ToString() + " = " + profits.ToString();
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         /*判断管理员是否已经登陆了系统*/
         if (Session["adminFlag"] == null)
         {
             Response.Write("<script>top.location.href='../login.aspx';</script>");
             return;
         }
         /*查询所有商品类别,初始化商品类别信息下拉框控件*/
         DataSet goodClassDs = GoodClassLogic.QueryAllGoodClassInfo();
         this.GoodClassId.Items.Add(new ListItem("请选择商品类别", "0"));
         for (int i = 0; i < goodClassDs.Tables[0].Rows.Count; i++)
         {
             DataRow dr = goodClassDs.Tables[0].Rows[i];
             this.GoodClassId.Items.Add(new ListItem(dr["goodClassName"].ToString(), dr["goodClassId"].ToString()));
         }
         this.GridView1.DataSourceID = null;
         this.GridView1.DataSource   = BuyBackInfoLogic.QueryBuyBackInfo("", "", 0, "", "");
         this.GridView1.DataBind();
         this.TotalPrice.Text = BuyBackInfoLogic.QueryBuyBackTotalMoney("", "", 0, "", "").ToString();;
     }
 }