Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            user = (User)Session["user"];
            string  userId   = user.UserId;
            DataSet ds       = robll.selectRole(userId);
            string  roleName = ds.Tables[0].Rows[0]["roleName"].ToString();
            string  time     = DateTime.Now.ToString("yyyy-MM-dd");
            int     region   = user.ReginId.RegionId;

            if (roleName != "超级管理员")
            {
                isNotAdmin = true;
                //time = "2018";
                DataSet dsSum = saletaskbll.getAllpriceRegion(region, time);
                allnumber     = dsSum.Tables[0].Rows[0]["allNum"].ToString();
                alltotalprice = dsSum.Tables[0].Rows[0]["allPrice"].ToString();
                allreadprice  = dsSum.Tables[0].Rows[0]["allRealPrice"].ToString();
                allkinds      = dsSum.Tables[0].Rows[0]["allKinds"].ToString();
                //allkinds = saletaskbll.getAllkindsRegion(time, region).ToString();
            }
            else
            {
                //time = "2018";
                DataSet dsSum = saletaskbll.getAllprice(time);
                allnumber     = dsSum.Tables[0].Rows[0]["allNum"].ToString();
                alltotalprice = dsSum.Tables[0].Rows[0]["allRealPrice"].ToString();
                allreadprice  = dsSum.Tables[0].Rows[0]["allPrice"].ToString();
                //allkinds = saletaskbll.getAllkinds(time).ToString();
                allkinds = dsSum.Tables[0].Rows[0]["allKinds"].ToString();
            }
            user = (User)Session["user"];
            getData();
            //saletaskId = Session["saleId"].ToString();
            //getBasic();
            //print();
        }