protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Context.Items["seldepart"] != null) { curDepart = Server.UrlEncode(Context.Items["seldepart"].ToString()); this.Title = "【" + Server.UrlDecode(curDepart) + "】" + this.Title.Replace("公司", ""); } CommTable comm1 = new CommTable(); this.GridView1.DataSource = JueCheZhiChi.ZcTj(comm1, Server.UrlDecode(curDepart)); this.GridView3.DataSource = JueCheZhiChi.ZcBaoTj(comm1, Server.UrlDecode(curDepart)); comm1.Close(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Page.DataBind(); CommTable comm1 = new CommTable(); int hs, hs1, hs2; double bjlx1, bjlx2, bjlx, hbxh, fee, huilv; //统计资产的情况 huilv = JueCheZhiChi.ZcSum1(comm1, out hs, out bjlx1, out bjlx2, out bjlx, out hbxh, out fee); this.hs.Text = hs + ""; this.bxh1.Text = String.Format("{0:N2}", bjlx1); this.bxh2.Text = String.Format("{0:N2}", bjlx2); this.Label1.Text = String.Format("{0:N2}", bjlx); this.Label2.Text = huilv + ""; this.hbxh1.Text = String.Format("{0:N2}", hbxh); this.fyhj.Text = String.Format("{0:N2}", fee); //统计资产包的情况 huilv = JueCheZhiChi.ZcBaoSum(comm1, out hs1, out hs2, out bjlx1, out bjlx2, out bjlx, out hbxh, out fee); this.bhs.Text = hs1 + ""; this.Label3.Text = hs2 + ""; this.bbxh1.Text = String.Format("{0:N2}", bjlx1); this.bbxh2.Text = String.Format("{0:N2}", bjlx2); this.Label4.Text = String.Format("{0:N2}", bjlx); this.Label5.Text = huilv + ""; this.bhbxh1.Text = String.Format("{0:N2}", hbxh); this.bfyhj.Text = String.Format("{0:N2}", fee); comm1.Close(); //统计总的情况 double temp1 = double.Parse(this.hbxh1.Text) + double.Parse(this.bhbxh1.Text); this.zhbxh1.Text = String.Format("{0:N2}", temp1); temp1 = double.Parse(this.fyhj.Text) + double.Parse(this.bfyhj.Text); this.zfyhj.Text = String.Format("{0:N2}", temp1); } }