Exemple #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Warehouse.Controllor.transform ff = new Controllor.transform();
            ff.trans("");
            string x1 = Session["One"].ToString();
            string x2 = Session["Two"].ToString();
            string x3 = Session["Twozone"].ToString();
            string x4 = "";
            string x5 = "";

            try
            {
                x4 = Session["Twoo"].ToString();
                x5 = Session["Twoozone"].ToString();
            }
            catch
            {
                x4 = "";
                x5 = "";
            }
            Warehouse.Controllor.Queryareanum qu = new Controllor.Queryareanum();
            string x0 = qu.querying(x2);
            string x  = x1 + x0 + x2;
        }
        protected void TextBox7_TextChanged(object sender, EventArgs e)
        {
            string x0 = "", x1 = "", x2 = "", x4 = "", x5 = "", x6 = "";

            ListBox6.Style["width"] = ListBox6.SelectedItem.Text.Length * 40 + "px";
            if (TextBox7.Text.Length != 18)
            {
                Image7.Visible  = true;
                Image7.ImageUrl = "~/Image/错号.png";
                Label17.Text    = "身份证必须为18位";
            }
            else
            {
                x0 = TextBox7.Text.Substring(TextBox7.Text.Length - 2, 1);
                x1 = TextBox7.Text.Substring(0, 6);
                x2 = TextBox7.Text.Substring(6, 8);
                Warehouse.Controllor.Judgezone ju = new Controllor.Judgezone();
                string bb = ju.judge(ListBox5.SelectedItem.Text + ListBox6.SelectedItem.Text);
                if (bb != "")
                {
                    string aa    = Session["zone1"].ToString();
                    string bbbbb = Session["zone2"].ToString();
                    if (x1 == Session["zone1"].ToString() || x1 == Session["zone2"].ToString())
                    {
                        x4 = ListBox2.SelectedItem.Text;
                        x5 = ListBox3.SelectedItem.Text;
                        x6 = ListBox4.SelectedItem.Text;
                        if (x5.Length == 1)
                        {
                            x5 = "0" + x5;
                        }
                        if (x6.Length == 1)
                        {
                            x6 = "0" + x6;
                        }
                        if (x2 == x4 + x5 + x6)
                        {
                            if (ListBox7.SelectedItem.Text == "男")
                            {
                                if (x0 == "1")
                                {
                                    Image7.Visible  = true;
                                    Image7.ImageUrl = "~/Image/对号.png";
                                    Label17.Text    = "";
                                    Warehouse.Controllor.Queryareanum qa = new Controllor.Queryareanum();
                                    ListBox6.Visible = false;
                                    TextBox4.Visible = true;
                                    TextBox4.Text    = qa.querys(ListBox6.SelectedItem.Text) + ListBox6.SelectedItem.Text;
                                    TextBox4.Width   = System.Web.UI.WebControls.Unit.Parse(TextBox4.Text.Length * 21 + "px");
                                    ListBox5.Enabled = false;
                                    ListBox6.Enabled = false;
                                }
                                else
                                {
                                    Image7.Visible  = true;
                                    Image7.ImageUrl = "~/Image/错号.png";
                                    Label17.Text    = "请重新选择性别或输入身份证号," + x2;
                                    Label17.Visible = true;
                                }
                            }
                            else if (ListBox7.SelectedItem.Text == "女")
                            {
                                if (x0 == "2")
                                {
                                    Image7.Visible  = true;
                                    Image7.ImageUrl = "~/Image/对号.png";
                                    Label17.Text    = "";
                                    Warehouse.Controllor.Queryareanum qa = new Controllor.Queryareanum();
                                    ListBox6.Visible = false;
                                    TextBox4.Visible = true;
                                    TextBox4.Text    = qa.querys(ListBox6.SelectedItem.Text) + ListBox6.SelectedItem.Text;
                                    TextBox4.Width   = System.Web.UI.WebControls.Unit.Parse(TextBox4.Text.Length * 21 + "px");
                                }
                                else
                                {
                                    Image7.Visible  = true;
                                    Image7.ImageUrl = "~/Image/错号.png";
                                    Label17.Text    = "请重新选择性别或输入身份证号," + x2;
                                    Label17.Visible = true;
                                }
                            }
                        }
                        else
                        {
                            Image4.Visible  = true;
                            Image4.ImageUrl = "~/Image/错号.png";
                            Label14.Text    = "请重新选择生日或输入身份证号," + x2;
                            Label14.Visible = true;
                        }
                    }
                    else
                    {
                        Image7.Visible  = true;
                        Image7.ImageUrl = "~/Image/错号.png";
                        Label17.Text    = "请重新选择籍贯或输入身份证号," + x1;
                        Label17.Visible = true;
                    }
                }
            }
        }