Default3.aspx.cs
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:4k
源码类别:
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_Default3 : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- string nul = " 256";
- SqlConnection conn1 = dbConnection.getConnection();
- conn1.Open();
- SqlCommand sqlcom5 = new SqlCommand("select banbie from OA_KAOQIN_PBB where data='2009-01-14' and emp_no='08b234'", conn1);
- SqlDataReader comm5 = sqlcom5.ExecuteReader();
- if (comm5 != null)
- {
- while (comm5.Read())
- {
- TableRow tr4 = new TableRow();
- TableCell d3 = new TableCell();
- d3.BorderWidth = Unit.Pixel(1);
- Label label4 = new Label();
- label4.BorderStyle = BorderStyle.None;
- label4.Text = Convert.ToString(comm5["banbie"]);
- d3.Controls.Add(label4);
- tr4.Cells.Add(d3);
- SqlConnection conn2 = dbConnection.getConnection();
- conn2.Open();
- SqlCommand sqlcom6 = new SqlCommand("select bengin_time,end_time from oa_pos_type where department='怡豐店' and type='" + Convert.ToString(comm5["banbie"]) + "'", conn2);
- SqlDataReader comm6 = sqlcom6.ExecuteReader();
- if (comm6.HasRows)
- {
- while (comm6.Read())
- {
- TableCell d4 = new TableCell();
- d4.BorderWidth = Unit.Pixel(2);
- Table table3 = new Table();
- table3.BorderWidth = Unit.Pixel(2);
- TableRow trr1 = new TableRow();
- TableCell tt1 = new TableCell();
- tt1.BorderWidth = Unit.Pixel(1);
- Label label6 = new Label();
- label6.BorderStyle = BorderStyle.None;
- label6.Text = Convert.ToString(comm6["bengin_time"]);
- tt1.Controls.Add(label6);
- trr1.Cells.Add(tt1);
- TableCell tt2 = new TableCell();
- tt2.BorderWidth = Unit.Pixel(1);
- Label label5 = new Label();
- label5.BorderStyle = BorderStyle.None;
- label5.Text = Convert.ToString(comm6["end_time"]);
- tt2.Controls.Add(label5);
- trr1.Cells.Add(tt2);
- table3.Rows.Add(trr1);
- d4.Controls.Add(table3);
- tr4.Cells.Add(d4);
- }
- }
- else
- {
- TableCell d4 = new TableCell();
- d4.BorderWidth = Unit.Pixel(2);
- d4.Visible = true;
- Table table3 = new Table();
- table3.BorderWidth = Unit.Pixel(2);
- TableRow trr1 = new TableRow();
- TableCell tt1 = new TableCell();
- Label label6 = new Label();
- label6.BorderStyle = BorderStyle.None;
- label6.Text = " ";
- tt1.Controls.Add(label6);
- trr1.Cells.Add(tt1);
- TableCell tt2 = new TableCell();
- tt2.BorderWidth = Unit.Pixel(1);
- Label label5 = new Label();
- label5.BorderStyle = BorderStyle.None;
- label5.Text = "";
- tt2.Controls.Add(label5);
- trr1.Cells.Add(tt2);
- table3.Rows.Add(trr1);
- d4.Controls.Add(table3);
- tr4.Cells.Add(d4);
- }
- Table1.Rows.Add(tr4);
- comm6.Close();
- conn2.Close();
- }
- }
- comm5.Close();
- conn1.Close();
- }
- }