private void InitData(int examid) { testingPersonModel = testingPersonBLL.GetModel(examid); ddlguoji.DataSource = bllCategory.GetNextNodeByCode("kjgj"); ddlguoji.DataBind(); ddlguoji.SelectedValue = testingPersonModel.Country; ddlmingzu.DataSource = bllCategory.GetNextNodeByCode("kjmz"); ddlmingzu.DataBind(); ddlmingzu.SelectedValue = testingPersonModel.Mingzu; ddlSex.SelectedValue = testingPersonModel.Sex; txtUserName.Value = testingPersonModel.UserName; txtUserNamePy.Value = testingPersonModel.UserNamePY; txtPhoneNumber.Value = testingPersonModel.PhoneNumber; txtBirthday.Value = testingPersonModel.Birthday; txtContact.Value = testingPersonModel.Address; txtIDNumber.Value = testingPersonModel.IDNumber; string[] currAreas = testingPersonModel.Address.Split('|'); if (currAreas == null || currAreas.Length != 3) { currAareas = new string[] { "四川省", "成都市", "青羊区" }; } currString = @" var $distpicker = $('#distpicker'); $distpicker.distpicker({province: '" + currAreas[0] + "',city: '" + currAareas[1] + "', district: '" + currAareas[2] + "'}); "; txtjjcontact.Value = testingPersonModel.Contactor; txtjjship.Value = testingPersonModel.ContactorShip; txtjjphone.Value = testingPersonModel.ContactorPhone; txtjjaddress.Value = testingPersonModel.HomeAddress; }
protected void Page_Load(object sender, EventArgs e) { testingPerson = ExamAuthHelper.GetPersonAuthData(this.Context); if (testingPerson == null) { Response.Redirect("login.aspx"); return; } }
protected void btnLogin_ServerClick(object sender, EventArgs e) { TFXK.Model.TestingPerson testingPerson = new TFXK.Model.TestingPerson(); testingPerson.UserName = this.txtName.Value.Trim(); testingPerson.PhoneNumber = this.txtPhone.Value.Trim(); testingPerson.UserPassword = this.txtPass.Value.Trim(); string txtPass2 = this.txtPass2.Value.Trim(); if (string.IsNullOrEmpty(testingPerson.UserName)) { Msg.Show("考生名称不能为空!"); return; } if (string.IsNullOrEmpty(testingPerson.PhoneNumber) || testingPerson.PhoneNumber.Length != 11) { Msg.Show("请输入正确手机号码!"); return; } if (string.IsNullOrEmpty(testingPerson.UserPassword)) { Msg.Show("登录密码不能为空!"); return; } if (!testingPerson.UserPassword.Equals(txtPass2)) { Msg.Show("登录密码不匹配!"); return; } if (testingPersonBLL.Exists(testingPerson.PhoneNumber)) { Msg.Show("手机号已存在!"); return; } testingPerson.Status = 0; int res = testingPersonBLL.Add(testingPerson); if (res > 0) { Response.Cookies.Add(new HttpCookie("PersonID", Security.EncryptDES(res.ToString(), "UEMASTER"))); Session["PersonID"] = res.ToString(); Response.Redirect("Default.aspx"); } else { Msg.Show("注册失败!"); return; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["fromadmin"]) && Request.QueryString["fromadmin"].ToString().Equals("admin")) { } else { personModel = ExamAuthHelper.GetPersonAuthData(this.Context); if (personModel == null) { Response.Redirect("/default.aspx"); return; } } this.Title = "右键进行打印"; InitData(); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(TFXK.Model.TestingPerson model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(TFXK.Model.TestingPerson model) { model.UserPassword = Security.EncryptDES(model.UserPassword, "UEMASTER"); model.CreateTime = DateTime.Now; return(dal.Add(model)); }
private void InitData(int examid, int exInfoID) { //ddlClass.DataSource = bllCategory.GetNextNodeByCode("kjkmpz"); //ddlClass.DataBind(); ddlguoji.DataSource = bllCategory.GetNextNodeByCode("kjgj"); ddlguoji.DataBind(); ddlmingzu.DataSource = bllCategory.GetNextNodeByCode("kjmz"); ddlmingzu.DataBind(); if (exInfoID > 0) { var testingPersonModel = bllTestingPersonExam.GetModel(exInfoID); if (testingPersonModel.Status == 1) {//只允许未支付状态 修改 Response.Redirect("ViewTestingPay.aspx"); Response.End(); } if (testingPersonModel.Status == 2) {//只允许未支付状态 修改 Response.Redirect("ViewTesting.aspx"); Response.End(); } ddlguoji.SelectedValue = testingPersonModel.Country; ddlmingzu.SelectedValue = testingPersonModel.Mingzu; ddlSex.SelectedValue = testingPersonModel.Sex; txtUserName.Value = testingPersonModel.UserName; txtUserNamePy.Value = testingPersonModel.UserNamePY; txtPhoneNumber.Value = testingPersonModel.PhoneNumber; txtBirthday.Value = testingPersonModel.Birthday; txtContact.Value = testingPersonModel.Address.Replace("|", " ");; txtjjcontact.Value = testingPersonModel.Contactor; txtjjship.Value = testingPersonModel.ContactorShip; txtjjphone.Value = testingPersonModel.ContactorPhone; txtjjaddress.Value = testingPersonModel.HomeAddress; txtZhiDao.Value = testingPersonModel.Zhidao; txtPostNo.Value = testingPersonModel.PostNo; ddlLevel.SelectedValue = testingPersonModel.HaveMaxLevel; hdfNumber.Value = testingPersonModel.ExamNumber; txtIDNumber.Value = testingPersonModel.IDNumber; } else { testingPersonModel = bllTestingPerson.GetModel(examid); ddlguoji.SelectedValue = testingPersonModel.Country; ddlmingzu.SelectedValue = testingPersonModel.Mingzu; ddlSex.SelectedValue = testingPersonModel.Sex; txtUserName.Value = testingPersonModel.UserName; txtUserNamePy.Value = testingPersonModel.UserNamePY; txtPhoneNumber.Value = testingPersonModel.PhoneNumber; txtBirthday.Value = testingPersonModel.Birthday; txtContact.Value = testingPersonModel.Address.Replace("|", " ");; txtjjcontact.Value = testingPersonModel.Contactor; txtjjship.Value = testingPersonModel.ContactorShip; txtjjphone.Value = testingPersonModel.ContactorPhone; txtjjaddress.Value = testingPersonModel.HomeAddress; txtIDNumber.Value = testingPersonModel.IDNumber; } int recordcount = 0; rptDownload.DataSource = articlesBLL.GetAllListByCodeNo(10, 1, "bkzlxz", out recordcount); rptDownload.DataBind(); }