protected void btnGoToPay_ServerClick(object sender, EventArgs e) { int id = Int32.Parse(Request.QueryString["id"]); var currentCenterID = ExamAuthHelper.GetAuthCenterID(this.Context); var planModel2 = bllTestingPlan.GetModel(id); int count = bllTestingStudent.GetRecordCount(" planid=" + id); if (count == 0) { InitData(id); InitListData(1, id); Msg.Show("提交失败,尚未录入考生信息"); return; } if (planModel2.Status == 1) { planModel2.Status = 2; bllTestingPlan.Update(planModel2); Msg.ShowAndRedirect("提交成功", "ExamPlan.aspx?id=" + id); } else { InitData(id); InitListData(1, id); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var data = ExamAuthHelper.GetAuthPersonID(this.Context); InitData(data); } }
protected void Page_Load(object sender, EventArgs e) { testingPerson = ExamAuthHelper.GetPersonAuthData(this.Context); if (testingPerson == null) { Response.Redirect("login.aspx"); return; } }
private void InitData(int exid) { var currentCenterID = ExamAuthHelper.GetAuthCenterID(this.Context); var model = bllTestingPlan.GetModel(exid); if (model.CenterID != currentCenterID) { Response.Redirect("ExamPlanList.aspx"); } txtTime.Value = model.TestingTime; txtClass.Value = model.TestingClass; txtAddress.Value = model.Address; txtContact.Value = model.Contactor; txtDes.Value = model.Description; txtRoad.Value = model.AddresDes; auditMsg = bllCategory.GetModel("kjshz").description; if (model.Status >= 1) { noticeMsg = model.AuditDescription; } if (model.Status != 0) { txtTime.Disabled = true; txtClass.Disabled = true; txtAddress.Disabled = true; txtContact.Disabled = true; txtDes.Disabled = true; txtRoad.Disabled = true; btnSave.Visible = false; } if (model.Status == 0) { SetStep(2); } else if (model.Status == 1) { SetStep(3); } else if (model.Status == 2) { SetStep(4); //支付 int count = bllTestingStudent.GetRecordCount("planid=" + model.id); payMsg = string.Format("共<b>{0}</b>位学员参加考试,请联系我们进行考试费用支付。", count); } else if (model.Status == 3) { SetStep(5); } else { SetStep(1); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var testingCenter = ExamAuthHelper.GetAuthData(this.Context); this.txtName.Value = testingCenter.KDName; this.txtAddress.Value = testingCenter.Address; this.txtUserName.Value = testingCenter.UserName; this.txtPhone.Value = testingCenter.UserPhone; this.txtTel.Value = testingCenter.UserTel; this.txtEmail.Value = testingCenter.UserEmail; this.txtDes.Value = testingCenter.KDDescription; } }
private void InitData(int PageIndex) { DataSet ds = new DataSet(); int recordcount = 0; //获取总条数 string wherestr = "personid=" + ExamAuthHelper.GetAuthPersonID(this.Context); ds = bll.GetList(AspNetPager1.PageSize, PageIndex, wherestr, out recordcount); AspNetPager1.RecordCount = recordcount; this.rptBind.DataSource = ds.Tables[0].DefaultView; this.rptBind.DataBind(); rptDownload.DataSource = articlesBLL.GetAllListByCodeNo(10, 1, "bkzlxz", out recordcount); rptDownload.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { var auth = ExamAuthHelper.GetAuthData(this.Context); testCenterName = auth.KDName; if (!IsPostBack) { int exid = 0; if (int.TryParse(Request.QueryString["id"] + "", out exid) && exid > 0) { InitData(exid); } else { SetStep(1); } } }
protected void Page_Load(object sender, EventArgs e) { var auth = ExamAuthHelper.GetAuthData(this.Context); testCenterName = auth.KDName; if (!IsPostBack) { } int exid = 0; if (int.TryParse(Request.QueryString["id"] + "", out exid) && exid > 0) { InitData(exid); } else { Response.Redirect("ExamPlanList.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { testingCenter = ExamAuthHelper.GetAuthData(this.Context); if (testingCenter == null) { Response.Redirect("login.aspx"); return; } if (testingCenter.Status == 0) { Response.Redirect("uploadinfo.aspx"); return; } if (testingCenter.Status == 1) { Response.Redirect("WaitForAudit.aspx"); return; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int exid = 0; int exInfoID = 0; if (int.TryParse(Request.QueryString["id"] + "", out exid) && exid > 0) { int.TryParse(Request.QueryString["tid"] + "", out exInfoID); InitExamData(exid); var data = ExamAuthHelper.GetAuthPersonID(this.Context); InitData(data, exInfoID); } else { Response.Redirect("Default.aspx"); Response.End(); } } }
protected void btnSave_ServerClick(object sender, EventArgs e) { var testingPersonModel = testingPersonBLL.GetModel(ExamAuthHelper.GetAuthPersonID(this.Context)); testingPersonModel.UserNamePY = txtUserNamePy.Value.Trim(); testingPersonModel.PhoneNumber = txtPhoneNumber.Value; testingPersonModel.Birthday = txtBirthday.Value; testingPersonModel.Address = txtContact.Value; testingPersonModel.Contactor = txtjjcontact.Value; testingPersonModel.ContactorShip = txtjjship.Value; testingPersonModel.ContactorPhone = txtjjphone.Value; testingPersonModel.HomeAddress = txtjjaddress.Value; testingPersonModel.Sex = ddlSex.SelectedValue; testingPersonModel.Country = ddlguoji.SelectedValue; testingPersonModel.Mingzu = ddlmingzu.SelectedValue; testingPersonModel.UserName = txtUserName.Value; testingPersonModel.IDNumber = txtIDNumber.Value; testingPersonBLL.Update(testingPersonModel); TFXK.Common.Jscript.AlertAndRedirect("修改成功", "updateinfo.aspx"); }
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(); } }
private void InitData(int PageIndex, string name, int status, int nstatus) { DataSet ds = new DataSet(); int recordcount = 0; //获取总条数 string wherestr = "centerid=" + ExamAuthHelper.GetAuthCenterID(this.Context); if (status >= 0) { wherestr += " and Status=" + status; } if (nstatus >= 0) { wherestr += " and NoticeConfirm=" + nstatus; } ds = bll.GetList(AspNetPager1.PageSize, PageIndex, wherestr, out recordcount); AspNetPager1.RecordCount = recordcount; this.rptBind.DataSource = ds.Tables[0].DefaultView; this.rptBind.DataBind(); }
protected void btnSave_ServerClick(object sender, EventArgs e) { TFXK.Model.TestingPlan model = new TFXK.Model.TestingPlan(); model.TestingTime = txtTime.Value.Trim(); model.TestingClass = txtClass.Value.Trim(); model.Address = txtAddress.Value.Trim(); model.Contactor = txtContact.Value.Trim(); model.Description = txtDes.Value.Trim(); model.AddresDes = txtRoad.Value.Trim(); model.Status = 0; model.NoticeConfirm = 0; if (string.IsNullOrEmpty(model.TestingTime)) { Msg.Show("考试时间不能为空!"); return; } if (string.IsNullOrEmpty(model.TestingClass)) { Msg.Show("考试科目不能为空!"); return; } if (string.IsNullOrEmpty(model.Address)) { Msg.Show("考试地点不能为空!"); return; } if (string.IsNullOrEmpty(model.Contactor)) { Msg.Show("联系人不能为空!"); return; } model.CenterID = ExamAuthHelper.GetAuthCenterID(this.Context); if (bllTestingPlan.Add(model)) { Msg.ShowAndRedirect("添加成功!", "ExamPlanList.aspx"); } }
private void InitData(int exid) { var currentCenterID = ExamAuthHelper.GetAuthCenterID(this.Context); planModel = bllTestingPlan.GetModel(exid); if (planModel.CenterID != currentCenterID) { Response.Redirect("ExamPlanList.aspx"); } if (planModel.Status == 1) { panelAdd.Visible = true; ddlClass.DataSource = bllCategory.GetNextNodeByCode("kjkmpz"); ddlClass.DataBind(); ddlCountry.DataSource = bllCategory.GetNextNodeByCode("kjgj"); ddlCountry.DataBind(); ddlMingzu.DataSource = bllCategory.GetNextNodeByCode("kjmz"); ddlMingzu.DataBind(); } else { panelAdd.Visible = false; } }
protected void btnSave_ServerClick(object sender, EventArgs e) { TestingPersonExam examModel = new TestingPersonExam(); examModel.UserName = txtUserName.Value.Trim(); examModel.UserNamePY = txtUserNamePy.Value.Trim(); examModel.PhoneNumber = txtPhoneNumber.Value; examModel.Birthday = txtBirthday.Value; examModel.Address = txtContact.Value; examModel.Contactor = txtjjcontact.Value; examModel.ContactorShip = txtjjship.Value; examModel.ContactorPhone = txtjjphone.Value; examModel.HomeAddress = txtjjaddress.Value; examModel.Sex = ddlSex.SelectedValue; examModel.Country = ddlguoji.SelectedValue; examModel.Mingzu = ddlmingzu.SelectedValue; examModel.ClassID = ddlClass.SelectedValue; examModel.ClassLevel = ddlLevel.SelectedValue; examModel.HaveMaxLevel = ddlHaveLevel.SelectedValue; examModel.MaxLevelNo = txtLevelNo.Value; examModel.Contactor = txtjjcontact.Value; examModel.ContactorShip = txtjjship.Value; examModel.HomeAddress = txtjjaddress.Value; examModel.IDNumber = txtIDNumber.Value; examModel.Zhidao = txtZhiDao.Value; examModel.Status = 0; examModel.PostNo = txtPostNo.Value; examModel.PersonID = ExamAuthHelper.GetAuthPersonID(this.Context); examModel.CreateTime = DateTime.Now; examModel.ExamNumber = hdfNumber.Value; examModel.TypeID = int.Parse(Request.QueryString["id"]); if (string.IsNullOrEmpty(examModel.UserName)) { TFXK.Common.Jscript.Alert("用户名不能为空"); return; } if (string.IsNullOrEmpty(examModel.UserNamePY)) { TFXK.Common.Jscript.Alert("用户名拼音不能为空"); return; } if ( string.IsNullOrEmpty(examModel.Contactor)) { TFXK.Common.Jscript.Alert("联系人不能为空"); return; } if (string.IsNullOrEmpty(examModel.ContactorPhone)) { TFXK.Common.Jscript.Alert("联系人电话不能为空"); return; } int resId = 0; int exid = 0; if (int.TryParse(Request.QueryString["tid"] + "", out exid)) { examModel.id = exid; bllTestingPersonExam.Update(examModel); resId = exid; } else { var planModel = bllPlan.GetModel(int.Parse(Request.QueryString["id"] + "")); if (bllTestingPersonExam.Exists(planModel.id, examModel.IDNumber)) { TFXK.Common.Jscript.AlertAndRedirect("已存在报考记录,请确认", "ViewTestingPay.aspx?id=" + resId); return; } else { planModel.NumberIndex += 1; bllPlan.Update(planModel); examModel.ExamNumber = planModel.NumberPrefx + buildNumber(planModel.NumberStart, (planModel.NumberIndex) + ""); resId = bllTestingPersonExam.Add(examModel); } } TFXK.Common.Jscript.AlertAndRedirect("报考成功", "ViewTestingPay.aspx?id=" + resId); }
protected void btnReg_ServerClick(object sender, EventArgs e) { try { TFXK.Model.TestingCenter testingCenter = ExamAuthHelper.GetAuthData(this.Context);; testingCenter.Address = this.txtAddress.Value.Trim(); testingCenter.UserName = this.txtUserName.Value.Trim(); testingCenter.UserPhone = this.txtPhone.Value.Trim(); testingCenter.UserTel = this.txtTel.Value.Trim(); testingCenter.UserEmail = this.txtEmail.Value.Trim(); testingCenter.KDDescription = this.txtDes.Value.Trim(); string password2 = this.txtPass2.Value.Trim(); if (string.IsNullOrEmpty(testingCenter.KDName)) { Msg.Show("考点名称不能为空!"); return; } if (string.IsNullOrEmpty(testingCenter.Address)) { Msg.Show("考点地址不能为空!"); return; } if (string.IsNullOrEmpty(testingCenter.UserName)) { Msg.Show("负责人名称不能为空!"); return; } if (string.IsNullOrEmpty(testingCenter.UserPhone)) { Msg.Show("负责人电话不能为空!"); return; } if (chkChangePass.Checked) { if (string.IsNullOrEmpty(testingCenter.UserPass)) { Msg.Show("密码不能为空!"); return; } if (!testingCenter.UserPass.Equals(password2)) { Msg.Show("密码输入不一致!"); return; } testingCenter.UserPass = Security.EncryptDES(testingCenter.UserPass, "UEMASTER"); } if (testingCenterBLL.Update(testingCenter)) { Msg.ShowAndRedirect("更新成功", "default.aspx"); } else { Msg.Show("更新失败!"); return; } } catch (Exception ex) { Msg.Show("更新失败!" + ex.Message); return; } }
protected void btnReg_ServerClick(object sender, EventArgs e) { try { TFXK.Model.TestingCenter testingCenter = new TFXK.Model.TestingCenter(); testingCenter = testingCenterBLL.GetModel(ExamAuthHelper.GetAuthCenterID(this.Context)); testingCenter.IDNo = txtID.Value.Trim(); testingCenter.IDImage = this.txtIDImg1.Value.Trim(); testingCenter.IDImage2 = this.txtIDImg2.Value.Trim(); testingCenter.WorkImage = this.txtYYZZ.Value.Trim(); if (string.IsNullOrEmpty(testingCenter.IDNo)) { Msg.Show("请填写身份证号码!"); return; } if (string.IsNullOrEmpty(testingCenter.IDImage)) { Msg.Show("请上传身份证正面照!"); return; } else { imgID1.Src = testingCenter.IDImage; } if (string.IsNullOrEmpty(testingCenter.IDImage2)) { Msg.Show("请上传身份证背面照!"); return; } else { imgID2.Src = testingCenter.IDImage2; } if (string.IsNullOrEmpty(testingCenter.WorkImage)) { Msg.Show("请上传营业执照照片!"); return; } else { imgID3.Src = testingCenter.WorkImage; } testingCenter.Status = 1; bool res = testingCenterBLL.Update(testingCenter); if (res) { Response.Redirect("Default.aspx"); } else { Msg.Show("保存失败!"); return; } } catch (Exception ex) { Msg.Show("保存失败!" + ex.Message); return; } }