WELOA.BLL/Equipment/SB_Testing.cs
(完整代码) 2KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WELOA.Model;
using SBDAL_SQL;
using System.Data;
namespace SBBLL
{
public class SB_Testing
{
private DateSetInformation dsinfo = new DateSetInformation();
private sb_storageDAO storageDAO = new sb_storageDAO();
private sb_testingDAO testingDAO = new sb_testingDAO();
private Polytechnic trinfo = new Polytechnic();
public DateSetInformation select_Testing()
{
this.dsinfo = this.storageDAO.select_Devicenumber_testing();
if ((this.dsinfo.nException <= 0) && (this.dsinfo.ds.Tables[0].Rows.Count > 0))
{
DataSet ds = this.dsinfo.ds;
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
this.dsinfo = this.testingDAO.select_testing_devicenumber(ds.Tables[0].Rows[i]["devicenumber"].ToString());
if (this.dsinfo.nException > 0)
{
return this.dsinfo;
}
if (this.dsinfo.ds.Tables[0].Rows.Count > 0)
{
TimeSpan span = (TimeSpan)(DateTime.Now - Convert.ToDateTime(this.dsinfo.ds.Tables[0].Rows[0]["testingtime"].ToString()));
if (Math.Truncate(span.TotalDays) < Convert.ToInt32(ds.Tables[0].Rows[i]["testingdays"].ToString()))
{
ds.Tables[0].Rows[i].Delete();
ds.Tables[0].Rows[i].AcceptChanges();
i--;
}
}
}
this.dsinfo.ds = ds;
}
return this.dsinfo;
}
public DateSetInformation select_testing_devicenumber(string strDevicenumber)
{
this.dsinfo = this.testingDAO.select_testing_devicenumber(strDevicenumber);
return this.dsinfo;
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
