Example #1
0
 protected void Delete_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < HomeRepairGridView.Rows.Count; i++)
     {
         CheckBox chkSelect = (CheckBox)HomeRepairGridView.Rows[i].FindControl("chkSelect");
         if (chkSelect.Checked)
         {
             repairbll.DeleteHomeRepair(HomeRepairGridView.DataKeys[i].Value.ToString());
         }
     }
     HomeRepairGridView.DataSource = repairbll.GetHomeRepair();
     HomeRepairGridView.DataBind();
 }
Example #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)
         {
             HomeRepairGridView.DataSource = repairbll.GetHomeRepair();
             HomeRepairGridView.DataBind();
         }
     }
 }
Example #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 <HomeRepairModel> list = bll.ShowHomeRepairByCode(user.Code);
             HomeRepairGridView.DataSource = list;
             HomeRepairGridView.DataBind();
         }
     }
 }