补充公司级树
This commit is contained in:
@@ -65,9 +65,13 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
//FilterDataRowItem = FilterDataRowItemImplement;
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
this.InitDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
@@ -77,27 +81,15 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
//{
|
||||
// this.ProjectId = Request.Params["projectId"];
|
||||
//}
|
||||
//权限按钮方法
|
||||
|
||||
btnNew.OnClientClick = Window1.GetShowReference("ChecklistEdit.aspx") + "return false;";
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
GetList();
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private void GetList()
|
||||
private void InitDownList()
|
||||
{
|
||||
if (!string .IsNullOrEmpty(this.ProjectId))
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
code = ProjectService.GetProjectByProjectId(this.ProjectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
}
|
||||
@@ -107,6 +99,24 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
QualityQuestionTypeService.InitQualityQuestionTypeDownList(drpQuestionType, true);
|
||||
Funs.FineUIPleaseSelect(this.dpHandelStatus);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.InitDownList();
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
#endregion
|
||||
//public System.Web.UI.WebControls.ListItem[] GetHandelStatus()
|
||||
//{
|
||||
@@ -145,7 +155,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
protected DataTable ChecklistData()
|
||||
{
|
||||
DataTable tb=new DataTable();
|
||||
DataTable tb = new DataTable();
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
string strSql = @"SELECT chec.CheckControlCode,chec.CheckSite,chec.ProjectId,chec.unitId,cNProfessional.ProfessionalName,"
|
||||
@@ -205,8 +215,8 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
}
|
||||
return tb;
|
||||
}
|
||||
@@ -222,7 +232,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
@@ -306,12 +316,13 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
IList<Model.AttachFile> sourlist = AttachFileService.GetBeforeFileList(registrationId.ToString(), BLL.Const.CheckListMenuId);
|
||||
|
||||
if (sourlist != null&& sourlist.Count>0)
|
||||
if (sourlist != null && sourlist.Count > 0)
|
||||
{
|
||||
string AttachUrl = "";
|
||||
foreach(var item in sourlist)
|
||||
{ if(!string.IsNullOrEmpty(item.AttachUrl)&& item.AttachUrl.ToLower().EndsWith(".jpg")|| item.AttachUrl.ToLower().EndsWith(".jpeg")|| item.AttachUrl.ToLower().EndsWith(".png"))
|
||||
AttachUrl += item.AttachUrl.TrimEnd(',')+",";
|
||||
foreach (var item in sourlist)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.AttachUrl) && item.AttachUrl.ToLower().EndsWith(".jpg") || item.AttachUrl.ToLower().EndsWith(".jpeg") || item.AttachUrl.ToLower().EndsWith(".png"))
|
||||
AttachUrl += item.AttachUrl.TrimEnd(',') + ",";
|
||||
}
|
||||
url = BLL.UploadAttachmentService.ShowImage(httpUrl, AttachUrl.TrimEnd(','));
|
||||
}
|
||||
@@ -329,7 +340,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
if (registrationId != null)
|
||||
{
|
||||
IList<Model.AttachFile> sourlist = AttachFileService.Getfilelist(registrationId.ToString()+"r", BLL.Const.CheckListMenuId);
|
||||
IList<Model.AttachFile> sourlist = AttachFileService.Getfilelist(registrationId.ToString() + "r", BLL.Const.CheckListMenuId);
|
||||
|
||||
if (sourlist != null && sourlist.Count > 0)
|
||||
{
|
||||
@@ -344,7 +355,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
public string Convertstatus(Object code)
|
||||
{
|
||||
Model.Check_CheckControl checkControl = BLL.CheckControlService.GetCheckControl(code.ToString());
|
||||
@@ -376,6 +387,10 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
|
||||
public void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
DataTable tb = ChecklistData();
|
||||
|
||||
// 2.获取当前分页数据
|
||||
@@ -414,19 +429,6 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
}
|
||||
}
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
GetList();
|
||||
this.BindGrid();
|
||||
|
||||
this.GetButtonPower();
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region 查询
|
||||
@@ -798,7 +800,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
Bookmark bookmarkCheckCode = doc.Range.Bookmarks["CheckCode"];
|
||||
if (bookmarkCheckCode != null)
|
||||
{
|
||||
bookmarkCheckCode.Text = checks.DocCode;
|
||||
bookmarkCheckCode.Text = checks.DocCode;
|
||||
}
|
||||
|
||||
Bookmark bookmarkSendDate = doc.Range.Bookmarks["SendDate"];
|
||||
@@ -903,7 +905,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
}
|
||||
}
|
||||
IList<Model.AttachFile> sourlist = AttachFileService.GetBeforeFileList(checks.CheckControlCode, BLL.Const.CheckListMenuId);
|
||||
IList<Model.AttachFile> sourlist = AttachFileService.GetBeforeFileList(checks.CheckControlCode, BLL.Const.CheckListMenuId);
|
||||
|
||||
if (sourlist != null && sourlist.Count > 0)
|
||||
{
|
||||
@@ -918,9 +920,10 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
|
||||
}
|
||||
string []pics = AttachUrl.Split(',');
|
||||
foreach(string item in pics)
|
||||
{ switch (indexPic)
|
||||
string[] pics = AttachUrl.Split(',');
|
||||
foreach (string item in pics)
|
||||
{
|
||||
switch (indexPic)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
@@ -1096,7 +1099,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
|
||||
if (bookmarkSendDate != null)
|
||||
{
|
||||
|
||||
|
||||
if (checks.CheckDate.HasValue != null)
|
||||
{
|
||||
bookmarkSendDate.Text = checks.CheckDate.Value.ToString("yyyy年MM月dd日");
|
||||
@@ -1163,7 +1166,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
|
||||
Bookmark bookmarkCheckDate = doc.Range.Bookmarks["CheckDate"];
|
||||
|
||||
|
||||
if (bookmarkCheckDate != null)
|
||||
{
|
||||
|
||||
@@ -1177,7 +1180,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
Bookmark bookmarkNoticeNum2 = doc.Range.Bookmarks["NoticeNum2"];
|
||||
if (bookmarkNoticeNum2 != null)
|
||||
{
|
||||
bookmarkNoticeNum2.Text = checks.DocCode;
|
||||
bookmarkNoticeNum2.Text = checks.DocCode;
|
||||
}
|
||||
|
||||
|
||||
@@ -1197,7 +1200,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
bookmarkCheckMan.Text = sysUser.UserName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Bookmark bookmarkResponseMan = doc.Range.Bookmarks["ResponseMan"];
|
||||
Bookmark bookmarkResponseDate = doc.Range.Bookmarks["ResponseDate"];
|
||||
if (bookmarkResponseMan != null)
|
||||
@@ -1367,7 +1370,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
|
||||
|
||||
IList<Model.AttachFile> reSourlist = AttachFileService.GetBeforeFileList(checks.CheckControlCode+"r", BLL.Const.CheckListMenuId);
|
||||
IList<Model.AttachFile> reSourlist = AttachFileService.GetBeforeFileList(checks.CheckControlCode + "r", BLL.Const.CheckListMenuId);
|
||||
|
||||
if (reSourlist != null && reSourlist.Count > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user