total/total.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class checks_Manage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindData();
}
}
// 绑定
private void BindData()
{
string where = " where staffFlag=0 ";
if (txt_staffNo.Text != "")
{
where += " and a.staffNo like '%" + txt_staffNo.Text + "%' ";
}
string sql = @"select convert(char(7),getdate(),121) as tt1,a.staffNo,staffName,
isnull(tt2,0) as tt2,isnull(tt3,0) as tt3,isnull(tt4,0) as tt4,
isnull(tt5,0) as tt5,isnull(tt6,0) as tt6
from staff a left join
(select staffNo,count(*) as tt2
from checks
where checkFlag1=1 and convert(char(7),checkTime1,121)=convert(char(7),getdate(),121)
group by staffNo) b on a.staffNo=b.staffNo
left join (select staffNo,count(*) as tt3
from checks
where checkFlag2=1 and convert(char(7),checkTime1,121)=convert(char(7),getdate(),121)
group by staffNo) c on a.staffNo=c.staffNo
left join(
select staffNo,count(*) as tt4 from leave where leaveFlag='审核通过' and convert(char(7),leaveTime3,121)=convert(char(7),getdate(),121)
group by staffNo
) d on a.staffNo=d.staffNo
left join(
select staffNo,count(*) as tt5 from trips where convert(char(7),tripTime3,121)=convert(char(7),getdate(),121)
group by staffNo
) e on a.staffNo=e.staffNo
left join(
select staffNo,count(*) as tt6 from works where convert(char(7),workTime,121)=convert(char(7),getdate(),121)
group by staffNo
) f on a.staffNo=f.staffNo ";
GridView1.DataSource = SqlHelper.ExecuteforDataSet(sql+where);
GridView1.DataBind();
后面还有 22 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
