protected void Delete_Click(object sender, EventArgs e) { for (int i = 0; i < HomeReportGridView.Rows.Count; i++) { CheckBox chkSelect = (CheckBox)HomeReportGridView.Rows[i].FindControl("chkSelect"); if (chkSelect.Checked) { reportbll.DeleteHomeReport(HomeReportGridView.DataKeys[i].Value.ToString()); } } HomeReportGridView.DataSource = reportbll.GetHomeReport(); HomeReportGridView.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { user = (UserModel)Session["User"]; if (Session["User"] == null || Session["User"].ToString() == "" || user.UserType != 1) { Response.Redirect("../Login.aspx"); } else { if (!IsPostBack) { HomeReportGridView.DataSource = reportbll.GetHomeReport(); HomeReportGridView.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { user = (UserModel)Session["User"]; if (Session["User"] == null || Session["User"].ToString() == "" || user.UserType != 0) { Response.Redirect("../Login.aspx"); } else { if (!IsPostBack) { List <HomeReportModel> list = bll.ShowHomeReportByCode(user.Code); HomeReportGridView.DataSource = list; HomeReportGridView.DataBind(); } } }