tjpost.aspx.cs
资源名称:OASystem.rar [点击查看]
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:2k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using System.Data.SqlClient;
- using COM.OA.Entity;
- using System.Collections.Generic;
- using COM.OA.BLL;
- public partial class lb_shenpi_tjpost : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- }
- protected void ddl_bumen_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (this.ddl_bumen.Text != "选择部门")
- {
- int id = Int32.Parse(this.ddl_bumen.Text);
- SqlParameter bumen = new SqlParameter("@dept_id", id);
- IList<lbEmploy> list = BLLGeneric.Select<lbEmploy>(CommandType.StoredProcedure, "lb_liandong", bumen);
- //配置数据源
- this.ddl_em.DataSource = list;
- //绑定字段属性
- this.ddl_em.DataTextField = "Em_name";
- this.ddl_em.DataValueField = "Em_name";
- //绑定控件
- this.ddl_em.DataBind();
- }
- else
- {
- this.Response.Write(string.Format(GetRedirect.WINALERT, "请选择部门"));
- this.ddl_bumen.Focus();
- return;
- }
- }
- protected void btnclean_Click(object sender, EventArgs e)
- {
- this.txbnames.Text = "";
- }
- protected void btnadd_Click(object sender, EventArgs e)
- {
- this.txbnames.Text += this.ddl_em.Text+",";
- }
- protected void btndj_Click(object sender, EventArgs e)
- {
- string str = this.txbnames.Text.Trim();
- string[] snames = str.Split(',');
- foreach (string s in snames)
- {
- if (s == "")
- {
- break;
- }
- else
- {
- SqlParameter parm = new SqlParameter("@name", s);
- IList<users> user = BLLGeneric.Select<users>(CommandType.StoredProcedure, "lb_employ", parm);
- users u = user[0];
- examine ex = (examine)Session["examines"];
- //接收人的ID
- ex.ex_inceptid = u.u_id;
- examineBLL.Insert(ex);
- }
- }
- this.Response.Write(string.Format(GetRedirect.WINALERT,"递交申请成功!"));
- this.Response.Write(string.Format(GetRedirect.REDIRECT,"splist.aspx"));
- }
- }