();
for (int i = 0; i < tb.Rows.Count; i++)
{
listCategories.Add(tb.Rows[i][0].ToString());
listdata.Add(Convert.ToDouble(tb.Rows[i][1].ToString()) * 100);
listdata2.Add(Convert.ToDouble(tb.Rows[i][2].ToString()) * 100);
listdata3.Add(Convert.ToDouble(tb.Rows[i][3].ToString()) * 100);
listdata4.Add(Convert.ToDouble(tb.Rows[i][4].ToString()) * 100);
}
s.data = listdata;
s2.data = listdata2;
s3.data = listdata3;
s4.data = listdata4;
series.Add(s);
series.Add(s2);
series.Add(s3);
series.Add(s4);
businessColumn.categories = listCategories;
businessColumn.series = series;
return JsonConvert.SerializeObject(businessColumn);
}
}
#endregion
///
/// 获取项目照片
///
protected string projectSitePhoto
{
get
{
string photo = "../images/sedinsite.jpg";
var getMap = (from x in Funs.DB.InformationProject_ProjectMap
where x.MapType == "1" && x.ProjectId == this.CurrUser.LoginProjectId
orderby x.UploadDate descending
select x).FirstOrDefault();
if (getMap != null)
{
var geturl = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == getMap.ProjectMapId);
if (geturl != null && !string.IsNullOrEmpty(geturl.AttachUrl))
{
photo = "../" + geturl.AttachUrl;
}
}
return "\"" + photo + "\"";
}
}
protected int TodoNum;
protected string swiper_One
{
get
{
string projectId = string.Empty;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
projectId = this.CurrUser.LoginProjectId;
}
//安全
var getDataList = Funs.DB.Sp_APP_GetToDoItems(this.CurrUser.LoginProjectId, this.CurrUser.UserId).ToList(); ;
string strNoticeHtml = string.Empty;
//质量
SqlParameter[] val = new SqlParameter[]
{
new SqlParameter("@UserId", this.CurrUser.UserId),
new SqlParameter("@ProjectId",projectId)
};
var dt = BLL.SQLHelper.GetDataTableRunProc("SpAuditingManageByProjectId", val).AsEnumerable().ToArray();
TodoNum = getDataList.Count + dt.Count();
if (TodoNum >= 8)
{
foreach (var item in getDataList)
{
strNoticeHtml += "" + item.Content + "
";
}
foreach (var item in dt)
{
strNoticeHtml += "" + item.ItemArray[1].ToString() + "
";
}
}
else
{
if (TodoNum > 0)
{
foreach (var item in getDataList)
{
strNoticeHtml += "" + item.Content + "
";
}
foreach (var item in dt)
{
strNoticeHtml += "" + item.ItemArray[1].ToString() + "
";
}
int addRowNum = 8 - TodoNum;
for (int i = 0; i < addRowNum; i++)
{
strNoticeHtml += "";
}
}
}
return "";
}
}
protected int WarnNum;
protected string swiper_Two
{
get
{
var getperson0 = APIPersonService.getPersonQualityByProjectIdUnitId(this.CurrUser.LoginProjectId ?? "", this.CurrUser.UnitId ?? "", "0");
var getperson1 = APIPersonService.getPersonQualityByProjectIdUnitId(this.CurrUser.LoginProjectId ?? "", this.CurrUser.UnitId ?? "", "1");
SqlParameter[] val = new SqlParameter[]
{
new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId ?? "")
};
var dt = BLL.SQLHelper.GetDataTableRunProc("SpEnableCueQualityByPrject", val).AsEnumerable().ToArray();
WarnNum = getperson0.Count + getperson1.Count + dt.Count();
string strNoticeHtml = string.Empty;
string url = "../HSSE/QualityAudit/PersonQualityEdit.aspx?PersonId=";
string cqmsUrl = "../CQMS/Check/EditCheckEquipment.aspx?see=see&CheckEquipmentId=";
if (WarnNum >= 8)
{
foreach (var item in getperson0)
{
string pur = url + item.PersonId;
string strT = item.UnitName + "[" + item.PersonName + "]:" + item.CertificateName + "。证书已过期";
strNoticeHtml += "" + item.PersonName + ":" + item.CertificateName + "。证书已过期" + "
";
}
foreach (var item in getperson1)
{
string pur = url + item.PersonId;
string strT = item.UnitName + "[" + item.PersonName + "]:" + item.CertificateName + "。证书待过期";
strNoticeHtml += "" + item.PersonName + ":" + item.CertificateName + "。证书待过期" + "
";
}
foreach (var item in dt)
{
string pur = cqmsUrl + item.ItemArray[0].ToString();
strNoticeHtml += "" + item.ItemArray[1].ToString() + "
";
}
}
else
{
if (WarnNum > 0)
{
foreach (var item in getperson0)
{
string pur = url + item.PersonId;
string strT = item.UnitName + "[" + item.PersonName + "]:" + item.CertificateName + "。证书已过期";
strNoticeHtml += "" + item.PersonName + ":" + item.CertificateName + "。证书已过期" + "
";
}
foreach (var item in getperson1)
{
string pur = url + item.PersonId;
string strT = item.UnitName + "[" + item.PersonName + "]:" + item.CertificateName + "。证书待过期";
strNoticeHtml += "" + item.PersonName + ":" + item.CertificateName + "。证书待过期" + "
";
}
foreach (var item in dt)
{
string pur = cqmsUrl + item.ItemArray[0].ToString();
strNoticeHtml += "" + item.ItemArray[1].ToString() + "
";
}
int addRowNum = 8 - WarnNum;
for (int i = 0; i < addRowNum; i++)
{
strNoticeHtml += "";
}
}
}
return "";
}
}
protected string swiper_Three
{
get
{
try
{
string projectId = "";
if (this.CurrUser != null)
{
projectId = this.CurrUser.LoginProjectId;
}
var getNotice = (from x in Funs.DB.InformationProject_Notice
where x.IsRelease == true && x.AccessProjectId.Contains(projectId)
orderby x.ReleaseDate
select x).Distinct().Take(20);
var readIds = from x in Funs.DB.Sys_UserRead where x.UserId == this.CurrUser.UserId select x.DataId;
string strNoticeHtml = string.Empty;
foreach (var item in getNotice)
{
string url = "../Notice/NoticeView2.aspx?NoticeId=" + item.NoticeId;
var attachFile = BLL.AttachFileService.GetAttachFile(item.NoticeId, BLL.Const.ServerNoticeMenuId);
if (attachFile != null && !string.IsNullOrEmpty(attachFile.AttachUrl))
{
url = "../" + attachFile.AttachUrl.Split(',')[0];
}
if (!readIds.Contains(item.NoticeId))
{
strNoticeHtml += "" + item.NoticeTitle + "
" + string.Format("{0:yyyy-MM-dd}", item.CompileDate) + "
";
}
else
{
strNoticeHtml += "" + item.NoticeTitle + "
" + string.Format("{0:yyyy-MM-dd}", item.CompileDate) + "
";
}
}
return "";
}
catch
{
return null;
}
}
}
protected void imgBtn_Click(object sender, ImageClickEventArgs e)
{
Model.InformationProject_Notice notice = BLL.NoticeService.GetNoticeById(this.hdNoticeId.Value);
if (notice != null)
{
BLL.APIUserService.getSaveUserRead(BLL.Const.ServerNoticeMenuId, notice.ProjectId, this.CurrUser.UserId, notice.NoticeId);
}
}
}
}