补充公司级树
This commit is contained in:
@@ -51,31 +51,55 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
//FilterDataRowItem = FilterDataRowItemImplement;
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
GetButtonPower();
|
||||
//if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
//{
|
||||
// this.ProjectId = Request.Params["projectId"];
|
||||
//}
|
||||
//权限按钮方法
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
|
||||
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
|
||||
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
this.InitDropDownList();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
this.panelLeftRegion.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
|
||||
btnNew.OnClientClick = Window1.GetShowReference("CheckFineListEdit.aspx") + "return false;";
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
private void InitDropDownList()
|
||||
{
|
||||
//权限按钮方法
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.ProjectId, BLL.Const.ProjectUnitType_2, true);
|
||||
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.InitDropDownList();
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
this.GetButtonPower();
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
public Task<DataTable> data()
|
||||
{
|
||||
Task<DataTable> task = new Task<DataTable>(() =>
|
||||
@@ -96,23 +120,21 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
left join sys_User u on u.userId = chec.CheckMan where chec.ProjectId=@ProjectId";
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
strSql += " AND (chec.CheckDate>=@startTime or @startTime='') and (chec.CheckDate<=@endTime or @endTime='') ";
|
||||
listStr.Add(new SqlParameter("@startTime", !string.IsNullOrEmpty(txtStartTime.Text.Trim()) ? txtStartTime.Text.Trim() + " 00:00:00" : ""));
|
||||
listStr.Add(new SqlParameter("@endTime", !string.IsNullOrEmpty(txtEndTime.Text.Trim()) ? txtEndTime.Text.Trim() + " 23:59:59" : ""));
|
||||
if (drpSponsorUnit.SelectedValue != BLL.Const._Null)
|
||||
if (this.drpSponsorUnit.SelectedValue != null && this.drpSponsorUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND chec.unitId=@unitId";
|
||||
listStr.Add(new SqlParameter("@unitId", drpSponsorUnit.SelectedValue));
|
||||
}
|
||||
if (drpUnitWork.SelectedValue != Const._Null)
|
||||
if (this.drpUnitWork.SelectedValue != null && this.drpUnitWork.SelectedValue != Const._Null)
|
||||
{
|
||||
strSql += " AND chec.unitworkId=@unitworkId";
|
||||
listStr.Add(new SqlParameter("@unitworkId", drpUnitWork.SelectedValue));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
return tb;
|
||||
@@ -136,12 +158,13 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
IList<Model.AttachFile> sourlist = AttachFileService.GetBeforeFileList(registrationId.ToString(), BLL.Const.CheckFineListMenuId);
|
||||
|
||||
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("../../", AttachUrl.TrimEnd(','));
|
||||
}
|
||||
@@ -153,7 +176,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
string url = string.Empty;
|
||||
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)
|
||||
{
|
||||
@@ -168,8 +191,8 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -178,6 +201,10 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
|
||||
public void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
DataTable tb = ChecklistData();
|
||||
|
||||
// 2.获取当前分页数据
|
||||
@@ -190,7 +217,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -359,7 +386,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
//if (checkControl.State.Equals("5") || checkControl.State.Equals("6"))
|
||||
@@ -723,7 +750,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
|
||||
if (bookmarkSendDate != null)
|
||||
{
|
||||
|
||||
|
||||
if (checks.CheckDate.HasValue != null)
|
||||
{
|
||||
bookmarkSendDate.Text = checks.CheckDate.Value.ToString("yyyy年MM月dd日");
|
||||
@@ -736,7 +763,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
bookmarkNoticeNum.Text = checks.DocCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Bookmark bookmarkUnit = doc.Range.Bookmarks["Unit"];
|
||||
if (bookmarkUnit != null)
|
||||
@@ -788,7 +815,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
|
||||
Bookmark bookmarkCheckDate = doc.Range.Bookmarks["CheckDate"];
|
||||
|
||||
|
||||
if (bookmarkCheckDate != null)
|
||||
{
|
||||
|
||||
@@ -822,7 +849,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)
|
||||
@@ -992,7 +1019,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