protected void Page_Load(object sender, EventArgs e) { tblUsers = moneyOBJ.DBConnection("USERS_DETAILS", Convert.ToInt32(Session["logedUser"])); if (tblUsers.Rows.Count > 0) { dgrUserDetail.Caption = tblUsers.Rows[0]["Họ và tên"].ToString(); dgrUserDetail.DataSource = tblUsers; dgrUserDetail.DataBind(); } else { } }
protected void Page_Load(object sender, EventArgs e) { tblMoney = moneyOBJ.DBConnection("SP_LIST_MONEY", Convert.ToInt32(Session["logedUser"])); if (tblMoney.Rows.Count > 0) { sumOBJ = tblMoney.Compute("sum(Tiền)", ""); dgrMoney.DataSource = tblMoney; dgrMoney.DataBind(); txtTotal.Text = Convert.ToDecimal(sumOBJ.ToString()).ToString("#,##0.00"); } else { } }