您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->高校教师档案管理系统项目源码>>PersonRecord/Resume_Study.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:高校教师档案管理系统项目源码
当前文件:文件类型 TeacherFileProject/PersonRecord/Resume_Study.aspx.cs打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using System.Data.SqlClient; 12 13public partial class resume_study : System.Web.UI.Page 14{ 15 PersonRecordClass prObj = new PersonRecordClass(); 16 protected void Page_Load(object sender, EventArgs e) 17 { 18 if (!IsPostBack) 19 { 20 if (Session["Username"] == null) 21 { 22 Response.Write("<script>parent.location='../Default.aspx';</script>"); 23 } 24 else 25 { 26 27 tabList.Visible = false; 28 tabAdd.Visible = false; 29 tabUpdate.Visible = false; 30 btnListAdd.Visible = false; 31 if (Convert.ToInt32(Session["isOpen"]) == 1 || Convert.ToInt32(Session["Admin"]) == 1) 32 { 33 34 tabList.Visible = true; 35 btnListAdd.Visible = true; 36 gvListBind(); 37 38 39 } 40 else 41 { 42 tabList.Visible = true; 43 btnListAdd.Visible = false; 44 gvListBind(); 45 gvList.Columns[0].Visible = false; 46 gvList.Columns[1].Visible = false; 47 } 48 } 49 } 50 51 } 52 /// <summary> 53 /// 对GridView进行绑定,显示教师的教育背景资料 54 /// </summary> 55 public void gvListBind() 56 { 57 if (Session["Username"] == null) 58 { 59 Response.Write("<script>parent.location='../Default.aspx';</script>"); 60 } 61 else 62 { 63 if (Convert.ToInt32(Session["Admin"]) == 1) 64 { 65 SqlCommand myCmd = prObj.GetARICmd(1); 66 prObj.GVBind(myCmd, gvList, "AResume"); 67 } 68 else 69 { 70 SqlCommand myCmd = prObj.GetSRICmd(1, Convert.ToInt32(Session["UID"])); 71 prObj.GVBind(myCmd, gvList, "SResume"); 72 } 73 74 } 75 76 } 77 78 //============================================================= 79 // 事 件 名: gvList_RowDeleting() 80 // 功能描述: 对GridView中的某行进行删除 81 // ============================================================== 82 protected void gvList_RowDeleting(object sender, GridViewDeleteEventArgs e) 83 { 84 int P_Int_id = Convert.ToInt32(gvList.DataKeys[e.RowIndex].Value); 85 prObj.DeleteResumeInfo(P_Int_id); 86 gvListBind(); 87 } 88 //============================================================= 89 // 事 件 名: gvList_RowUpdating() 90 // 功能描述: 对GridView中的某行进行修改时,修改表显示其修改内容 91 // ============================================================== 92 protected void gvList_RowUpdating(object sender, GridViewUpdateEventArgs e) 93 { 94 tabUpdate.Visible = true; 95 tabList.Visible = false; 96 tabAdd.Visible = false; 97 prObj.DDLBind(ddlUYearInfo); 98 int P_Int_id = Convert.ToInt32(gvList.DataKeys[e.RowIndex].Value); 99 labValue.Text = P_Int_id.ToString(); 100 DataSet ds = prObj.ReturnRIDs(1, P_Int_id, "ResumeInfo"); 101 txtName.Text= ds.Tables["ResumeInfo"].Rows[0][0].ToString (); 102 txtUStartEndTime.Text = ds.Tables["ResumeInfo"].Rows[0][1].ToString(); 103 txtUWorkPlace.Text = ds.Tables["ResumeInfo"].Rows[0][2].ToString(); 104 txtUWorking.Text = ds.Tables["ResumeInfo"].Rows[0][3].ToString (); 105 txtUDegree.Text = ds.Tables["ResumeInfo"].Rows[0][4].ToString(); 106 ddlUYearInfo.SelectedItem.Text = ds.Tables["ResumeInfo"].Rows[0][5].ToString(); 107 108 109 } 110 //============================================================= 111 // 事 件 名: btnAdd_Click() 112 // 功能描述: 在添加表上,单击添加按钮时,将教师的教育背景和社会实践资料添加到表tb_Resume中 113 // ============================================================== 114 protected void btnAdd_Click(object sender, EventArgs e) 115 { 116 if (Session["Username"] == null) 117 { 118 Response.Write("<script>parent.location='../Default.aspx';</script>"); 119 } 120 else 121 { 122 if (ddlName.SelectedIndex == 0) 123 { 124 Response.Write("<script>alert('请选择需要添加资料的姓名!');</script>"); 125 } 126 else if (txtAStartEndTime.Text.Trim() == "") 127 { 128 Response.Write("<script>alert('请填写起止时间!');</script>"); 129 130 } 131 else if (txtAWorkPlace.Text.Trim() == "") 132 { 133 Response.Write("<script>alert('请填写毕业院校!');</script>"); 134 135 } 136 else if (txtAWorking.Text.Trim() == "") 137 { 138 Response.Write("<script>alert('请填写专业!');</script>"); 139 140 } 141 else if (txtADegree.Text.Trim() == "") 142 { 143 Response.Write("<script>alert('请填写获得学位!');</script>"); 144 } 145 else if (ddlAYearInfo.SelectedIndex == 0) 146 { 147 Response.Write("<script>alert('请选择填写年度!');</script>"); 148 } 149 else 150 { 151 prObj.AddResumeInfo(txtAStartEndTime.Text.Trim(), txtAWorkPlace.Text.Trim(), txtAWorking.Text.Trim(), txtADegree.Text.Trim(), "", 1, Convert.ToInt32(ddlName.SelectedValue.ToString()), Convert.ToString(Session["Username"]), "", Convert.ToInt32(ddlAYearInfo.SelectedItem.ToString()),Convert.ToInt32(Session["UID"])); 152 Response.Redirect("~/PersonRecord/Resume_Study.aspx"); 153 } 154 } 155 } 156 //============================================================= 157 // 事 件 名: btnReset_Click() 158 // 功能描述: 在添加表上,单击重置按钮时,重新填写教师的教育背景和社会实践资料 159 // ============================================================== 160 protected void btnReset_Click(object sender, EventArgs e) 161 { 162 txtAStartEndTime.Text = ""; 163 txtAWorkPlace.Text = ""; 164 txtAWorking.Text = ""; 165 txtADegree.Text = ""; 166 ddlAYearInfo.SelectedIndex = 0; 167 168 } 169 //============================================================= 170 // 事 件 名: btnUpdate_Click() 171 // 功能描述: 在修改表上,单击修改按钮时,修改教师的教育背景和社会实践资料 172 // ============================================================== 173 protected void btnUpdate_Click(object sender, EventArgs e) 174 { 175 if (Session["Username"] == null) 176 { 177 Response.Write("<script>parent.location='../Default.aspx';</script>"); 178 } 179 else 180 { 181 if (txtUStartEndTime.Text.Trim() == "") 182 { 183 Response.Write("<script>alert('请填写起止时间!');</script>"); 184 185 } 186 else if (txtUWorkPlace.Text.Trim() == "") 187 { 188 Response.Write("<script>alert('请填写毕业院校!');</script>"); 189 190 } 191 else if (txtUWorking.Text.Trim() == "") 192 { 193 Response.Write("<script>alert('请填写专业!');</script>"); 194 195 } 196 else if (txtUDegree.Text.Trim() == "") 197 { 198 Response.Write("<script>alert('请填写获得学位!');</script>"); 199 } 200 else 201 { 202 prObj.UpdateResumeInfo(Convert.ToInt32(labValue.Text.Trim()), txtUStartEndTime.Text.Trim(), txtUWorkPlace.Text.Trim(), txtUWorking.Text.Trim(), txtUDegree.Text.Trim(), "", 1, Convert.ToString(Session["Username"]), Convert.ToInt32(ddlUYearInfo.SelectedItem.ToString()),Convert.ToInt32(Session["UID"])); 203 Response.Redirect("~/PersonRecord/Resume_Study.aspx"); 204 } 205 } 206 } 207 //============================================================= 208 // 事 件 名: lnkbtnAdd_Click() 209 // 功能描述: 当用户单击添加按钮,添加表显示 210 // ============================================================== 211 protected void btnListAdd_Click(object sender, EventArgs e) 212 { 213 214 tabAdd.Visible = true; 215 tabList.Visible = false; 216 tabUpdate.Visible = false; 217 prObj.DDLBind(ddlAYearInfo); 218 prObj.DDLNameBind(ddlName, "userInfo"); 219 if (Session["Username"] == null) 220 { 221 Response.Write("<script>parent.location='../Default.aspx';</script>"); 222 } 223 else 224 { 225 if (Convert.ToInt32(Session["Admin"]) == 1) 226 { } 227 else 228 { 229 ddlName.SelectedValue = Convert.ToString(Session["UID"]); 230 ddlName.Enabled = false; 231 232 } 233 } 234 235 } 236 protected void gvList_PageIndexChanging(object sender, GridViewPageEventArgs e) 237 { 238 gvList.PageIndex = e.NewPageIndex; 239 gvListBind(); 240 241 } 242} 243
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:高校教师档案管理系统项目源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号