protected void Page_Load(object sender, EventArgs e)
        {
            //DateTime time=new DateTime(2013,12,10);

            //DateTime d=Libs.VSDateTime.getPreBusinessDay(time, 3); 
            StockTaiSanReport ts = new StockTaiSanReport("094K002555","N");
            this.lbName.Text=ts.TenTaiKhoan;
            ts.dailyReport(new DateTime(2013, 8,31), new DateTime(2013, 9, 30));
            GridView1.DataSource = ts.TaiSan;
            GridView1.DataBind();
            GridView2.DataSource = ts.No;
            GridView2.DataBind();
            GridView3.DataSource = ts.TaiSanKhac;
            GridView3.DataBind();
            this.lbTSRongTN.Text = ts.taiSanRongTN().ToString();
            this.lbTSRongDN.Text = ts.taiSanRongDN().ToString();
            GridView4.DataSource = ts.getDataForAYear(new DateTime(2013,11,6)) ;
            GridView4.DataBind();

        }
Exemplo n.º 2
0
 public DataTable getDataForAYear(DateTime todate)
 {
     DataTable yearly = new DataTable();
     yearly.Columns.Add("ten");
     yearly.Columns.Add("taisan");
     yearly.Columns.Add("no");
     yearly.Columns.Add("taisanrong");
     StockTaiSanReport taisan = new StockTaiSanReport(this.MaTk,this.Type);
     for (int i = 11; i >= 0; i--)
     {
         DateTime time = new DateTime(todate.Year, todate.Month, 1).AddMonths(-i).AddDays(-1);
         taisan.dailyReport(time, time);
         yearly.Rows.Add(new object[] { "Tháng "+ time.Month.ToString("00") + "-" + time.Year, taisan.tongTaiSanTN(), taisan.tongNoTN(), taisan.tongTaiSanTN() - taisan.tongNoTN() });
     }
         return yearly;
 }