补充公司级树
This commit is contained in:
@@ -58,35 +58,64 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
// 表头过滤
|
||||
//FilterDataRowItem = FilterDataRowItemImplement;
|
||||
if (!IsPostBack)
|
||||
{
|
||||
code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
|
||||
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();
|
||||
}
|
||||
CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
|
||||
|
||||
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void InitDropDownList()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(this.ProjectId))
|
||||
{
|
||||
code = ProjectService.GetProjectByProjectId(this.ProjectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
//public System.Web.UI.WebControls.ListItem[] GetHandelStatus()
|
||||
//{
|
||||
@@ -129,7 +158,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
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.CheckTime>=@startTime or @startTime='') and (chec.CheckTime<=@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" : ""));
|
||||
@@ -148,8 +177,8 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
strSql += " AND chec.CNProfessionalCode=@CNProfessionalCode";
|
||||
listStr.Add(new SqlParameter("@CNProfessionalCode", drpCNProfessional.SelectedValue));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
return tb;
|
||||
@@ -211,12 +240,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("../../", AttachUrl.TrimEnd(','));
|
||||
}
|
||||
@@ -228,7 +258,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)
|
||||
{
|
||||
@@ -243,7 +273,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
public string Convertstatus(Object code)
|
||||
{
|
||||
Model.Check_CheckControl checkControl = BLL.CheckControlService.GetCheckControl(code.ToString());
|
||||
@@ -275,6 +305,10 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
|
||||
public void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
DataTable tb = ChecklistData();
|
||||
|
||||
// 2.获取当前分页数据
|
||||
@@ -286,9 +320,6 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -391,11 +422,12 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SpecialCheckListView.aspx?CheckSpecialId={0}", codes, "查看 - ")));
|
||||
return;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("未查询到详情数据,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//if (checks != null)
|
||||
//{
|
||||
// if (checks.State.Equals(Const.CheckControl_Complete))
|
||||
@@ -468,11 +500,11 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
string codes = Grid1.SelectedRowID.Split(',')[0];
|
||||
//var checks = BLL.CheckControlService.GetCheckControl(codes);
|
||||
var spec= Funs.DB.Check_CheckSpecialDataIn.FirstOrDefault(x => x.CheckSpecialId == codes);
|
||||
var spec = Funs.DB.Check_CheckSpecialDataIn.FirstOrDefault(x => x.CheckSpecialId == codes);
|
||||
Funs.DB.Check_CheckSpecialDataIn.DeleteOnSubmit(spec);
|
||||
Funs.DB.SubmitChanges();
|
||||
//BLL.CheckControlApproveService.DeleteCheckControlApprovesByCheckControlCode(codes);
|
||||
// BLL.CheckControlService.DeleteCheckControl(codes);
|
||||
// BLL.CheckControlService.DeleteCheckControl(codes);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, codes, codes, BLL.Const.CheckSpecialListMenuId, "删除质量专项巡检记录");
|
||||
Grid1.DataBind();
|
||||
BindGrid();
|
||||
@@ -494,10 +526,10 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.CheckListMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
|
||||
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
// this.btnMenuModify.Hidden = false;
|
||||
// this.btnMenuModify.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
@@ -771,7 +803,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)
|
||||
{
|
||||
@@ -786,9 +818,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:
|
||||
{
|
||||
@@ -963,7 +996,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
|
||||
if (bookmarkSendDate != null)
|
||||
{
|
||||
|
||||
|
||||
if (checks.CheckDate.HasValue != null)
|
||||
{
|
||||
bookmarkSendDate.Text = checks.CheckDate.Value.ToString("yyyy年MM月dd日");
|
||||
@@ -1030,7 +1063,7 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
}
|
||||
|
||||
Bookmark bookmarkCheckDate = doc.Range.Bookmarks["CheckDate"];
|
||||
|
||||
|
||||
if (bookmarkCheckDate != null)
|
||||
{
|
||||
|
||||
@@ -1064,7 +1097,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)
|
||||
@@ -1234,7 +1267,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