示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Session["id"] = "";
         if (Request.QueryString["id"] != null && Request.QueryString["vc"] != null && Request.QueryString["ne"] != null)
         {
             Model.tab_customers modelCu = new Model.tab_customers();
             Bll.CustomerBll     Cb      = new Bll.CustomerBll();
             modelCu.customerID = int.Parse(Request.QueryString["id"]);
             modelCu            = Cb.getCustomer(modelCu);
             if (modelCu == null || modelCu.customerValidateCode != Request.QueryString["vc"])
             {
                 Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('" + (string)GetGlobalResourceObject("GResource", "alertlinkcannotrec") + "');window.location.href = 'login.aspx';</script>");
                 //Response.Redirect("login.aspx", true);
             }
             else
             {
                 modelCu.customerPrivateEmail = Request.QueryString["ne"];
                 Cb.update(modelCu);
                 Session["id"] = modelCu.customerID;
                 Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('" + (string)GetGlobalResourceObject("GResource", "alertnewemailok") + "');window.location.href = 'index.aspx';</script>");
                 //Response.Redirect("default.aspx");
             }
         }
         else
         {
             Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('" + (string)GetGlobalResourceObject("GResource", "alertlinkcannotrec") + "');window.location.href = 'login.aspx';</script>");
             //Response.Redirect("login.aspx", true);
         }
     }
 }
示例#2
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        Random random    = new Random();
        string checkCode = "";

        for (int i = 0; i <= 4; i++)
        {
            int num = random.Next(1, 10);
            checkCode += num.ToString();
        }

        modelCu = Cb.getCustomer(modelCu);
        modelCu.customerValidateCode = pc.md5(checkCode);
        Cb.update(modelCu);

        string newemaillink = "http://www.eshinelee.com/confirmemail.aspx?id=" + modelCu.customerID + "&vc=" + modelCu.customerValidateCode + "&ne=" + this.TextBox4.Text;

        try
        {
            SendEmail(modelCu.customerName, newemaillink);

            this.Panel2.Visible = false;
            this.Label1.Text    = this.TextBox4.Text;
            this.Panel3.Visible = true;
        }
        catch (Exception ex)
        {
            Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "message", " <script>alert('" + (string)GetGlobalResourceObject("GResource", "alertsendemailerror") + ex.Message + "')</script>");
            return;
        }
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["oid"] != null && Request.QueryString["price"] != null)
        {
            ViewState["shoporderid"]    = Request.QueryString["oid"];
            ViewState["shoporderprice"] = Request.QueryString["price"];
            Session["shoporderid"]      = ViewState["shoporderid"];
            Session["shoporderprice"]   = ViewState["shoporderprice"];
        }
        else
        {
            if (Session["shoporderid"] != null && Session["shoporderprice"] != null)
            {
                ViewState["shoporderid"]    = Session["shoporderid"];
                ViewState["shoporderprice"] = Session["shoporderprice"];
            }
        }

        order.orderID                = int.Parse(ViewState["shoporderid"].ToString());
        order                        = ob.getorders(order);
        modelCu.customerID           = order.customerID;
        modelCu                      = Cb.getCustomer(modelCu);
        this.Label2.Text             = ViewState["shoporderprice"].ToString();
        this.HyperLink3.NavigateUrl += ViewState["shoporderid"];
    }
示例#4
0
    void processsend()
    {
        string pw = pc.MakePassword(6);

        modelCu             = Cb.getCustomer(modelCu);
        modelCu.customerPwd = pc.md5(pw);
        Cb.update(modelCu);

        if (Request.QueryString["sc"] != null)
        {
            pc.addlog(this.TextBox1.Text, pw, "", "", "用户邮件获取密码", "安全问题");
        }
        else
        {
            pc.addlog(this.TextBox1.Text, pw, "", "", "用户邮件获取密码", "");
        }

        try
        {
            SendEmail(modelCu.customerName, pw, modelCu.customerCode, modelCu.customerCompany);

            this.Label1.Text    = this.TextBox1.Text;
            this.Panel1.Visible = true;
            this.Panel2.Visible = false;
            Session["cc"]       = modelCu.customerCompany;
            //Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "message", " <script>alert('登陆成功')</script>");
        }
        catch (Exception ex)
        {
            Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "message", " <script>alert('发送邮件出错!!" + ex.Message + "')</script>");
        }
    }
示例#5
0
    protected void Button6_Click(object sender, EventArgs e)
    {
        DataTable dt = Cb.CustomerSelect("select customerID from tab_customers where customerMobile='" +
                                         this.TextBox2.Text + "' and customerIDcard='" + this.TextBox3.Text + "'");

        if (dt.Rows.Count > 0)
        {
            string pw = pc.MakePassword(6);
            modelCu.customerID  = Convert.ToInt32(dt.Rows[0]["customerID"]);
            modelCu             = Cb.getCustomer(modelCu);
            modelCu.customerPwd = pc.md5(pw);
            Cb.update(modelCu);

            pc.addlog(this.TextBox2.Text, pw, "", "", "用户短信获取密码", "");

            //sendsms(pw);//发送短信

            this.Panel1.Visible = true;
            this.Panel5.Visible = false;
        }
        else
        {
            Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "message", " <script>alert('" + (string)GetGlobalResourceObject("GResource", "alertwrongmobileid") + "')</script>");
        }
    }
示例#6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Image1.Visible == false)
        {
            if (Session["cc"] != null && Session["cc"].ToString() != "")
            {
                this.Image1.ImageUrl = "~/Images/customers/" + Session["cc"].ToString() + ".jpg";
                this.Image1.Visible  = true;

                if (comb.getcanduallanguage(Session["cc"].ToString()) != "1")
                {
                    this.HyperLink3.Visible = false;
                }
            }
        }


        if (Session["id"] == null || Session["id"].ToString() == "" || (Session["firstlogin"] != null && Session["firstlogin"] == "1"))
        {
            this.Panel1.Visible = false;
            this.Panel2.Visible = true;
        }
        else
        {
            modeCu.customerID = int.Parse(Session["id"].ToString());
            modeCu            = cb.getCustomer(modeCu);

            this.Label1.Text = Session["cus"].ToString();
            initpanel();
        }
    }
示例#7
0
 void init()
 {
     modelCu = Cb.getCustomer(modelCu);
     if (modelCu.customerPrivateEmail != "")
     {
         this.Panel1.Visible = true;
         this.Panel2.Visible = false;
         this.Label4.Text    = modelCu.customerPrivateEmail;
     }
 }
示例#8
0
    void init()
    {
        modelCu = Cb.getCustomer(modelCu);
        string s = modelCu.customerMobile;

        if (s != "" && s.Length > 5)
        {
            this.Label4.Text    = s.Substring(0, 3) + "******" + s.Substring(s.Length - 2, 2);
            this.Panel1.Visible = true;
            this.Panel2.Visible = false;
        }
    }
示例#9
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     Model.tab_customers modelCu = new Model.tab_customers();
     Bll.CustomerBll     Cb      = new Bll.CustomerBll();
     modelCu.customerID  = int.Parse(Session["id"].ToString());
     modelCu             = Cb.getCustomer(modelCu);
     modelCu.customerMsg = "agreed";
     Cb.update(modelCu);
     //Bll.messageBll mb = new Bll.messageBll();
     //mb.sendmsg(1003, modelCu);
     //Session["firstlogin"] = "";
     Response.Redirect("reserveexam.aspx");
 }
示例#10
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     modelCu.customerPrivateEmail = this.TextBox1.Text;
     modelCu = Cb.getCustomer(modelCu);
     if (modelCu.customerSafeA1 == this.TextBox4.Text)
     {
         Response.Redirect("fetchpassword.aspx?sc=20130828&ne=" + this.TextBox1.Text);
     }
     else
     {
         Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('" + (string)GetGlobalResourceObject("GResource", "alertwronganswer") + "');</script>");
     }
 }
示例#11
0
 void init()
 {
     modelCu = Cb.getCustomer(modelCu);
     if (modelCu.customerSafeQ1 != "")
     {
         this.Label4.Text = modelCu.customerSafeQ1;
     }
     else
     {
         this.Panel0.Visible = false;
         this.Panel1.Visible = true;
     }
 }
示例#12
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        string s = "";
        int    sus = 0, err = 0;
        string errid = "";

        if (this.TextBox2.Text == "")
        {
            if (this.TextBox1.Text.Contains('-') || this.TextBox1.Text.Contains(','))
            {
                string[] oid = this.TextBox1.Text.Split('-');
                if (this.TextBox1.Text.Contains('-'))
                {
                    s = "select customerID, customerCode,customerIDcard from tab_customers where customerID>=" + oid[0] + " and customerID<=" + oid[1];
                }
                else
                {
                    s = "select customerID, customerCode,customerIDcard from tab_customers where customerID in (" + oid[0] + ")";
                }
                Model.tab_customers cus  = new Model.tab_customers();
                Bll.CustomerBll     cusb = new Bll.CustomerBll();
                DataTable           dt   = dbsql.ExecuteDataSet(s).Tables[0];
                string pw = "123456";
                string idcard;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    cus.customerID  = Convert.ToInt32(dt.Rows[i]["customerID"]);
                    cus             = cusb.getCustomer(cus);
                    cus.customerPwd = "";

                    idcard = dt.Rows[i]["customerIDcard"].ToString();
                    if (idcard.Length < 6)
                    {
                        idcard = "123456";
                    }
                    else
                    {
                        idcard = idcard.Substring(idcard.Length - 6, 6);
                    }
                    pw = idcard;
                    cus.customerPwd = pc.md5(pw);
                    cusb.update(cus);
                }
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('修改成功。');</script>");
            }
        }
        else
        {
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('请输入密码!');</script>");
        }
    }
示例#13
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     modelCu.customerPrivateEmail = this.TextBox1.Text;
     modelCu = Cb.getCustomer(modelCu);
     if (modelCu != null)
     {
         this.Label1.Text    = modelCu.customerSafeQ1;
         this.Panel3.Visible = false;
         this.Panel4.Visible = true;
     }
     else
     {
         Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('" + (string)GetGlobalResourceObject("GResource", "alertnoemailrecord") + "');</script>");
     }
 }
示例#14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request["ordersshopid"] != null && Request["ordersshopid"].ToString() != "")
     {
         ViewState["ordersshopid"] = Request["ordersshopid"];
         orders.orderID            = int.Parse(ViewState["ordersshopid"].ToString());
         orders            = ob.getorders(orders);
         modeCu.customerID = orders.customerID;
         modeCu            = cb.getCustomer(modeCu);
     }
     if (!IsPostBack)
     {
         init();
     }
 }
示例#15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.CheckUser((Hashtable)Application["Online"]);
        }
        modelCu.customerID = int.Parse(Session["id"].ToString());
        modelCu            = Cb.getCustomer(modelCu);

        if (!Page.IsPostBack)
        {
            init();
            initcity(sender, e);
        }
        filladdresses();
    }
示例#16
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        if (this.RadioButton3.Checked && this.TextBox10.Text == "")
        {
            Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "message", " <script>alert('请填写初始化密码!');</script>");
            return;
        }
        Model.tab_customers cus  = new Model.tab_customers();
        Bll.CustomerBll     cusb = new Bll.CustomerBll();
        string    s  = "select customerID, customerCode,customerIDcard from tab_customers where customerCompanycode='" + modelcp.Companycode + "'";
        DataTable dt = dbsql.ExecuteDataSet(s).Tables[0];
        string    pw = "123456";
        string    idcard;

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            cus.customerID  = Convert.ToInt32(dt.Rows[i]["customerID"]);
            cus             = cusb.getCustomer(cus);
            cus.customerPwd = "";

            if (this.RadioButton1.Checked)
            {
                pw = dt.Rows[i]["customerCode"].ToString();
            }
            else if (this.RadioButton2.Checked)
            {
                idcard = dt.Rows[i]["customerIDcard"].ToString();
                if (idcard.Length < 6)
                {
                    idcard = "123456";
                }
                else
                {
                    idcard = idcard.Substring(idcard.Length - 6, 6);
                }
                pw = idcard;
            }
            else if (this.RadioButton3.Checked)
            {
                pw = this.TextBox10.Text;
            }
            cus.customerPwd = pc.md5(pw);
            cusb.update(cus);
        }

        Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "message", " <script>alert('初始化密码完成!');</script>");
    }
示例#17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.CheckUser((Hashtable)Application["Online"]);
        }

        modelCu.customerID = int.Parse(Session["id"].ToString());
        modelCu            = Cb.getCustomer(modelCu);

        if (!Page.IsPostBack)
        {
            if (!ob.hasshoporder(modelCu.customerID))
            {
                this.Panel1.Visible = true;
            }
        }
    }
示例#18
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        modelCu = Cb.getCustomer(modelCu);
        if (false && modelCu.customerMobile != this.TextBox1.Text)
        {
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('" + (string)GetGlobalResourceObject("GResource", "oldmobilewrong") + "');</script>");
            this.TextBox1.Focus();
            return;
        }

        modelCu.customerMobile = this.TextBox4.Text;
        Cb.update(modelCu);
        this.Panel2.Visible = false;
        this.Label1.Text    = this.TextBox4.Text;
        this.Panel3.Visible = true;

        Bll.messageBll mb = new Bll.messageBll();
        mb.sendmsg(1008, modelCu);
    }
示例#19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request["language"] == null)
            {
                if (Session["language"] == null)
                {
                    Session["language"] = "zh-cn";
                }
            }
            else
            {
                Session["language"] = Request["language"];
            }
            this.CheckUser((Hashtable)Application["Online"]);
            fillshopitem();
            //return;
            initcity(sender, e);
            checkaddtocart();
            checktocart(sender, e);
        }
        if (this.Panel1.Visible)
        {
        }
        modelCu.customerID = int.Parse(Session["id"].ToString());
        modelCu            = Cb.getCustomer(modelCu);

        if (this.Panel2.Visible)
        {
            filladdresses();
            this.Panel5.Visible = true;
        }
        else
        {
            this.Panel5.Visible = false;
        }

        //jiekong();
        //string shuzi = "182";
        //jieshu(shuzi);
    }
示例#20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string s = "";



        modelCu.customerID = int.Parse(Session["id"].ToString());
        modelCu            = Cb.getCustomer(modelCu);

        if (!Page.IsPostBack)
        {
            rc.initcitySupplier(false, ref branchmapclass, modelCu, com_Province, com_City, DropDownList1, GMap1, Literal1, ref hideik, ref hidemn, ref continue2class, ref supplierlistcontentikang, ref supplierlistcontentciming, ref supplierlistcontentmeinian, Panel14, Panel15, Panel16);
        }

        branchmapclass = "";

        rc.fillsupplier(modelCu, this.com_Province, this.com_City, this.DropDownList1);
        rc.fillbranch(false, ref branchmapclass, modelCu, com_Province, com_City, DropDownList1, GMap1, Literal1, ref hideik, ref hidemn, ref continue2class, ref supplierlistcontentikang, ref supplierlistcontentciming, ref supplierlistcontentmeinian, Panel14, Panel15, Panel16);
        return;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.CheckUser((Hashtable)Application["Online"]);
            if (Session["firstlogin"] != null && Session["firstlogin"] == "1")
            {
                this.Label1.Visible = false;
                this.Label2.Visible = false;
            }
        }

        modelCu.customerID = int.Parse(Session["id"].ToString());
        modelCu            = Cb.getCustomer(modelCu);

        if (!Page.IsPostBack)
        {
            init();
        }
        displayage();
    }
示例#22
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     if (this.TextBox1.Text == this.TextBox4.Text)
     {
         modelCu = Cb.getCustomer(modelCu);
         modelCu.customerSafeQ1 = this.Label1.Text;
         modelCu.customerSafeA1 = this.TextBox1.Text;
         Cb.update(modelCu);
         this.Panel2.Visible = false;
         this.Panel3.Visible = true;
     }
     else
     {
         Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('" + (string)GetGlobalResourceObject("GResource", "twopassnotmatch") + "');</script>");
         //Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "message", " <script>alert('两次输入的安全密码答案不一致,请重试一次。');<script>");
         this.Panel1.Visible = true;
         this.Panel2.Visible = false;
         this.TextBox1.Text  = "";
         this.TextBox4.Text  = "";
     }
 }
示例#23
0
    void init()
    {
        modelCu = Cb.getCustomer(modelCu);
        string s = modelCu.customerIDcard;

        if (s != "" && s.Length > 5)
        {
            this.Label1.Text = (string)GetGlobalResourceObject("GResource", "Bound") + s.Substring(0, 5) + "***********" + s.Substring(s.Length - 2, 2) + ",";
        }

        if (modelCu.customerSafeQ1 != "")
        {
            this.Label2.Text = (string)GetGlobalResourceObject("GResource", "settedquestion");
        }
        else
        {
            this.Label2.Text = (string)GetGlobalResourceObject("GResource", "notsettedques");
        }

        if (modelCu.customerPrivateEmail != "")
        {
            this.Label3.Text = (string)GetGlobalResourceObject("GResource", "Bound") + modelCu.customerPrivateEmail;
        }
        else
        {
            this.Label3.Text = (string)GetGlobalResourceObject("GResource", "notboundset");
        }

        s = modelCu.customerMobile;
        if (s != "" && s.Length > 5)
        {
            this.Label4.Text = (string)GetGlobalResourceObject("GResource", "Bound") + s.Substring(0, 3) + "******" + s.Substring(s.Length - 2, 2);
        }
        else
        {
            this.Label4.Text = (string)GetGlobalResourceObject("GResource", "notboundset");
        }
    }
示例#24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ViewState["cusID"] = Request.QueryString["Cid"];

            Session["id"]          = ViewState["cusID"];
            modelCu.customerID     = Convert.ToInt32(ViewState["cusID"]);
            modelCu                = cb.getCustomer(modelCu);
            Session["cus"]         = modelCu.customerName;
            Session["Companycode"] = modelCu.customerCompanycode;
            Session["Company"]     = modelCu.customerCompany;
        }
        modelCu.customerID = Convert.ToInt32(ViewState["cusID"].ToString());
        modelCu            = cb.getCustomer(modelCu);
        if (!Page.IsPostBack)
        {
            init();
            displayage();
            initcityDilivery(sender, e);
        }

        filladdresses();
    }
示例#25
0
    public void fillsupplier(Model.tab_customers modelCu, DropDownList com_Province, DropDownList com_City, DropDownList DropDownList1)
    {
        string s = "select distinct  supplier from tab_suppliers where id in ("
                   + comb.getavailablesupplier(modelCu.customerCompany)
                   + ") and province like N'" + com_Province.SelectedValue + "'";

        if (com_City.SelectedValue != (string)GetGlobalResourceObject("GResource", "com_CityResource1"))
        {
            s += " and city like N'" + com_City.SelectedValue + "'";
        }

        if (modelCu.disablebranch != "")
        {
            s += " and supplier not in (" + modelCu.disablebranch + ")";
        }

        DataTable dt = sb.GetAny(s);

        DropDownList1.DataTextField  = "supplier";//DropDownList1
        DropDownList1.DataValueField = "supplier";
        DropDownList1.DataSource     = dt.DefaultView;
        DropDownList1.DataBind();
        DropDownList1.Items.Insert(0, new ListItem((string)GetGlobalResourceObject("GResource", "DropDownList1Resource1")));//
    }
示例#26
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (this.TextBox1.Text != "" && this.TextBox2.Text != "")
        {
            if (false && StrSecurity.CheckStr(this.TextBox1.Text + this.TextBox2.Text) == false)
            {
                Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "message", " <script>alert('用户提交非法字符')</script>");
                return;
            }
            addloginlog();

            modelCu.customerCode         = this.TextBox1.Text;
            modelCu.customerIDcard       = this.TextBox1.Text;
            modelCu.customerMobile       = this.TextBox1.Text;
            modelCu.customerEmail        = this.TextBox1.Text;
            modelCu.customerPrivateEmail = this.TextBox1.Text;
            modelCu.customerPwd          = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(this.TextBox2.Text, "MD5").ToLower();
            if (Session["cc"] != null)
            {
                modelCu.customerCompany = Session["cc"].ToString();
            }
            DataTable dt = Cb.CustomerSelect(modelCu);

            if (dt.Rows.Count > 0)
            {
                Session["cus"]         = dt.Rows[0]["customerName"];
                Session["Companycode"] = dt.Rows[0]["customerCompanycode"];
                Session["Company"]     = dt.Rows[0]["customerCompany"];
                Session["id"]          = dt.Rows[0]["customerID"];
                if (Session["language"] == null)
                {
                    Session["language"] = "zh-cn";
                }


                checkdoublelogin(dt.Rows[0]["customerID"].ToString(), loginlog.loginip);

                loginlog.status = "ok";
                lb.Add(loginlog);

                //更新最后登录时间
                modelCu.customerID        = int.Parse(dt.Rows[0]["customerID"].ToString());
                modelCu                   = Cb.getCustomer(modelCu);
                modelCu.customerLastLogin = DateTime.Now;
                Cb.update(modelCu);


                //检查是否密码已过期
                //if (DateTime.Now > DateTime.Parse(dt.Rows[0]["customerLastPWChanged"].ToString()).AddDays(180))
                //{
                //    Response.Redirect("changepassword.aspx", true);
                //}

                Response.Redirect("index.aspx");
                //Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "message", " <script>alert('登陆成功')</script>");
            }
        }
        else
        {
            Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "message", " <script>alert('用户名及密码不能为空')</script>");
        }
    }
示例#27
0
    public void initcitySupplier(bool isrel, ref string branchmapclass, Model.tab_customers modelCu, DropDownList com_Province,
                                 DropDownList com_City, DropDownList DropDownList1, GMap GMap1, Literal Literal1, ref string hideik, ref string hidemn,
                                 ref string continue2class, ref string supplierlistcontentikang, ref string supplierlistcontentciming, ref string supplierlistcontentmeinian,
                                 Panel Panel14, Panel Panel15, Panel Panel16)
    {
        initprovincecitydropdown(isrel, modelCu, com_Province, com_City);
        fillbranch(isrel, ref branchmapclass, modelCu, com_Province, com_City, DropDownList1, GMap1, Literal1, ref hideik, ref hidemn, ref continue2class, ref supplierlistcontentikang, ref supplierlistcontentciming, ref supplierlistcontentmeinian, Panel14, Panel15, Panel16);
        //try
        //{
        //    DataTable dt;
        //    if (isrel)
        //    {
        //        dt = Bll.reserveexam.getexamprovinceRel(modelCu.customerCompany);
        //    }
        //    else
        //    {
        //        dt = Bll.reserveexam.getexamprovince(modelCu.customerCompany);
        //    }

        //    for (int i = 0; i < dt.Rows.Count; i++)
        //    {
        //        com_Province.Items.Add(dt.Rows[i][0].ToString());
        //    }
        //    int proindex, cityindex;
        //    string province = "", city = "";
        //    if (modelCu.customerProvince != "")
        //    {
        //        province = modelCu.customerProvince;
        //    }
        //    else if (modelCu.customerCompanyProvince != "")
        //    {
        //        province = modelCu.customerCompanyProvince;
        //    }

        //    if (modelCu.customerCity != "")
        //    {
        //        city = modelCu.customerCity;
        //    }
        //    else if (modelCu.customerCompanyCity != "")
        //    {
        //        city = modelCu.customerCompanyCity;
        //    }
        //    if (province != "")
        //    {
        //        proindex = com_Province.Items.IndexOf(com_Province.Items.FindByText(province));
        //        if (proindex > 0)
        //        {
        //            com_Province.SelectedIndex = proindex;
        //            if (isrel)
        //            {
        //                com_Province_SelectedIndexChanged(true,modelCu.customerCompany, com_Province, com_City);

        //            }
        //            else
        //            {
        //                com_Province_SelectedIndexChanged(false, modelCu.customerCompany, com_Province, com_City);
        //            }

        //            if (city != "")
        //            {
        //                cityindex = com_City.Items.IndexOf(com_City.Items.FindByText(city));
        //                if (cityindex > 0)
        //                {
        //                    com_City.SelectedIndex = cityindex;
        //                    branchmapclass = "";
        //                    fillsupplier(modelCu, com_Province, com_City, DropDownList1);

        //                    fillbranch(isrel, ref branchmapclass, modelCu, com_Province, com_City, DropDownList1, GMap1, Literal1, ref  hideik, ref  hidemn, ref  continue2class, ref  supplierlistcontentikang, ref  supplierlistcontentciming, ref  supplierlistcontentmeinian, Panel14, Panel15, Panel16);


        //                }
        //            }
        //        }

        //    }
        //}
        //catch (Exception)
        //{
        //    Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('数据库连接错误!');</script>");
        //}
    }
示例#28
0
    public string initprovincecitydropdown(bool isrel, Model.tab_customers modelCu, DropDownList com_Province, DropDownList com_City)
    {
        try
        {
            DataTable dt;
            if (isrel)
            {
                dt = Bll.reserveexam.getexamprovinceRel(modelCu.customerCompany);
            }
            else
            {
                dt = Bll.reserveexam.getexamprovince(modelCu.customerCompany);
            }
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                com_Province.Items.Add(dt.Rows[i][0].ToString());
            }
            int    proindex, cityindex;
            string province = "", city = "";
            if (modelCu.customerProvince != "")
            {
                province = modelCu.customerProvince;
            }
            else if (modelCu.customerCompanyProvince != "")
            {
                province = modelCu.customerCompanyProvince;
            }

            if (modelCu.customerCity != "")
            {
                city = modelCu.customerCity;
            }
            else if (modelCu.customerCompanyCity != "")
            {
                city = modelCu.customerCompanyCity;
            }
            if (province != "")
            {
                proindex = com_Province.Items.IndexOf(com_Province.Items.FindByText(province));
                if (proindex > 0)
                {
                    com_Province.SelectedIndex = proindex;
                    if (isrel)
                    {
                        com_Province_SelectedIndexChanged(true, modelCu.customerCompany, com_Province, com_City);
                    }
                    else
                    {
                        com_Province_SelectedIndexChanged(false, modelCu.customerCompany, com_Province, com_City);
                    }

                    if (city != "")
                    {
                        cityindex = com_City.Items.IndexOf(com_City.Items.FindByText(city));
                        if (cityindex > 0)
                        {
                            com_City.SelectedIndex = cityindex;
                        }
                    }
                }
            }
        }
        catch (Exception)
        {
            return("error");
        }
        return("success");
    }
示例#29
0
    public void fillbranch(bool isrel, ref string branchmapclass, Model.tab_customers modelCu, DropDownList com_Province,
                           DropDownList com_City, DropDownList DropDownList1, GMap GMap1, Literal Literal1, ref string hideik, ref string hidemn,
                           ref string continue2class, ref string supplierlistcontentikang, ref string supplierlistcontentciming, ref string supplierlistcontentmeinian,
                           Panel Panel14, Panel Panel15, Panel Panel16)
    {
        if (branchmapclass != "")
        {
            return;
        }

        string city = "", supplier = "";

        if (com_City.SelectedValue != (string)GetGlobalResourceObject("GResource", "com_CityResource1"))
        {
            city = com_City.SelectedValue;
        }
        //if (DropDownList1.SelectedValue !=(string)GetGlobalResourceObject("GResource", "DropDownList1Resource1") )
        //{
        //    supplier= DropDownList1.SelectedValue ;
        //}

        if (modelCu.disablebranch != "")
        {
            if (modelCu.disablebranch.Contains("爱康国宾"))
            {
                hideik = "hidden";
            }
            if (modelCu.disablebranch.Contains("美年大健康"))
            {
                hidemn = "hidden";
            }
        }

        //int itemmax = fillbranchmap(GMap1,
        //    Bll.reserveexam.getbranchlist(modelCu,com_Province.SelectedValue,city,supplier),
        //    ref continue2class, ref supplierlistcontentikang, ref supplierlistcontentciming, ref supplierlistcontentmeinian);

        int itemmax;

        if (isrel)
        {
            itemmax = fillbranchbaidumap(Literal1,
                                         Bll.reserveexam.getbranchlistRel(modelCu, com_Province.SelectedValue, city, supplier),
                                         ref continue2class, ref supplierlistcontentikang, ref supplierlistcontentciming, ref supplierlistcontentmeinian);
        }
        else
        {
            itemmax = fillbranchbaidumap(Literal1,
                                         Bll.reserveexam.getbranchlist(modelCu, com_Province.SelectedValue, city, supplier),
                                         ref continue2class, ref supplierlistcontentikang, ref supplierlistcontentciming, ref supplierlistcontentmeinian);
        }

        if (itemmax < 5)
        {
            Panel14.Height = itemmax * 80 + 60;
            Panel15.Height = Panel14.Height;
            Panel16.Height = Panel14.Height;
        }
        else
        {
            Panel14.Height = 440;
            Panel15.Height = Panel14.Height;
            Panel16.Height = Panel14.Height;
        }
        if (supplierlistcontentmeinian == "")
        {
            hidemn = "hidden";
        }
    }