Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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();
         }
     }
 }
Exemplo n.º 3
0
 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();
         }
     }
 }