protected void Button1_Click(object sender, EventArgs e) { leica_geosystemsVoteProjectUser cy = new leica_geosystemsVoteProjectUser(); leica_geosystemsVoteProjectUser h = new leica_geosystemsVoteProjectUser(); cy.Username = txtusername.Text; cy.Password = txtpassword.Text; string strErr = ""; bool b = cm.login(cy, ref h, ref strErr); if (b == true) { Session["VPId"] = h.Id; //Session["Pqzone"] = null; Session["VotePId"] = null; Session["VotePName"] = null; Session["qzone"] = null; //Session["username"] = h.Username; //Session["trueusername"] = h.Trueusername; Response.Redirect(getLinkPage()); } else { MessageBox.Show(this, strErr); return; } }
protected void Button1_Click(object sender, EventArgs e) { int id = int.Parse(Session["VPId"].ToString()); leica_geosystemsVoteProjectUser modelpass = bllusername.GetModel(id); //int id = getid(); string username = this.txtusername.Value; string passwore = modelpass.Password; 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.Id = id; model.Username = username; model.Password = passwore; model.Trueusername = Trueusername; model.Company = company; model.City = city; model.Phone = Phone; model.Email = email; leica_geosystemsVoteProjectUserManager bll = new leica_geosystemsVoteProjectUserManager(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "RegistrationUpdate.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { if (Session["VPId"] == null || Session["VPId"].ToString() == "") { Response.Write("<script type=\"text/javascript\" language=\"javascript\">window.parent.location.href='" + component.ServerInfo.GetRootURI() + "/VoteProject/Login.aspx?LinkPage=" + Request.Url.ToString() + "';</script>"); return; } else { int id = int.Parse(Session["VPId"].ToString()); leica_geosystemsVoteProjectUser modelpass = bllusername.GetModel(id); string username = modelpass.Username; string passwore = discom.EncryptMD5(txtpassword.Value); string Trueusername = modelpass.Trueusername; string company = modelpass.Company; string city = modelpass.City; string Phone = modelpass.Phone; string email = modelpass.Email; leica_geosystemsVoteProjectUser model = new leica_geosystemsVoteProjectUser(); model.Id = id; model.Username = username; model.Password = passwore; model.Trueusername = Trueusername; model.Company = company; model.City = city; model.Phone = Phone; model.Email = email; leica_geosystemsVoteProjectUserManager bll = new leica_geosystemsVoteProjectUserManager(); bll.Update(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "提交成功!", "Login.aspx?LinkPage=" + Request.Url.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["VPId"] != null && Session["VPId"].ToString().Length != 0) { leica_geosystemsVoteProjectUser voteuser = new leica_geosystemsVoteProjectUser(); leica_geosystemsVoteProjectUserManager blluser = new leica_geosystemsVoteProjectUserManager(); voteuser = blluser.GetModel(int.Parse(Session["VPId"].ToString())); Label1.Visible = true; LinkButton1.Visible = true; Label1.Text = "欢迎参赛作者 " + voteuser.Trueusername + " 登陆徕卡项目投票系统 "; LinkButton1.Text = "退出 "; } if (Session["VotePId"] != null && Session["VotePId"].ToString().Length != 0) { //qzone.GetCurrentUser().Nickname昵称 //QOpenClient qzone = (QOpenClient)Session["qzone"]; Label2.Visible = true; LinkButton2.Visible = true; //QQlogin.Visible = false; Label2.Text = "欢迎会员 " + Session["VotePName"].ToString() + " 登陆徕卡投票系统 "; LinkButton2.Text = "退出 "; } SettingFile(); #region QQ登陆的 //if (Session["qzone"] != null && Session["qzone"].ToString().Length != 0) //{ // //qzone.GetCurrentUser().Nickname昵称 // QOpenClient qzone = (QOpenClient)Session["qzone"]; // Label2.Visible = true; // LinkButton2.Visible = true; // //QQlogin.Visible = false; // Label2.Text = "欢迎会员 " + qzone.GetCurrentUser().Nickname + " 登陆徕卡投票系统 "; // LinkButton2.Text = "退出 "; //} #endregion }
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>"); } }