示例#1
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        String username = TextBox1.Text;
        String password = TextBox2.Text;

        Class1 obj       = new Class1();
        String encrypted = obj.Encrypt(password);

        //  LoginAndSignUp.Service1Client login = new LoginAndSignUp.Service1Client();
        // Login.Service1Client login = new Login.Service1Client();
        SignUpAndAddressService.Service1Client login = new SignUpAndAddressService.Service1Client();
        bool result = login.Login(username, encrypted);
        // bool result = login.Login(username, password);

        HttpCookie myCookies = new HttpCookie("myCookieId");

        myCookies["UserName"] = TextBox1.Text;
        myCookies.Expires     = DateTime.Now.AddDays(20);
        Response.Cookies.Add(myCookies);

        if (result)
        {
            // Response.Redirect("AddToCart_Final.aspx");
            FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, false);
        }
        else
        {
            Label3.Text = "Please Check The credentials ";
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        //We take the input from the user and store it in the xml file.
        if (Session["genstr"].ToString() == TextBox4.Text)
        {
            String username  = TextBox1.Text;
            String password  = TextBox2.Text;
            Class1 obj       = new Class1();
            String encrypted = obj.Encrypt(password);
            string address   = TextBox3.Text;
            SignUpAndAddressService.Service1Client signup = new SignUpAndAddressService.Service1Client();

            bool verify = signup.Login(username, encrypted);
            if (!verify)
            {
                // LoginAndSignUp.Service1Client login = new LoginAndSignUp.Service1Client();
                signup.SignUp(username, password, address);
                Label3.Text = "You have signed up";
            }
            else
            {
                Label3.Text = "You have already signed up";
            }
        }
        else
        {
            Label3.Text = "not match";
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SignUpAndAddressService.Service1Client number = new SignUpAndAddressService.Service1Client();
        int users = number.getNumberOfUsers();

        TextBox1.Text = Convert.ToString(users);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SignUpAndAddressService.Service1Client customer = new SignUpAndAddressService.Service1Client();
        //LoginServiceReference.Service1Client cl = new LoginServiceReference.Service1Client();
        string datalist = customer.CustomerData();

        string[] fdata = datalist.Split(';');
        // DataLabel.Text = fdata;
        GridView1.DataSource = fdata;
        GridView1.DataBind();
    }
示例#5
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        HttpCookie myCookies = Request.Cookies["myCookieId"];

        SignUpAndAddressService.Service1Client address = new SignUpAndAddressService.Service1Client();
        string username = myCookies["UserName"];
        string address1 = address.getAddress(username);

        string credit_card = TextBox2.Text;

        CreditCardService.Service1Client card = new CreditCardService.Service1Client();
        bool confirmation = card.creditCardVerification(credit_card);

        if (confirmation)
        {
            Label3.Text = "The card is verified and the product will be shipped shortly to" + address1;
        }
        else
        {
            Label3.Text = "Please check the card you have entered";
        }
    }