Пример #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.Iwcf_serviceClient s = new ServiceReference2.Iwcf_serviceClient();

            string pass = "******";

            //ServiceReference1.WebService1SoapClient obj = new ServiceReference1.WebService1SoapClient();

            s.Register(callback.namee, int.Parse(TextBox3.Text), int.Parse(TextBox2.Text), RadioButtonList1.SelectedItem.Text.ToString(), callback.emaill, pass);
            Server.Transfer("~/Main_Form.aspx");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ServiceReference2.Iwcf_serviceClient ser = new ServiceReference2.Iwcf_serviceClient();

            ServiceReference2.UserClass user = new ServiceReference2.UserClass();
            if (Login_Form.emaill == "")
            {
                user = ser.ViewProfile(callback.emaill);
            }
            else
            {
                user = ser.ViewProfile(Login_Form.emaill);
            }
            Label1.Text = user.email;
            Label2.Text = user.name;
            Label3.Text = (user.age).ToString();
            Label4.Text = (user.weight).ToString();
            Label5.Text = (user.gender).ToString();
        }
        private void GetData()
        {
            ServiceReference2.Iwcf_serviceClient s = new ServiceReference2.Iwcf_serviceClient();
            //ServiceReference2.WCFServiceClient s = new WcfService.WCFServiceClient();

            ServiceReference2.UserClass user = new ServiceReference2.UserClass();
            if (Login_Form.emaill == "")
            {
                user = s.ViewProfile(callback.emaill);
            }
            else
            {
                user = s.ViewProfile(Login_Form.emaill);
            }

            TextBox_email.Text  = user.email;
            TextBox_Name.Text   = user.name;
            TextBox_age.Text    = (user.age).ToString();
            TextBox_weight.Text = (user.weight).ToString();
            TextBox_Gender.Text = (user.gender).ToString();
            TextBox_pass.Text   = (user.password).ToString();
        }
Пример #4
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.Iwcf_serviceClient s = new ServiceReference2.Iwcf_serviceClient();


            if (TextBox1.Text != "" && TextBox2.Text != "" && TextBox3.Text != "" && TextBox4.Text != "" && TextBox5.Text != "" && TextBox6.Text != "" && RadioButtonList1.Text != "")
            {
                if (TextBox4.Text == TextBox5.Text)
                {
                    s.Register(TextBox1.Text, int.Parse(TextBox3.Text.ToString())
                               , int.Parse((TextBox2.Text).ToString()), RadioButtonList1.SelectedItem.Text.ToString()
                               , TextBox6.Text, TextBox4.Text);
                    Server.Transfer("~/Login_Form.aspx");
                }
                else
                {
                    Response.Write("<script>alert('please enter the password right')</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('please enter the empty boxes')</script>");
            }
        }