Beispiel #1
0
    protected void lnk_save_Click(object sender, EventArgs e)
    {
        st = "insert into sprtselected (name,email,sport,dept) values ('" + txt_name.Text + "','" + txt_emailid.Text + "','" + txt_sports.Text + "','" + dd_dept.Text + "')";
        int x = db.ExeQuery(st);

        if (x > 0)
        {
            emailaccount _emailaccount = new emailaccount();
            string       mail_body     = _emailaccount.email_content1("You are selected for inter college sports <br/><b>Sports : '" + txt_sports.Text + "'</b> ", "", "", "", "Sports Event");
            _emailaccount.SendEmail(txt_emailid.Text, "", "", "Sports selection", mail_body, true);
            fill_empty();
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "showalert('success','Students selected successfully.');", true);
        }
        else
        {
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "showalert('error','Failed ');", true);
        }
    }
    protected void lnk_save_Click(object sender, EventArgs e)
    {
        st = "insert into SelectedRessume (name,email) values('" + txt_name.Text + "','" + txt_email.Text + "')";
        int x = db.ExeQuery(st);

        if (x > 0)
        {
            emailaccount _emailaccount = new emailaccount();
            string       mail_body     = _emailaccount.email_content1("You have been selected for placement interview , Please contact faculty <br/><b></b> ", "", "", "", "Ressume Selected");
            _emailaccount.SendEmail(txt_email.Text, "", "", "You have been Selected ", mail_body, true);
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "showalert('success','Student selected');", true);
            fill_clear();
        }
        else
        {
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "showalert('error','Failed');", true);
        }
    }
Beispiel #3
0
    protected void lnk_save_Click(object sender, EventArgs e)
    {
        st = "insert into principal (Name,Email,Password)values('" + txt_name.Text + "','" + txt_emailid.Text + "','" + txt_password.Text + "')";

        int x = db.ExeQuery(st);

        if (x > 0)
        {
            emailaccount _emailConfig = new emailaccount();
            string       mail_body    = _emailConfig.email_content1("Your account has been created in Student Activity. <br/><b>Password : "******"</b> ", "", "", "", "Account Created");
            _emailConfig.SendEmail(txt_emailid.Text, "", "", "Your account created", mail_body, true);
            fill_repeater();
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "showalert('success','Principal Added successfully.');", true);
        }
        else
        {
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "showalert('error','Failed');", true);
        }
    }
    protected void lnk_save_Click(object sender, EventArgs e)
    {
        st = "INSERT INTO student(fullname,dob,gender,address,email,mobile,password,dept,sem) VALUES('" + txt_name.Text + "','" + txt_date.Text + "','" + dd_gender.Text + "','" + txt_address.Text + "','" + txt_emailid.Text + "'," + txt_mobile.Text + ",'" + txt_password.Text + "','" + dd_dept.Text + "'," + dd_sem.Text + ")";

        int x = db.ExeQuery(st);

        if (x > 0)
        {
            emailaccount _emailConfig = new emailaccount();
            string       mail_body    = _emailConfig.email_content1("Your account has been created in Student Activity. <br/><b>Password : "******"</b> ", "", "", "", "Account Created");
            _emailConfig.SendEmail(txt_emailid.Text, "", "", "Your account created", mail_body, true);
            fill_empty();
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "showalert('success','Student Added successfully.');", true);
            fill_repeater();
        }
        else
        {
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "showalert('error','Failed ');", true);
        }
    }
    protected void lnk_save_Click(object sender, EventArgs e)
    {
        st = "insert into faculty (name,email,password,address,dept)values('" + txt_name.Text + "','" + txt_emailid.Text + "','" + txt_password.Text + "','" + txt_address.Text + "','" + dd_dept.Text + "')";

        int x = db.ExeQuery(st);

        if (x > 0)
        {
            emailaccount _emailaccount = new emailaccount();
            string       mail_body     = _emailaccount.email_content1("Your account has been created in Student IA. <br/><b>Password : "******"</b> ", "", "", "", "Account Created");
            _emailaccount.SendEmail(txt_emailid.Text, "", "", "Your account created", mail_body, true);
            fill_empty();
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "showalert('success','Faculty Added successfully.');", true);
        }
        else
        {
            ScriptManager.RegisterStartupScript(this, this.GetType(), "", "showalert('error','Failed to add faculty');", true);
        }
        fill_repeater();
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        gender = (string)(this.rdFemale.Checked ? "Female" : "Male");
        st     = "insert into doctor values ('" + txt_name.Text + "','" + txt_emailid.Text + "','" + gender + "','" + txt_qual.Text + "','" + dd_spl.Text + "'," + txt_mobile.Text + ",'" + txt_password.Text + "')";
        x      = db.ExeQuery(st);
        if (x > 0)
        {
            emailaccount _emailConfig = new emailaccount();
            string       mail_body    = _emailConfig.email_content1("Your account has been created in Health Care Organisation. <br/><b>Password : "******"</b> ", "", "", "", "Account Created");
            _emailConfig.SendEmail(txt_emailid.Text, "", "", "Your Account Created", mail_body, true);

            Label1.Text      = "Doctor Added Success";
            Label1.ForeColor = Color.Green;
        }
        else
        {
            Label1.Text      = "Failed to Add";
            Label1.ForeColor = Color.Red;
        }
        fill_empty();
        fill_repeater();
    }
    protected void signup_Click(object sender, System.EventArgs e)
    {
        gender = (string)(this.rdFemale.Checked ? "Female" : "Male");

        st = "insert into Patient values ('" + txt_name.Text + "','" + txt_emailid.Text + "','" + gender + "','" + txt_address.Text + "'," + txt_mobile.Text + ",'" + txt_password.Text + "')";
        x  = db.ExeQuery(st);
        if (x > 0)
        {
            emailaccount _emailConfig = new emailaccount();
            string       mail_body    = _emailConfig.email_content1("Your account has been created in Health Care Organisation. <br/><b>Password : "******"</b> ", "", "", "", "Account Created");
            _emailConfig.SendEmail(txt_emailid.Text, "", "", "Your Account Created", mail_body, true);

            fill_repeater();
            Label1.Text      = "Sign-up Success";
            Label1.ForeColor = Color.Green;
        }
        else
        {
            fill_repeater();
            Label1.Text      = "Failed to Sign-up";
            Label1.ForeColor = Color.Red;
        }
    }