Esempio n. 1
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        SortedList s = new SortedList();

        s.Add("@mode", "Insert");
        s.Add("@FName", txtFName.Text.ToUpper());
        s.Add("@Lname", txtLName.Text.ToUpper());
        s.Add("@Email", txtemail.Text);
        s.Add("@PNo", txtPNo.Text);
        s.Add("@Address", txtAdd.Text);
        s.Add("@City", txtCity.Text);
        s.Add("@Country", txtCountry.Text);
        s.Add("@Province", txtProvince.Text);
        s.Add("@category", ddlcatageory.Text);
        s.Add("@Title", txttitle.Text);
        s.Add("@Description", txtDesc.Text);
        s.Add("@ZipCode", txtZip.Text);
        s.Add("@CId", Session["Id"]);


        int i = con.ExecuteNonQuerySP("SP_Post", s);

        if (i > 0)
        {
            Response.Write("<script>alert('Data Posted Successfully');</script>");
            Response.Redirect("dashboard.aspx");
        }

        else
        {
            Response.Write("<script>alert('Some error Encountered');</script>");
        }
    }
Esempio n. 2
0
    protected void btnsubmit_Click(object sender, EventArgs e)
    {
        DataTable dt = con.GetSelectQuety("Select * from Registration where Email='" + txtemail.Text + "'");

        if (dt != null && dt.Rows.Count > 0)
        {
            Label1.Text = "Email Id already registered";
        }
        else
        {
            SortedList s = new SortedList();
            s.Add("@mode", "Insert");
            s.Add("@FName", txtfname.Text.ToUpper());
            s.Add("@Lname", txtlname.Text.ToUpper());
            s.Add("@Email", txtemail.Text);
            s.Add("@PNo", txtpnumber.Text);
            s.Add("@City", txtcity.Text);
            s.Add("@Pass", txtpass.Text);


            int i = con.ExecuteNonQuerySP("SP_Registration", s);
            if (i > 0)
            {
                Response.Write("<script>alert('Registered Successfully');</script>");
                Response.Redirect("Login.aspx");
            }

            else
            {
                Response.Write("<script>alert('Some error Encountered');</script>");
            }
        }
    }
Esempio n. 3
0
    protected void btnupdate_Click(object sender, EventArgs e)
    {
        SortedList s = new SortedList();

        s.Add("@mode", "Update");
        s.Add("@FName", txtfname.Text.ToUpper());
        s.Add("@Lname", txtlname.Text.ToUpper());
        s.Add("@Email", txtemail.Text);
        s.Add("@PNo", txtpno.Text);
        s.Add("@Address", txtadd.Text);
        s.Add("@City", txtcity.Text);
        s.Add("@Country", txtcountry.Text);
        s.Add("@Province", txtprovince.Text);
        s.Add("@category", ddlcatageory.Text);
        s.Add("@Title", txttitle.Text);
        s.Add("@Description", txtDesc.Text);
        s.Add("@ZipCode", txtzipcode.Text);
        s.Add("@Id", ViewState["Id"]);


        int i = con.ExecuteNonQuerySP("sp_post", s);

        if (i > 0)
        {
            Response.Write("<script>alert('data updated succesfully');</script>");

            display();
        }

        else
        {
            Response.Write("<script>alert('some error occured !!!');</script>");
        }
    }
Esempio n. 4
0
    public void DataFormFillUpdate(ConnectionSql con, string Id, string User, string IPAdd)
    {
        SortedList s1 = new SortedList();

        s1.Add("@mode", "UpdateFillFormStatus");
        s1.Add("@Id", Id);
        s1.Add("@UpdatedBy", User);
        s1.Add("@IpAddress", IPAdd);
        con.ExecuteNonQuerySP("SP_Mst_ScheduleMaster", s1);
    }
Esempio n. 5
0
    protected void btnpsubmit_Click(object sender, EventArgs e)
    {
        DataTable dt = con.GetSelectQuety("select * from Registration where Id='" + Session["Id"].ToString() + "' and Pass='******'");

        if (dt != null && dt.Rows.Count > 0)
        {
            SortedList s = new SortedList();
            s.Add("@mode", "Updatepass");
            s.Add("@Id", Session["Id"].ToString());
            s.Add("@Pass", txtnpass.Text);


            int i = con.ExecuteNonQuerySP("SP_Registration", s);
            if (i > 0)
            {
                Label2.Text = "Password updated successfully";
            }

            else
            {
                Label2.Text = "some error occured";
            }
        }
    }