private void ShowInfo(int id)
    {
        AirTicketWeb.BLL.Admin   bll   = new AirTicketWeb.BLL.Admin();
        AirTicketWeb.Model.Admin model = bll.GetModel(id);

        this.TextBox1.Text = model.Apwd;
        this.txtName.Text  = model.Aname;
    }
Exemplo n.º 2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     AirTicketWeb.BLL.Admin bll = new AirTicketWeb.BLL.Admin();
     if (bll.AdminLogin(txtName.Value, txtPwd.Value))
     {
         Session["Usernasme"] = txtName.Value;
         Response.Redirect("Default.aspx");
     }
     else
     {
         Response.Redirect("Login.aspx");
     }
 }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string Apwd  = this.TextBox1.Text;
        string Aname = this.txtName.Text;


        AirTicketWeb.Model.Admin model = new AirTicketWeb.Model.Admin();
        model.id    = int.Parse(Request.Params["id"]);
        model.Apwd  = Apwd;
        model.Aname = Aname;

        AirTicketWeb.BLL.Admin bll = new AirTicketWeb.BLL.Admin();
        bll.Update(model);
        Maticsoft.DBUtility.js.AlertAndRedirect("Modify Successful!", "AdminList.aspx");
    }
Exemplo n.º 4
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        AirTicketWeb.BLL.Admin bll = new AirTicketWeb.BLL.Admin();
        if (bll.Exists(txtName.Text))
        {
            Maticsoft.DBUtility.js.AlertAndRedirect("This ID existed. Please change another one. ", "AddAdmin.aspx");
        }
        else
        {
            string Apwd  = this.TextBox1.Text;
            string Aname = this.txtName.Text;

            AirTicketWeb.Model.Admin model = new AirTicketWeb.Model.Admin();
            model.Apwd  = Apwd;
            model.Aname = Aname;

            bll.Add(model);
            Maticsoft.DBUtility.js.AlertAndRedirect("Success!", "AdminList.aspx");
        }
    }