OA办公系统.doc_第1页
OA办公系统.doc_第2页
OA办公系统.doc_第3页
OA办公系统.doc_第4页
OA办公系统.doc_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

using System;using System.Data;using System.Web.UI.WebControls;using Webknife.Database;using Webknife.Busi.StudentManage;using Webknife.Entity.StudentManage;public partial class stu_newstuadd : System.Web.UI.Page newstudentService studentser = new newstudentService(); newStudent student = null; MyClass myclass = new MyClass(); / / 加载事件 / / / protected void Page_Load(object sender, EventArgs e) try loginValidate.GetContextStudentManageUser(this.Context); if (Sessionperstr.ToString().IndexOf(kkkk2b) = -1) btnSubmit.Visible = false; if (!IsPostBack) morong(); gradelist(); if (Sessionperstr.ToString().IndexOf(kkkk2b) != -1) showDetail(); catch (Exception ex) Response.Write(alert( + ex.Message.ToString() + );history.go(-1);); private void morong() DataTable dt_morong = new DataTable(); dt_morong = morongService.GetAllMogrong(); if (dt_morong.Rows.Count != 0) this.ddlmorong.DataSource = dt_morong; this.ddlmorong.DataTextField = morongname; this.ddlmorong.DataValueField = id; this.ddlmorong.DataBind(); this.ddlmorong.Items0.Selected = true; this.ddlmorong.Items.Insert(0, new ListItem(校区, 0); else this.ddlmorong.Visible = false; lbl_xiaoqu.Visible = false; bi.Style.Add(display, none); private void gradelist() try this.editGrade.DataSource = gradeService.Get_Use_Grade(); this.editGrade.DataTextField = gradename; this.editGrade.DataValueField = gradeid; this.editGrade.DataBind(); /this.editGrade.Items.Insert(0, new ListItem(年级, 0); catch (Exception ex) myclass.WebMessageBox(this.Page, ex.Message.ToString(); / / 根据学员ID 显示学员详细信息 / / private void showDetail() try /ddlmorong.DataSource = morongService.GetAllMogrong(); editBloodType.DataSource = bloodtypeService.GetAllBloodType(); editenrolltype.DataSource = enrolltypeService.GetAllEnrolltype(); editPoliticalstatus.DataSource = politicalstatuService.GetAllPoliticalStatus(); editCityzen.DataSource = cityzenService.GetAllCityzen(); editHealth.DataSource = healthService.GetAllHealth(); editFirstkeeppoliticalstatus.DataSource = editPoliticalstatus.DataSource; editSecondkeeppoliticalstatus.DataSource = editPoliticalstatus.DataSource; editBloodType.DataBind(); editenrolltype.DataBind(); editPoliticalstatus.DataBind(); editCityzen.DataBind(); editHealth.DataBind(); editFirstkeeppoliticalstatus.DataBind(); editSecondkeeppoliticalstatus.DataBind(); ddlmorong.DataBind(); ListItem ite = new ListItem(); ite.Text = -请选择-; ite.Value = ; editBloodType.Items.Insert(0, ite); editPoliticalstatus.Items.Insert(0, ite); editCityzen.Items.Insert(0, ite); editHealth.Items.Insert(0, ite); editFirstkeeppoliticalstatus.Items.Insert(0, ite); editSecondkeeppoliticalstatus.Items.Insert(0, ite); editenrolltype.Items.Insert(0, new ListItem(-请选择-, 0); /ddlmorong.Items.Insert(0, new ListItem(-请选择-, 0); editGrade.Items.Insert(0, new ListItem(-请选择-, 0); catch (Exception ex) Response.Write(alert( + ex.Message.ToString() + );history.go(-1);); / / 确定 / / / protected void btnSubmit_Click(object sender, EventArgs e) try GetInsertStudents(); catch (Exception ex) Response.Write(alert( + ex.Message.ToString() + );history.go(-1);); / / 注册新生详细信息 / private void GetInsertStudents() try if (ddlmorong.Visible = true) if (string.IsNullOrEmpty(editname.Text.Trim() | editGrade.SelectedItem.Value = 0 | ddlmorong.SelectedItem.Value = 0) Response.Write(alert(必填项不能为空!);history.go(-1);); return; else if (string.IsNullOrEmpty(editname.Text.Trim() | editGrade.SelectedItem.Value = 0) Response.Write(alert(必填项不能为空!);history.go(-1);); return; int newstuid = studentser.GetMaxId(); student = new newStudent(); /性别 if (editSexBoy.Checked) student.Newsex = editSexBoy.Text; else if (editSexGirl.Checked) student.Newsex = editSexGirl.Text; /民族 if (editNationHan.Checked) student.Nation = editNationHan.Text; else if (editNationShao.Checked) student.Nation = editNationShao.Text; /户口性质 if (editCategoryCity.Checked) student.Category = editCategoryCity.Text; else if (editCategoryNoCity.Checked) student.Category = editCategoryNoCity.Text; /流动人口状态 if (edittransientStatesYes.Checked) student.TransientStates = edittransientStatesYes.Text; else if (edittransientStatesNo.Checked) student.TransientStates = edittransientStatesNo.Text; student.Id = newstuid;/新生ID student.Newname = this.editname.Text;/姓名 student.Newgrade = this.editGrade.SelectedItem.Text;/年级 student.Newbirthday = this.editbirthday.Text;/生日 student.BloodType = editBloodType.SelectedValue.ToString();/血型 student.Politicalstatus = editPoliticalstatus.SelectedValue;/政治面貌 student.Cityzen = editCityzen.SelectedValue;/国籍 student.Health = editHealth.SelectedValue;/健康状态 student.Nameallspell = editnameallspell.Text;/姓名全拼 student.EverName = editevername.Text;/曾用名 student.NativePlace = editNativePlace.Text;/籍贯 student.BirthPlace = editBirthPlace.Text;/出生地 student.Pageperso = editPageperso.Text;/个人主页 student.Censuslocality = editCensuslocality.Text;/户籍地 student.IdCard = editidCard.Text;/身份证号码 student.Specialty = editSpecialty.Text;/特长 student.Email = editEmail.Text;/电子邮件 student.Phone = editPhone.Text;/电话 student.Address = editAddress.Text;/地址 student.PostCode = editPostCode.Text;/邮政编码 student.BeforeCollege = editBeforeCollege.Text;/原毕业学校 student.Joinpartytime = this.joinpartytime.Text;/入党时间 student.Xiiino = editXiiino.Text;/中考报名序号 student.Politics = editpolitics.Text;/政治 student.Lengua = editlengua.Text;/语文 student.Math = editmath.Text;/数学 student.English = editenglish.Text;/英语 student.Physics = editphysics.Text;/物理 student.Chemistry = editchemistry.Text;/化学 student.Sport = editsport.Text;/体育 student.Testhandle = edittesthandle.Text;/实验操作 student.Biology = editbiology.Text;/生物 student.Plusminus = editplusminus.Text;/加减分 student.Totalpoint = edittotalpoint.Text;/总分 student.Enrolltypeid = Convert.ToInt32(editenrolltype.SelectedItem.Value);/录取类别 student.Choosingschoolfee = editchoosingschoolfee.Text;/择校费 student.Homephone = edithomephone.Text;/住宅电话 student.Diploma = editdiploma.Text;/毕业证号 student.Firstkeepfoot = editFirstkeepfoot.SelectedValue;/第一监护人关系 student.Firstkeepname = editFirstkeepname.Text;/第一监护人姓名 student.Firstkeepculture = editFirstkeepculture.Text;/第一监护人文化程度 student.Firstkeepunit = editFirstkeepunit.Text;/第一监护人单位 student.Firstkeepphone = editFirstkeepphone.Text;/第一监护人电话 student.Firstkeeppoliticalstatus = editFirstkeeppoliticalstatus.SelectedValue;/第一监护人政治面貌 student.Secondkeepfoot = editSecondkeepfoot.SelectedValue;/第二监护人关系 student.Secondkeepname = editSecondkeepname.Text;/第二监护人姓名 student.Secondkeepculture = editSecondkeepculture.Text;/第二监护人文化程度 student.Secondkeepunit = editSecondkeepunit.Text;/第二监护人单位 student.Secondkeepphone = editSecondkeepphone.Text;/第二监护人电话 student.Secondkeeppoliticalstatus = editSecondkeeppoliti

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论