deal_list.aspx.cs
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:3k
源码类别:
OA系统
开发平台:
ASP/ASPX
- using System;
- using System.Data;
- using System.Data.SqlClient;
- 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;
- public partial class web_data_repair_deal_list : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- SetTable();
- }
- public void SetTable()
- {
- string str = "";
- SqlConnection conn = dbConnection.getConnection();
- conn.Open();
- string user_id = "0";
- if (Session["user_id"] != null)
- {
- user_id = Session["user_id"].ToString();
- }
- SqlCommand cmd = new SqlCommand("select f.id as id,f.emp_id as f_emp_id,f.apply_time as f_apply_time,f.form_id as f_form_id from OA_REPAIR_FORM as f,OA_REPAIR_FLOW as g where f.form_id=g.form_id and f.step=g.step and g.is_check='N'and f.status=1 and g.operator_id='" + user_id + "' order by f.id desc", conn);
- SqlDataReader dr = cmd.ExecuteReader();
- if (dr.HasRows)
- {
- while (dr.Read())
- {
- TblFlow.Visible = true;
- TableRow tr = new TableRow();
- TableCell td = new TableCell();
- td.BorderWidth = Unit.Pixel(1);
- SqlConnection conn1 = dbConnection.getConnection();
- conn1.Open();
- SqlCommand sqlcom = new SqlCommand("select emp_name from oa_employee where id='" + dr["f_emp_id"].ToString() + "'", conn1);
- td.Text = sqlcom.ExecuteScalar().ToString();
- tr.Cells.Add(td);
- td = new TableCell();
- td.BorderWidth = Unit.Pixel(1);
- SqlCommand sqlcom1 = new SqlCommand("select emp_name from oa_employee where id='" + dr["f_emp_id"].ToString() + "'", conn1);
- try
- {
- td.Text = sqlcom1.ExecuteScalar().ToString() + "的設備報修申請單";
- }
- catch
- {
- }
- tr.Cells.Add(td);
- td = new TableCell();
- td.BorderWidth = Unit.Pixel(1);
- td.Text = dr["f_apply_time"].ToString();
- tr.Cells.Add(td);
- td = new TableCell();
- td.BorderWidth = Unit.Pixel(1);
- HyperLink hl = new HyperLink();
- hl.Text = "查看";
- hl.NavigateUrl = "deal1.aspx?form_id=" + dr["f_form_id"].ToString() + "&emp_id=" + dr["f_emp_id"];
- td.Controls.Add(hl);
- tr.Cells.Add(td);
- TblFlow.Rows.Add(tr);
- conn1.Close();
- }
- }
- dr.Close();
- conn.Close();
- }
- }