Exemplo n.º 1
0
 protected void Delete_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < AreaFactGridView.Rows.Count; i++)
     {
         CheckBox chkSelect = (CheckBox)AreaFactGridView.Rows[i].FindControl("chkSelect");
         if (chkSelect.Checked)
         {
             afbll.DeleteAreaFact(int.Parse(AreaFactGridView.DataKeys[i].Value.ToString()));
         }
     }
     AreaFactGridView.DataSource = afbll.ShowAllAreafact();
     AreaFactGridView.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)
         {
             DDLAreaType.DataSource = bll.GetType("AreaFact");
             DDLAreaType.DataBind();
             AreaFactGridView.DataSource = afbll.ShowAllAreafact();
             AreaFactGridView.DataBind();
         }
     }
 }
Exemplo n.º 3
0
        protected void Search_Click(object sender, EventArgs e)
        {
            Hashtable htabel = new Hashtable();

            if (chkAreaName.Checked)
            {
                htabel.Add("FactName", txtAreaName.Text.Trim());
            }
            if (chkMainHead.Checked)
            {
                htabel.Add("MainHead", txtMainHead.Text.Trim());
            }
            if (chkType.Checked)
            {
                htabel.Add("TypeID", int.Parse(DDLAreaType.SelectedValue));
            }
            if (chkTelephone.Checked)
            {
                htabel.Add("Tel", txtTelehpone.Text.Trim());
            }
            AreaFactGridView.DataSource = afbll.GetAreaFactByCondition(Ultility.GetConditionClause(htabel, chkExact.Checked));
            AreaFactGridView.DataBind();
        }
Exemplo n.º 4
0
 protected void Show_Click(object sender, EventArgs e)
 {
     AreaFactGridView.DataSource = afbll.ShowAllAreafact();
     AreaFactGridView.DataBind();
 }