Ejemplo n.º 1
0
 protected void Button9_Click(object sender, EventArgs e)
 {
     if (DropDownList1.SelectedIndex == 0)
     {
         Response.Write("<script>alert('请选择字段名称!')</script>");
         DropDownList1.Focus();
     }
     else if (TextBox11.Text == "")
     {
         Response.Write("<script>alert('请输入要查询的值!')</script>");
         TextBox11.Focus();
     }
     else
     {
         if (GetSelDate() == 0)
         {
             Response.Write("<script>alert('无此记录!')</script>");
             GetSelDate();
         }
         else
         {
             GetSelDate();
             Session["check"] = "0";
         }
     }
 }
Ejemplo n.º 2
0
 private void Clear_Controls()
 {
     TextBox11.Text = string.Empty;
     TextBox22.Text = string.Empty;
     TextBox33.Text = string.Empty;
     TextBox11.Focus();
 }
Ejemplo n.º 3
0
 public void clear()
 {
     TextBox9.Clear();
     TextBox7.Clear();
     TextBox15.Clear();
     TextBox13.Clear();
     TextBox11.Clear();
     TextBox10.Clear();
     comboBox1.Text = "";
     comboBox2.Text = "";
 }
Ejemplo n.º 4
0
 public void ClearTextBoxes()
 {
     TextBox1.Clear();
     TextBox2.Clear();
     TextBox3.Clear();
     TextBox4.Clear();
     TextBox5.Clear();
     TextBox6.Clear();
     TextBox7.Clear();
     TextBox8.Clear();
     TextBox9.Clear();
     TextBox10.Clear();
     TextBox11.Clear();
     TextBox12.Clear();
     TextBoxID.Clear();
 }
Ejemplo n.º 5
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        string firstName, lastName, id, password, cellPhone, workPhone, cellProvider, category;
        bool   encryption;

        Label2.Visible = true;
        string url = TextBox11.Text;

        if (url == null || url.Length == 0)
        {
            Label2.Text = "Enter Valid Url";
            TextBox11.Focus();
            return;
        }
        firstName = TextBox4.Text;
        if (firstName == null || firstName.Length == 0)
        {
            Label2.Text = "Enter First Name";
            TextBox4.Focus();
            return;
        }

        lastName = TextBox5.Text;
        if (lastName == null || lastName.Length == 0)
        {
            Label2.Text = "Enter Last Name";
            TextBox5.Focus();
            return;
        }
        id = TextBox6.Text;
        if (id == null || id.Length == 0)
        {
            Label2.Text = "Enter Id";
            TextBox6.Focus();
            return;
        }
        password = TextBox7.Text;
        if (password == null || password.Length == 0)
        {
            Label2.Text = "Enter Password";
            TextBox7.Focus();
            return;
        }

        workPhone = TextBox8.Text;
        if (workPhone == null || workPhone.Length == 0)
        {
            Label2.Text = "Enter Work Phone";
            TextBox8.Focus();
            return;
        }
        cellPhone = TextBox9.Text;
        if (cellPhone == null || cellPhone.Length == 0)
        {
            Label2.Text = "Enter Cell Phone";
            TextBox9.Focus();
            return;
        }
        cellProvider = TextBox10.Text;

        /* if (cellProvider == null || cellProvider.Length == 0)
         * {
         *   Label2.Text = "Enter Cell Provider";
         *   TextBox10.Focus();
         *   return;
         * }*/

        category       = testSelect.Value;
        encryption     = CheckBox1.Checked;
        Label2.Visible = true;


        List <String> data = new List <string>();

        Label2.Text = category;

        data.Add(firstName);
        data.Add(lastName);
        data.Add(id);
        if (encryption)
        {
            EncryptionService.ServiceClient encryptSVC = new EncryptionService.ServiceClient();
            data.Add(encryptSVC.Encrypt(password));
        }
        else
        {
            data.Add(password);
        }
        data.Add(workPhone);
        data.Add(cellPhone);
        data.Add(category);
        data.Add(encryption.ToString());
        data.Add(cellProvider);



        XmlService.Service1Client svc = new XmlService.Service1Client();

        string response = svc.addPerson(data.ToArray(), url);

        Label2.Text = response;

        Button2.Focus();
    }