Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (top1.FindControl("lizi5") != null)
        {
            //((HtmlGenericControl)top1.FindControl("lizi5")).Style.Add("background-image", "url(images/menu_bg1.jpg)");
        }
        if (top1.FindControl("izi5") != null)
        {
            ((HtmlAnchor)top1.FindControl("izi5")).Style.Add("color", "#ffffff");
        }
        if (!IsPostBack)
        {
            leica_geosystemsVoteProjectUserManager userbll = new leica_geosystemsVoteProjectUserManager();

            rptProduct.DataSource = userbll.GetList("");
            //rept.DataKeyNames = new string[] { "id" };
            rptProduct.DataBind();
        }
    }
Esempio n. 2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        leica_geosystemsVoteProjectUserManager bll = new leica_geosystemsVoteProjectUserManager();

        string username = this.txtusername.Value;
        StringBuilder strWhere = new StringBuilder();
        if (username != "")
        {

            strWhere.AppendFormat("username='******'", username);
        }
        if (bll.GetList(strWhere.ToString()).Tables[0].Rows.Count == 0)
        {

            string password = discom.EncryptMD5(this.txtpassword.Value);
            string Trueusername = this.txtTrueusername.Value = this.txtusername.Value;
            string company = this.txtcompany.Value;
            string city = this.txtcity.Value;
            string Phone = this.txtPhone.Value;
            string email = this.txtemail.Value;

            leica_geosystemsVoteProjectUser model = new leica_geosystemsVoteProjectUser();
            model.Username = username;
            model.Password = password;
            model.Trueusername = Trueusername;
            model.Company = company;
            model.City = city;
            model.Phone = Phone;
            model.Email = email;

            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "注册完成,请登录!", "VoteWorksManager.aspx");

            //Message.ShowMessage("注册完成,请登录!", "VoteWorksManager.aspx");
        }
        else
        {
            Page.RegisterStartupScript("", "<script>alert('姓名已存在,请重新填写姓名!');</script>");
        }
    }