private void FrmStatistic_Load(object sender, EventArgs e) { lblUserName.Text = "host"; MtdCreateController(); // Load thống kê chung. lblTotalICol1_Buy.Text = VNTCode.Controller.MtdIntToString(oCtrLer.Tbl5_SumICol1_Buy()) + " (ly)"; lblTotalICol1_Sell.Text = VNTCode.Controller.MtdIntToString(oCtrLer.Tbl5_SumICol1_Sell()) + " (ly)"; lblTotalSell_Buy.Text = VNTCode.Controller.MtdDecimalToString(oCtrLer.Tbl5_SumMCol1_Buy()) + " (đ)"; lblTotalSell_Sell.Text = VNTCode.Controller.MtdDecimalToString(oCtrLer.Tbl7_SumMCol1_Sell()) + " (đ)"; MtdLoadTbl1(); MtdLoadTbl2(); MtdLoadTbl3(); MtdLoadDate(); MtdLoadState(); comboBox1.Focus(); }
void MtdLoadTbl7() { MtdCreateController(); if (txtPageSize.Text != "") { pageSize = int.Parse(txtPageSize.Text); } int pageIndex = pageSize == -1 ? 0 : int.Parse(lblCurrentPage.Text) * pageSize; int idTbl3 = Convert.ToInt32(comboBox1.SelectedValue.ToString()); dataGridView1.DataSource = oCtrLer.Tbl7_Gets_OrderDesByCreateDate(pageIndex, pageSize, idTbl3); // Tính tổng số. lblTotal.Text = VNTCode.Controller.MtdIntToString(oCtrLer.Tbl7_Count_Sell(idTbl3)); lblTotalICol1.Text = VNTCode.Controller.MtdIntToString(oCtrLer.Tbl5_SumICol1_Sell(idTbl3)) + " (ly)"; lblTotalSell.Text = VNTCode.Controller.MtdDecimalToString(oCtrLer.Tbl7_SumMCol1(idTbl3)) + " (đ)"; if (pageSize != -1) { MtdGetPageCount(); } }