示例#1
0
 /// <summary>
 /// 添加单位信息
 /// </summary>
 /// <param name="unit"></param>
 public static void AddUnit(Model.Base_Unit unit)
 {
     Model.SUBHSSEDB db      = Funs.DB;
     Model.Base_Unit newUnit = new Model.Base_Unit
     {
         UnitId       = unit.UnitId,
         UnitCode     = unit.UnitCode,
         UnitName     = unit.UnitName,
         UnitTypeId   = unit.UnitTypeId,
         Corporate    = unit.Corporate,
         Address      = unit.Address,
         Telephone    = unit.Telephone,
         Fax          = unit.Fax,
         EMail        = unit.EMail,
         ProjectRange = unit.ProjectRange,
         IsThisUnit   = unit.IsThisUnit,
         IsBranch     = unit.IsBranch,
         IsHide       = false,
         DataSources  = unit.DataSources,
         FromUnitId   = unit.FromUnitId,
         SupUnitId    = unit.SupUnitId,
     };
     db.Base_Unit.InsertOnSubmit(newUnit);
     db.SubmitChanges();
 }
示例#2
0
 /// <summary>
 /// 根据单位ID删除单位信息
 /// </summary>
 /// <param name="unitId"></param>
 public static void DeleteUnitById(string unitId)
 {
     Model.SUBHSSEDB db      = Funs.DB;
     Model.Base_Unit newUnit = db.Base_Unit.FirstOrDefault(e => e.UnitId == unitId);
     if (newUnit != null)
     {
         newUnit.IsHide = true;
         UpdateUnit(newUnit);
     }
 }
示例#3
0
        /// <summary>
        /// 根据用户UnitId返回对应的UnitId
        /// </summary>
        /// <returns></returns>
        public static string GetUnitId(string unitId)
        {
            string id = unitId;

            if (string.IsNullOrEmpty(unitId))
            {
                Model.Base_Unit unit = Funs.DB.Base_Unit.FirstOrDefault(e => e.IsThisUnit == true);  //本单位
                if (unit != null)
                {
                    id = unit.UnitId;
                }
            }
            return(id);
        }
示例#4
0
        /// <summary>
        /// 根据用户UnitId判断是否为本单位用户或管理员
        /// </summary>
        /// <returns></returns>
        public static bool IsMainUnitOrAdmin(string userId)
        {
            bool result = false;

            if (userId == Const.sysglyId || userId == Const.hfnbdId || userId == Const.sedinId)
            {
                result = true;
            }
            else
            {
                var user = UserService.GetUserByUserId(userId);
                if (user != null)
                {
                    Model.Base_Unit unit = UnitService.GetUnitByUnitId(user.UnitId);
                    if (unit != null && unit.IsThisUnit == true)
                    {
                        result = true;
                    }
                }
            }
            return(result);
        }
示例#5
0
        /// <summary>
        /// 获取受检单位/班组
        /// </summary>
        /// <param name="WorkStage"></param>
        /// <returns></returns>
        protected string ConvertUnitOrTeamGroup(object CheckDayId)
        {
            string name = string.Empty;

            if (CheckDayId != null)
            {
                Model.Check_CheckDayXA checkDay = BLL.Check_CheckDayXAService.GetCheckDayByCheckDayId(CheckDayId.ToString());
                if (checkDay != null)
                {
                    if (!string.IsNullOrEmpty(checkDay.DutyUnitIds))
                    {
                        string[] unitIds = checkDay.DutyUnitIds.Split(',');
                        foreach (var item in unitIds)
                        {
                            Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(item);
                            name += unit.UnitName + ",";
                        }
                        if (!string.IsNullOrEmpty(name))
                        {
                            name = name.Substring(0, name.LastIndexOf(","));
                        }
                    }
                    if (!string.IsNullOrEmpty(checkDay.DutyTeamGroupIds))
                    {
                        string[] teamGroupIds = checkDay.DutyTeamGroupIds.Split(',');
                        foreach (var item in teamGroupIds)
                        {
                            Model.ProjectData_TeamGroup unit = BLL.TeamGroupService.GetTeamGroupById(item);
                            name += unit.TeamGroupName + ",";
                        }
                        if (!string.IsNullOrEmpty(name))
                        {
                            name = name.Substring(0, name.LastIndexOf(","));
                        }
                    }
                }
            }
            return(name);
        }
示例#6
0
 /// <summary>
 /// 修改单位信息
 /// </summary>
 /// <param name="unit"></param>
 public static void UpdateUnit(Model.Base_Unit unit)
 {
     Model.SUBHSSEDB db      = Funs.DB;
     Model.Base_Unit newUnit = db.Base_Unit.FirstOrDefault(e => e.UnitId == unit.UnitId);
     if (newUnit != null)
     {
         newUnit.UnitCode     = unit.UnitCode;
         newUnit.UnitName     = unit.UnitName;
         newUnit.UnitTypeId   = unit.UnitTypeId;
         newUnit.Corporate    = unit.Corporate;
         newUnit.Address      = unit.Address;
         newUnit.Telephone    = unit.Telephone;
         newUnit.Fax          = unit.Fax;
         newUnit.EMail        = unit.EMail;
         newUnit.ProjectRange = unit.ProjectRange;
         newUnit.IsThisUnit   = unit.IsThisUnit;
         newUnit.IsBranch     = unit.IsBranch;
         newUnit.IsHide       = unit.IsHide;
         newUnit.FromUnitId   = unit.FromUnitId;
         newUnit.SupUnitId    = unit.SupUnitId;
         db.SubmitChanges();
     }
 }
示例#7
0
        /// <summary>
        /// 单位下拉选择项(添加其他单位)
        /// </summary>
        /// <param name="dropName"></param>
        /// <param name="projectId"></param>
        /// <param name="isShowPlease"></param>
        public static void InitUnitOtherDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
        {
            dropName.DataValueField = "UnitId";
            dropName.DataTextField  = "UnitName";

            List <Model.Base_Unit> units = new List <Model.Base_Unit>();

            units.AddRange(BLL.UnitService.GetUnitListByProjectId(projectId));

            Model.Base_Unit other = new Model.Base_Unit
            {
                UnitName = "其他",
                UnitId   = "0"
            };
            units.Add(other);

            dropName.DataSource = units;
            dropName.DataBind();
            if (isShowPlease)
            {
                Funs.FineUIPleaseSelect(dropName);
            }
        }
示例#8
0
 /// <summary>
 /// 加载页面
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.CheckSpecialId = Request.Params["CheckSpecialId"];
         var checkSpecial = BLL.Check_CheckSpecialService.GetCheckSpecialByCheckSpecialId(this.CheckSpecialId);
         if (checkSpecial != null)
         {
             this.txtCheckTime.Text = "检查时间:";
             if (checkSpecial.CheckTime != null)
             {
                 this.txtCheckTime.Text += string.Format("{0:yyyy-MM-dd}", checkSpecial.CheckTime);
             }
             string         personStr = "检查人:";
             Model.Sys_User user      = BLL.UserService.GetUserByUserId(checkSpecial.CheckPerson);
             if (user != null)
             {
                 personStr += user.UserName + "、";
             }
             if (!string.IsNullOrEmpty(checkSpecial.PartInPersonIds))
             {
                 string[] strs = checkSpecial.PartInPersonIds.Split(',');
                 foreach (var s in strs)
                 {
                     Model.Sys_User checkPerson = BLL.UserService.GetUserByUserId(s);
                     if (checkPerson != null)
                     {
                         personStr += checkPerson.UserName + "、";
                     }
                 }
             }
             if (!string.IsNullOrEmpty(personStr))
             {
                 personStr = personStr.Substring(0, personStr.LastIndexOf("、"));
             }
             if (!string.IsNullOrEmpty(checkSpecial.PartInPersonNames))
             {
                 if (personStr != "检查人:")
                 {
                     personStr += "、" + checkSpecial.PartInPersonNames;
                 }
                 else
                 {
                     personStr += checkSpecial.PartInPersonNames;
                 }
             }
             this.txtCheckPerson.Text = personStr;
             this.txtCheckType.Text   = "检查项目:";
             if (checkSpecial.CheckType == "0")
             {
                 this.txtCheckType.Text += "周检";
             }
             else if (checkSpecial.CheckType == "1")
             {
                 this.txtCheckType.Text += "月检";
             }
             else if (checkSpecial.CheckType == "2")
             {
                 this.txtCheckType.Text += "其它";
             }
             var    checkSpecialDetails = BLL.Check_CheckSpecialDetailService.GetCheckSpecialDetailByCheckSpecialId(this.CheckSpecialId);
             int    i   = 1;
             string str = "<table id='Table3' runat='server' width='100%' cellpadding='0' cellspacing='0' border='0' frame='vsides' bordercolor='#000000'>"
                          + "<tr><td align='center' style='width:5%; border: 1px solid #000000; font-size:15px; border-right: none;'>序号</td>"
                          + "<td align='center' style='width:30%; border: 1px solid #000000; font-size:15px; border-right: none;'>隐患照片或描述</td>"
                          + "<td align='center' style='width:20%; border: 1px solid #000000; font-size:15px; border-right: none;'>整改措施</td>"
                          + "<td align='center' style='width:8%; border: 1px solid #000000; font-size:15px; border-right: none;'>整改责任人</td>"
                          + "<td align='center' style='width:7%; border: 1px solid #000000; font-size:15px; border-right: none;'>整改时间</td>"
                          + "<td align='center' style='width:10%; border: 1px solid #000000; font-size:15px; border-right: none;'>责任单位</td>"
                          + "<td align='center' style='width:7%; border: 1px solid #000000; font-size:15px; border-right: none;'>复检人</td>"
                          + "<td align='center' style='width:7%; border: 1px solid #000000; font-size:15px; border-right: none;'>复检时间</td>"
                          + "<td align='center' style='width:7%; border: 1px solid #000000; font-size:15px; '>复检结果</td></tr>";
             foreach (var checkSpecialDetail in checkSpecialDetails)
             {
                 string           photo1     = string.Empty;
                 string           photo2     = string.Empty;
                 Model.AttachFile attachFile = BLL.AttachFileService.GetAttachFile(checkSpecialDetail.CheckSpecialDetailId, BLL.Const.ProjectCheckSpecialMenuId);
                 if (attachFile != null)
                 {
                     List <string> urls  = new List <string>();
                     string[]      lists = attachFile.AttachUrl.Split(',');
                     foreach (var list in lists)
                     {
                         if (!string.IsNullOrEmpty(list))
                         {
                             urls.Add(list);
                         }
                     }
                     if (urls.Count > 1)   //两个附件
                     {
                         photo1 = "<img alt='' runat='server' id='img111' width='180' height='180' src='" + "../" + urls[0] + "' />";
                         photo2 = "<img alt='' runat='server' id='img111' width='180' height='180' src='" + "../" + urls[1] + "' />";
                     }
                     else
                     {
                         photo1 = "<img alt='' runat='server' id='img111' width='180' height='180' src='" + "../" + urls[0] + "' />";
                     }
                 }
                 string          unitName      = string.Empty;
                 string          completedDate = string.Empty;
                 Model.Base_Unit unit          = BLL.UnitService.GetUnitByUnitId(checkSpecialDetail.UnitId);
                 if (unit != null)
                 {
                     unitName = unit.UnitName;
                 }
                 if (checkSpecialDetail.CompletedDate != null)
                 {
                     completedDate = string.Format("{0:yyyy-MM-dd}", checkSpecialDetail.CompletedDate);
                 }
                 str += "<tr><td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;'>" + i + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + checkSpecialDetail.Unqualified + "<br/>" + photo1 + "<br/>" + photo2 + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' ></td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' ></td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + completedDate + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + unitName + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' ></td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' ></td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none;' ></td></tr>";
                 i++;
             }
             str += "</table>";
             this.div3.InnerHtml = str;
         }
     }
 }
示例#9
0
        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                btnClose.OnClientClick = ActiveWindow.GetHideReference();

                this.CostSmallDetailId = Request.Params["CostSmallDetailId"];
                if (!string.IsNullOrEmpty(this.CostSmallDetailId))
                {
                    Model.CostGoods_CostSmallDetail costSmallDetail = BLL.CostSmallDetailService.GetCostSmallDetailById(this.CostSmallDetailId);
                    if (costSmallDetail != null)
                    {
                        this.txtCostSmallDetailCode.Text = CodeRecordsService.ReturnCodeByDataId(this.CostSmallDetailId);
                        if (costSmallDetail.Months != null)
                        {
                            this.txtMonths.Text = string.Format("{0:yyyy-MM}", costSmallDetail.Months);
                        }
                        if (!string.IsNullOrEmpty(costSmallDetail.UnitId))
                        {
                            Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(costSmallDetail.UnitId);
                            if (unit != null)
                            {
                                this.drpUnitId.Text = unit.UnitName;
                            }
                        }
                        if (costSmallDetail.ReportDate != null)
                        {
                            this.txtReportDate.Text = string.Format("{0:yyyy-MM-dd}", costSmallDetail.ReportDate);
                        }
                        //this.txtCompileMan.Text = costSmallDetail.CompileMan;
                        //if (costSmallDetail.CompileDate != null)
                        //{
                        //    this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", costSmallDetail.CompileDate);
                        //}
                        //this.txtCheckMan.Text = costSmallDetail.CheckMan;
                        //if (costSmallDetail.CheckDate != null)
                        //{
                        //    this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", costSmallDetail.CheckDate);
                        //}
                        //this.txtApproveMan.Text = costSmallDetail.ApproveMan;
                        //if (costSmallDetail.ApproveDate != null)
                        //{
                        //    this.txtApproveDate.Text = string.Format("{0:yyyy-MM-dd}", costSmallDetail.ApproveDate);
                        //}
                        decimal            totalA = 0, totalB = 0, totalProjectA = 0, totalProjectB = 0;
                        Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(costSmallDetail.ProjectId);
                        if (project != null && costSmallDetail.Months.HasValue)
                        {
                            List <Model.CostGoods_CostSmallDetailItem> projectDetails = BLL.CostSmallDetailItemService.GetCostDetailsByUnitId(this.CurrUser.LoginProjectId, costSmallDetail.UnitId, project.StartDate, costSmallDetail.Months);
                            List <Model.CostGoods_CostSmallDetailItem> details        = BLL.CostSmallDetailItemService.GetCostSmallDetailItemByCostSmallDetailId(this.CostSmallDetailId);
                            Model.CostGoods_CostSmallDetailItem        a1             = details.FirstOrDefault(x => x.CostType == "A1");
                            if (a1 != null)
                            {
                                this.nbA1.Text        = (a1.CostMoney ?? 0).ToString();
                                totalA               += Funs.GetNewDecimalOrZero(this.nbA1.Text);
                                this.nbProjectA1.Text = ((from x in projectDetails where x.CostType == "A1" select x.CostMoney ?? 0).Sum() + a1.CostMoney ?? 0).ToString();
                                totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA1.Text);
                                this.txtDefA1.Text    = a1.CostDef;
                            }
                            Model.CostGoods_CostSmallDetailItem a2 = details.FirstOrDefault(x => x.CostType == "A2");
                            if (a2 != null)
                            {
                                this.nbA2.Text        = (a2.CostMoney ?? 0).ToString();
                                totalA               += Funs.GetNewDecimalOrZero(this.nbA2.Text);
                                this.nbProjectA2.Text = ((from x in projectDetails where x.CostType == "A2" select x.CostMoney ?? 0).Sum() + a2.CostMoney ?? 0).ToString();
                                totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA2.Text);
                                this.txtDefA2.Text    = a2.CostDef;
                            }
                            Model.CostGoods_CostSmallDetailItem a3 = details.FirstOrDefault(x => x.CostType == "A3");
                            if (a3 != null)
                            {
                                this.nbA3.Text        = (a3.CostMoney ?? 0).ToString();
                                totalA               += Funs.GetNewDecimalOrZero(this.nbA3.Text);
                                this.nbProjectA3.Text = ((from x in projectDetails where x.CostType == "A3" select x.CostMoney ?? 0).Sum() + a3.CostMoney ?? 0).ToString();
                                totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA3.Text);
                                this.txtDefA3.Text    = a3.CostDef;
                            }
                            Model.CostGoods_CostSmallDetailItem a4 = details.FirstOrDefault(x => x.CostType == "A4");
                            if (a4 != null)
                            {
                                this.nbA4.Text        = (a4.CostMoney ?? 0).ToString();
                                totalA               += Funs.GetNewDecimalOrZero(this.nbA4.Text);
                                this.nbProjectA4.Text = ((from x in projectDetails where x.CostType == "A4" select x.CostMoney ?? 0).Sum() + a4.CostMoney ?? 0).ToString();
                                totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA4.Text);
                                this.txtDefA4.Text    = a4.CostDef;
                            }
                            Model.CostGoods_CostSmallDetailItem a5 = details.FirstOrDefault(x => x.CostType == "A5");
                            if (a5 != null)
                            {
                                this.nbA5.Text        = (a5.CostMoney ?? 0).ToString();
                                totalA               += Funs.GetNewDecimalOrZero(this.nbA5.Text);
                                this.nbProjectA5.Text = ((from x in projectDetails where x.CostType == "A5" select x.CostMoney ?? 0).Sum() + a5.CostMoney ?? 0).ToString();
                                totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA5.Text);
                                this.txtDefA5.Text    = a5.CostDef;
                            }
                            Model.CostGoods_CostSmallDetailItem a6 = details.FirstOrDefault(x => x.CostType == "A6");
                            if (a6 != null)
                            {
                                this.nbA6.Text        = (a6.CostMoney ?? 0).ToString();
                                totalA               += Funs.GetNewDecimalOrZero(this.nbA6.Text);
                                this.nbProjectA6.Text = ((from x in projectDetails where x.CostType == "A6" select x.CostMoney ?? 0).Sum() + a6.CostMoney ?? 0).ToString();
                                totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA6.Text);
                                this.txtDefA6.Text    = a6.CostDef;
                            }
                            this.nbA.Text        = totalA.ToString();
                            this.nbProjectA.Text = totalProjectA.ToString();
                            Model.CostGoods_CostSmallDetailItem b1 = details.FirstOrDefault(x => x.CostType == "B1");
                            if (b1 != null)
                            {
                                this.nbB1.Text        = (b1.CostMoney ?? 0).ToString();
                                totalB               += Funs.GetNewDecimalOrZero(this.nbB1.Text);
                                this.nbProjectB1.Text = ((from x in projectDetails where x.CostType == "B1" select x.CostMoney ?? 0).Sum() + b1.CostMoney ?? 0).ToString();
                                totalProjectB        += Funs.GetNewDecimalOrZero(this.nbProjectB1.Text);
                                this.txtDefB1.Text    = b1.CostDef;
                            }
                            Model.CostGoods_CostSmallDetailItem b2 = details.FirstOrDefault(x => x.CostType == "B2");
                            if (b2 != null)
                            {
                                this.nbB2.Text        = (b2.CostMoney ?? 0).ToString();
                                totalB               += Funs.GetNewDecimalOrZero(this.nbB2.Text);
                                this.nbProjectB2.Text = ((from x in projectDetails where x.CostType == "B2" select x.CostMoney ?? 0).Sum() + b2.CostMoney ?? 0).ToString();
                                totalProjectB        += Funs.GetNewDecimalOrZero(this.nbProjectB2.Text);
                                this.txtDefB2.Text    = b2.CostDef;
                            }
                            Model.CostGoods_CostSmallDetailItem b3 = details.FirstOrDefault(x => x.CostType == "B3");
                            if (b3 != null)
                            {
                                this.nbB3.Text        = (b3.CostMoney ?? 0).ToString();
                                totalB               += Funs.GetNewDecimalOrZero(this.nbB3.Text);
                                this.nbProjectB3.Text = ((from x in projectDetails where x.CostType == "B3" select x.CostMoney ?? 0).Sum() + b3.CostMoney ?? 0).ToString();
                                totalProjectB        += Funs.GetNewDecimalOrZero(this.nbProjectB3.Text);
                                this.txtDefB3.Text    = b3.CostDef;
                            }
                            this.nbB.Text         = totalB.ToString();
                            this.nbProjectB.Text  = totalProjectB.ToString();
                            this.nbAB.Text        = (totalA + totalB).ToString();
                            this.nbProjectAB.Text = (totalProjectA + totalProjectB).ToString();
                        }
                    }
                    ///初始化审核菜单
                    this.ctlAuditFlow.MenuId = BLL.Const.ProjectCostSmallDetailMenuId;
                    this.ctlAuditFlow.DataId = this.CostSmallDetailId;
                }
            }
        }
示例#10
0
        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadData();

                PauseNoticeId = Request.Params["PauseNoticeId"];
                if (!string.IsNullOrEmpty(PauseNoticeId))
                {
                    Model.Check_PauseNotice pauseNotice = BLL.Check_PauseNoticeService.GetPauseNoticeByPauseNoticeId(PauseNoticeId);

                    this.txtPauseNoticeCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.PauseNoticeId);
                    if (!string.IsNullOrEmpty(pauseNotice.UnitId))
                    {
                        Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(pauseNotice.UnitId);
                        if (unit != null)
                        {
                            this.txtUnit.Text = unit.UnitName;
                        }
                    }
                    //if (!string.IsNullOrEmpty(pauseNotice.SignMan))
                    //{
                    //    var signName = BLL.UserService.GetUserNameByUserId(pauseNotice.SignMan);
                    //    if (signName !=null)
                    //    {
                    //        this.txtSignMan.Text = signName;
                    //    }
                    //}
                    //if (!string.IsNullOrEmpty(pauseNotice.ApproveMan))
                    //{
                    //    var approve = BLL.UserService.GetUserNameByUserId(pauseNotice.ApproveMan);
                    //    if (approve!=null)
                    //    {
                    //        this.txtApproveMan.Text = approve;
                    //    }
                    //}
                    this.txtProjectPlace.Text = pauseNotice.ProjectPlace;
                    // this.txtSignPerson.Text = pauseNotice.SignPerson;
                    if (pauseNotice.CompileDate != null)
                    {
                        this.txtComplieDate.Text = string.Format("{0:yyyy-MM-dd}", pauseNotice.CompileDate);
                    }
                    this.txtWrongContent.Text = pauseNotice.WrongContent;
                    if (pauseNotice.PauseTime != null)
                    {
                        string strPauseTime = string.Format("{0:yyyy-MM-dd HH:mm:ss}", pauseNotice.PauseTime);
                        int    index1       = strPauseTime.IndexOf("-");
                        int    index2       = strPauseTime.Substring(index1 + 1).IndexOf("-");
                        int    index3       = strPauseTime.Substring(index1 + 1 + index2 + 1).IndexOf(" ");
                        int    index4       = strPauseTime.Substring(index1 + 1 + index2 + 1 + index3 + 1).IndexOf(":");
                        this.txtYear.Text  = strPauseTime.Substring(0, index1);
                        this.txtMonth.Text = strPauseTime.Substring(index1 + 1, index2);
                        this.txtDay.Text   = strPauseTime.Substring(index1 + 1 + index2 + 1, index3);
                        this.txtHour.Text  = strPauseTime.Substring(index1 + 1 + index2 + 1 + index3 + 1, index4);
                    }
                    this.txtPauseContent.Text  = pauseNotice.PauseContent;
                    this.txtOneContent.Text    = pauseNotice.OneContent;
                    this.txtSecondContent.Text = pauseNotice.SecondContent;
                    this.txtThirdContent.Text  = pauseNotice.ThirdContent;
                    //this.txtProjectHeadConfirm.Text = pauseNotice.ProjectHeadConfirm;
                    //if (pauseNotice.ConfirmDate != null)
                    //{
                    //    this.txtConfirmDate.Text = string.Format("{0:yyyy-MM-dd}", pauseNotice.ConfirmDate);
                    //}
                    this.AttachUrl          = pauseNotice.AttachUrl;
                    this.divFile1.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../", this.AttachUrl);
                    if (Request.Params["type"] == "confirm")   //签字确认
                    {
                        this.txtProjectHeadConfirm.Enabled = true;
                        this.txtConfirmDate.Enabled        = true;
                        this.txtProjectHeadConfirm.Text    = this.CurrUser.UserName;
                        this.txtConfirmDate.Text           = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
                    }
                }

                ///初始化审核菜单
                this.ctlAuditFlow.MenuId = BLL.Const.ProjectPauseNoticeMenuId;
                this.ctlAuditFlow.DataId = this.PauseNoticeId;
            }
        }
示例#11
0
 /// <summary>
 /// 加载页面
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.CheckColligationId = Request.Params["CheckColligationId"];
         var checkColligation = BLL.Check_CheckColligationService.GetCheckColligationByCheckColligationId(this.CheckColligationId);
         if (checkColligation != null)
         {
             this.txtCheckTime.Text = "检查时间:";
             if (checkColligation.CheckTime != null)
             {
                 this.txtCheckTime.Text += string.Format("{0:yyyy-MM-dd}", checkColligation.CheckTime);
             }
             string         personStr = "检查人:";
             Model.Sys_User user      = BLL.UserService.GetUserByUserId(checkColligation.CheckPerson);
             if (user != null)
             {
                 personStr += user.UserName + "、";
             }
             if (!string.IsNullOrEmpty(checkColligation.PartInPersonIds))
             {
                 string[] strs = checkColligation.PartInPersonIds.Split(',');
                 foreach (var s in strs)
                 {
                     Model.Sys_User checkPerson = BLL.UserService.GetUserByUserId(s);
                     if (checkPerson != null)
                     {
                         personStr += checkPerson.UserName + "、";
                     }
                 }
             }
             if (!string.IsNullOrEmpty(personStr))
             {
                 personStr = personStr.Substring(0, personStr.LastIndexOf("、"));
             }
             if (!string.IsNullOrEmpty(checkColligation.PartInPersonNames))
             {
                 if (personStr != "检查人:")
                 {
                     personStr += "、" + checkColligation.PartInPersonNames;
                 }
                 else
                 {
                     personStr += checkColligation.PartInPersonNames;
                 }
             }
             this.txtCheckPerson.Text = personStr;
             this.txtCheckType.Text   = "检查项目:";
             if (checkColligation.CheckType == "0")
             {
                 this.txtCheckType.Text += "周检";
             }
             else if (checkColligation.CheckType == "1")
             {
                 this.txtCheckType.Text += "月检";
             }
             else if (checkColligation.CheckType == "2")
             {
                 this.txtCheckType.Text += "其它";
             }
             var    checkColligationDetails = BLL.Check_CheckColligationDetailService.GetCheckColligationDetailByCheckColligationId(this.CheckColligationId);
             int    i   = 1;
             string str = "<table id='Table3' runat='server' width='100%' cellpadding='0' cellspacing='0' border='0' frame='vsides' bordercolor='#000000'>"
                          + "<tr><td align='center' style='width:5%; border: 1px solid #000000; font-size:15px; border-right: none;'>序号</td>"
                          + "<td align='center' style='width:15%; border: 1px solid #000000; font-size:15px; border-right: none;'>隐患内容</td>"
                          + "<td align='center' style='width:10%; border: 1px solid #000000; font-size:15px; border-right: none;'>检查区域</td>"
                          + "<td align='center' style='width:8%; border: 1px solid #000000; font-size:15px; border-right: none;'>隐患类型</td>"
                          + "<td align='center' style='width:8%; border: 1px solid #000000; font-size:15px; border-right: none;'>隐患级别</td>"
                          + "<td align='center' style='width:12%; border: 1px solid #000000; font-size:15px; border-right: none;'>责任单位</td>"
                          + "<td align='center' style='width:8%; border: 1px solid #000000; font-size:15px; border-right: none;'>责任人</td>"
                          + "<td align='center' style='width:8%; border: 1px solid #000000; font-size:15px; border-right: none;'>整改限时</td>"
                          + "<td align='center' style='width:12%; border: 1px solid #000000; font-size:15px; border-right: none;'>整改要求</td>"
                          + "<td align='center' style='width:14%; border: 1px solid #000000; font-size:15px; '>处理措施</td></tr>";
             foreach (var checkColligationDetail in checkColligationDetails)
             {
                 string           photo1     = string.Empty;
                 string           photo2     = string.Empty;
                 Model.AttachFile attachFile = BLL.AttachFileService.GetAttachFile(checkColligationDetail.CheckColligationDetailId, BLL.Const.ProjectCheckColligationWHMenuId);
                 if (attachFile != null)
                 {
                     List <string> urls  = new List <string>();
                     string[]      lists = attachFile.AttachUrl.Split(',');
                     foreach (var list in lists)
                     {
                         if (!string.IsNullOrEmpty(list))
                         {
                             urls.Add(list);
                         }
                     }
                     if (urls.Count > 1)   //两个附件
                     {
                         photo1 = "<img alt='' runat='server' id='img111' width='180' height='180' src='" + "../" + urls[0] + "' />";
                         photo2 = "<img alt='' runat='server' id='img111' width='180' height='180' src='" + "../" + urls[1] + "' />";
                     }
                     else
                     {
                         photo1 = "<img alt='' runat='server' id='img111' width='180' height='180' src='" + "../" + urls[0] + "' />";
                     }
                 }
                 string          unitName       = string.Empty;
                 string          personName     = string.Empty;
                 string          handleStepName = string.Empty;
                 Model.Base_Unit unit           = BLL.UnitService.GetUnitByUnitId(checkColligationDetail.UnitId);
                 if (unit != null)
                 {
                     unitName = unit.UnitName;
                 }
                 if (!string.IsNullOrEmpty(checkColligationDetail.PersonId))
                 {
                     var person = BLL.PersonService.GetPersonById(checkColligationDetail.PersonId);
                     if (person != null)
                     {
                         personName = person.PersonName;
                     }
                 }
                 if (!string.IsNullOrEmpty(checkColligationDetail.HandleStep))
                 {
                     List <string> lists = checkColligationDetail.HandleStep.Split('|').ToList();
                     if (lists.Count > 0)
                     {
                         foreach (var item in lists)
                         {
                             Model.Sys_Const con = BLL.ConstValue.GetConstByConstValueAndGroupId(item, BLL.ConstValue.Group_HandleStep);
                             if (con != null)
                             {
                                 handleStepName += con.ConstText + "|";
                             }
                         }
                     }
                     if (!string.IsNullOrEmpty(handleStepName))
                     {
                         handleStepName = handleStepName.Substring(0, handleStepName.LastIndexOf("|"));
                     }
                 }
                 str += "<tr><td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;'>" + i + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + checkColligationDetail.Unqualified + "<br/>" + photo1 + "<br/>" + photo2 + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + checkColligationDetail.WorkArea + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + checkColligationDetail.HiddenDangerType + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + checkColligationDetail.HiddenDangerLevel + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + unitName + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + personName + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + string.Format("{0:yyyy-MM-dd}", checkColligationDetail.LimitedDate) + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none; border-right: none;' >" + checkColligationDetail.Suggestions + "</td>"
                        + "<td align='center' style='border: 1px solid #000000; font-size:15px; border-top: none;' >" + handleStepName + "</td></tr>";
                 i++;
             }
             str += "</table>";
             this.div3.InnerHtml = str;
         }
     }
 }
示例#12
0
        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hdAttachUrl.Text            = string.Empty;
                hdId.Text                   = string.Empty;
                this.btnClose.OnClientClick = ActiveWindow.GetHideReference();

                this.ProjectId  = this.CurrUser.LoginProjectId;
                this.CheckDayId = Request.Params["CheckDayId"];
                var checkDay = BLL.Check_CheckDayXAService.GetCheckDayByCheckDayId(this.CheckDayId);
                if (checkDay != null)
                {
                    this.ProjectId            = checkDay.ProjectId;
                    this.txtCheckDayCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.CheckDayId);
                    if (checkDay.CheckDate != null)
                    {
                        this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", checkDay.CheckDate);
                    }
                    Model.Sys_User checkMan = BLL.UserService.GetUserByUserId(checkDay.CompileMan);
                    if (checkMan != null)
                    {
                        this.txtCheckMan.Text = checkMan.UserName;
                    }
                    if (checkDay.NotOKNum != null)
                    {
                        this.txtNotOKNum.Text = checkDay.NotOKNum.ToString();
                    }
                    if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, checkDay.CompileUnit))  //施工单位
                    {
                        this.trTeamGroup.Hidden = false;
                        if (!string.IsNullOrEmpty(checkDay.DutyTeamGroupIds))
                        {
                            string   names = string.Empty;
                            string[] ids   = checkDay.DutyTeamGroupIds.Split(',');
                            foreach (var item in ids)
                            {
                                Model.ProjectData_TeamGroup teamGroup = BLL.TeamGroupService.GetTeamGroupById(item);
                                if (teamGroup != null)
                                {
                                    names += teamGroup.TeamGroupName + ",";
                                }
                            }
                            if (!string.IsNullOrEmpty(names))
                            {
                                names = names.Substring(0, names.LastIndexOf(","));
                            }
                            this.drpDutyTeamGroupIds.Text = names;
                        }
                    }
                    else
                    {
                        this.trUnit.Hidden = false;
                        if (!string.IsNullOrEmpty(checkDay.DutyUnitIds))
                        {
                            string   names = string.Empty;
                            string[] ids   = checkDay.DutyUnitIds.Split(',');
                            foreach (var item in ids)
                            {
                                Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(item);
                                if (unit != null)
                                {
                                    names += unit.UnitName + ",";
                                }
                            }
                            if (!string.IsNullOrEmpty(names))
                            {
                                names = names.Substring(0, names.LastIndexOf(","));
                            }
                            this.drpDutyUnitIds.Text = names;
                        }
                    }
                    if (!string.IsNullOrEmpty(checkDay.WorkAreaIds))
                    {
                        string   names = string.Empty;
                        string[] ids   = checkDay.WorkAreaIds.Split(',');
                        foreach (var item in ids)
                        {
                            Model.ProjectData_WorkArea workArea = BLL.WorkAreaService.GetWorkAreaByWorkAreaId(item);
                            if (workArea != null)
                            {
                                names += workArea.WorkAreaName + ",";
                            }
                        }
                        if (!string.IsNullOrEmpty(names))
                        {
                            names = names.Substring(0, names.LastIndexOf(","));
                        }
                        this.drpWorkAreaIds.Text = names;
                    }
                    this.txtUnqualified.Text   = checkDay.Unqualified;
                    this.txtHandleStation.Text = checkDay.HandleStation;
                    if (checkDay.IsOK == true)
                    {
                        this.txtIsOK.Text = "是";
                    }
                    else
                    {
                        this.txtIsOK.Text = "否";
                    }
                }
            }
        }
示例#13
0
        /// <summary>
        /// 插入信息-单位信息 1
        /// </summary>
        /// <param name="projectId"></param>
        /// <param name="arr"></param>
        public static bool AddUnit(string projectId, JArray arr, Model.Sys_User user)
        {
            Model.SUBHSSEDB db   = Funs.DB;
            bool            isOk = true;

            try
            {
                foreach (var item in arr)
                {
                    string fromUnitId = item["ID"].ToString();
                    string departName = item["DepartName"].ToString(); ///单位名称
                    string departSir  = item["DepartSir"].ToString();  ///单位级别 0:非项目部 1:项目部级 2:项目部下级单位
                    ////单位类型
                    string unitTypeId  = null;
                    var    getUnitType = db.Base_UnitType.FirstOrDefault(x => x.UnitTypeName == item["DepartType"].ToString());
                    if (getUnitType != null)
                    {
                        unitTypeId = getUnitType.UnitTypeId;
                    }

                    if (!string.IsNullOrEmpty(fromUnitId) && !string.IsNullOrEmpty(departName) && departSir != "1")
                    {
                        if (!string.IsNullOrEmpty(projectId))
                        {
                            Model.Base_Unit newUnit = new Model.Base_Unit
                            {
                                FromUnitId  = fromUnitId,
                                UnitCode    = item["DepartCode"].ToString(),
                                UnitName    = departName,
                                UnitTypeId  = unitTypeId,
                                Corporate   = item["Charge"].ToString(),
                                Telephone   = item["Phone"].ToString(),
                                IsHide      = false,
                                DataSources = projectId,
                            };

                            var getUnit = db.Base_Unit.FirstOrDefault(x => x.FromUnitId == fromUnitId);
                            if (getUnit == null)
                            {
                                var getUnitByName = db.Base_Unit.FirstOrDefault(x => x.UnitName == departName);
                                if (getUnitByName != null)
                                {
                                    newUnit.UnitId           = getUnitByName.UnitId;
                                    getUnitByName.FromUnitId = fromUnitId;
                                    db.SubmitChanges();
                                }
                                else
                                {
                                    newUnit.UnitId = SQLHelper.GetNewID(typeof(Model.Base_Unit));
                                    UnitService.AddUnit(newUnit);
                                }
                            }
                            else
                            {
                                newUnit.UnitId = getUnit.UnitId;
                            }

                            var pUnit = db.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == projectId && x.UnitId == newUnit.UnitId);
                            if (pUnit == null)
                            {
                                Model.Project_ProjectUnit newProjectUnit = new Model.Project_ProjectUnit
                                {
                                    ProjectId = projectId,
                                    UnitId    = newUnit.UnitId,
                                    UnitType  = Const.ProjectUnitType_2,
                                };

                                ProjectUnitService.AddProjectUnit(newProjectUnit);
                                BLL.LogService.AddSys_Log(user, null, newProjectUnit.ProjectUnitId, BLL.Const.ProjectUnitMenuId, BLL.Const.BtnModify);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                isOk = false;
                ErrLogInfo.WriteLog(string.Empty, ex);
            }
            return(isOk);
        }
示例#14
0
 private void getQRUrl()
 {
     if (!string.IsNullOrEmpty(Request.Params["PersonId"]))
     {
         ////人员
         var person = BLL.PersonService.GetPersonById(Request.Params["PersonId"]);
         if (person != null && !string.IsNullOrEmpty(person.QRCodeAttachUrl))
         {
             this.imgPhoto.Src   = "../" + person.QRCodeAttachUrl;
             this.lbWedCode.Text = "人员卡号:" + person.CardNo;
             this.lbWedName.Text = "人员姓名:" + person.PersonName;
             Model.Base_Unit unit     = BLL.UnitService.GetUnitByUnitId(person.UnitId);
             string          unitName = string.Empty;
             if (unit != null)
             {
                 unitName = unit.UnitName;
             }
             this.lbUnitName.Text = "人员单位:" + unitName;
         }
     }
     else if (!string.IsNullOrEmpty(Request.Params["EquipmentQualityId"]))
     {
         ////设备
         var equipmentQuality = BLL.EquipmentQualityService.GetEquipmentQualityById(Request.Params["EquipmentQualityId"]);
         if (equipmentQuality != null && !string.IsNullOrEmpty(equipmentQuality.QRCodeAttachUrl))
         {
             this.imgPhoto.Src   = "../" + equipmentQuality.QRCodeAttachUrl;
             this.lbWedCode.Text = "出厂编号:" + equipmentQuality.FactoryCode;
             this.lbWedName.Text = "设备名称:" + equipmentQuality.EquipmentQualityName;
             Model.Base_Unit unit     = BLL.UnitService.GetUnitByUnitId(equipmentQuality.UnitId);
             string          unitName = string.Empty;
             if (unit != null)
             {
                 unitName = unit.UnitName;
             }
             this.lbUnitName.Text = "所属单位:" + unitName;
         }
     }
     else if (!string.IsNullOrEmpty(Request.Params["GeneralEquipmentQualityId"]))
     {
         ///一般设备
         var generalEquipmentQuality = BLL.GeneralEquipmentQualityService.GetGeneralEquipmentQualityById(Request.Params["GeneralEquipmentQualityId"]);
         if (generalEquipmentQuality != null && !string.IsNullOrEmpty(generalEquipmentQuality.QRCodeAttachUrl))
         {
             this.imgPhoto.Src   = "../" + generalEquipmentQuality.QRCodeAttachUrl;
             this.lbWedCode.Text = "编号:" + BLL.CodeRecordsService.ReturnCodeByDataId(generalEquipmentQuality.GeneralEquipmentQualityId);
             string equipmentTypeName = string.Empty;
             Model.Base_SpecialEquipment equipmentType = BLL.SpecialEquipmentService.GetSpecialEquipmentById(generalEquipmentQuality.SpecialEquipmentId);
             if (equipmentType != null)
             {
                 equipmentTypeName = equipmentType.SpecialEquipmentName;
             }
             this.lbWedName.Text = "设备名称:" + equipmentTypeName;
             Model.Base_Unit unit     = BLL.UnitService.GetUnitByUnitId(generalEquipmentQuality.UnitId);
             string          unitName = string.Empty;
             if (unit != null)
             {
                 unitName = unit.UnitName;
             }
             this.lbUnitName.Text = "所属单位:" + unitName;
         }
     }
     else if (!string.IsNullOrEmpty(Request.Params["ConstructSolutionId"]))
     {
         ///施工方案
         var constructSolution = BLL.ConstructSolutionService.GetConstructSolutionById(Request.Params["ConstructSolutionId"]);
         if (constructSolution != null && !string.IsNullOrEmpty(constructSolution.QRCodeAttachUrl))
         {
             this.imgPhoto.Src = "../" + constructSolution.QRCodeAttachUrl;
             string code = string.Empty;
             if (!string.IsNullOrEmpty(constructSolution.ConstructSolutionCode))
             {
                 code = constructSolution.ConstructSolutionCode;
             }
             else
             {
                 code = BLL.CodeRecordsService.ReturnCodeByDataId(constructSolution.ConstructSolutionId);
             }
             this.lbWedCode.Text = "编号:" + code;
             this.lbWedName.Text = "方案名称:" + constructSolution.ConstructSolutionName;
             Model.Base_Unit unit     = BLL.UnitService.GetUnitByUnitId(constructSolution.UnitId);
             string          unitName = string.Empty;
             if (unit != null)
             {
                 unitName = unit.UnitName;
             }
             this.lbUnitName.Text = "所属单位:" + unitName;
         }
     }
     else if (!string.IsNullOrEmpty(Request.Params["TrainingPlanId"]))
     {
         ///培训计划
         var trainingPlan = BLL.TrainingPlanService.GetPlanById(Request.Params["TrainingPlanId"]);
         if (trainingPlan != null && !string.IsNullOrEmpty(trainingPlan.QRCodeUrl))
         {
             this.imgPhoto.Src = "../" + trainingPlan.QRCodeUrl;
             string code = string.Empty;
             if (!string.IsNullOrEmpty(trainingPlan.PlanCode))
             {
                 code = trainingPlan.PlanCode;
             }
             else
             {
                 code = BLL.CodeRecordsService.ReturnCodeByDataId(trainingPlan.PlanId);
             }
             this.lbWedCode.Text  = "编号:" + code;
             this.lbWedName.Text  = "名称:" + trainingPlan.PlanName;
             this.lbUnitName.Text = "培训时间:" + string.Format("{0:yyyy-MM-dd}", trainingPlan.TrainStartDate) + ";培训地点:" + trainingPlan.TeachAddress;
         }
     }
     else if (!string.IsNullOrEmpty(Request.Params["TestPlanId"]))
     {
         ///培训计划
         var testPlan = BLL.TestPlanService.GetTestPlanById(Request.Params["TestPlanId"]);
         if (testPlan != null && !string.IsNullOrEmpty(testPlan.QRCodeUrl))
         {
             this.imgPhoto.Src = "../" + testPlan.QRCodeUrl;
             string code = string.Empty;
             if (!string.IsNullOrEmpty(testPlan.PlanCode))
             {
                 code = testPlan.PlanCode;
             }
             else
             {
                 code = BLL.CodeRecordsService.ReturnCodeByDataId(testPlan.PlanId);
             }
             this.lbWedCode.Text  = "编号:" + code;
             this.lbWedName.Text  = "名称:" + testPlan.PlanName;
             this.lbUnitName.Text = "考试扫码时间:" + string.Format("{0:yyyy-MM-dd}", testPlan.TestStartTime) + ";考试地点:" + testPlan.TestPalce;
         }
     }
     else if (!string.IsNullOrEmpty(Request.Params["ServerTestPlanId"]))
     {
         ///知识竞赛
         var testPlan = BLL.ServerTestPlanService.GetTestPlanById(Request.Params["ServerTestPlanId"]);
         if (testPlan != null && !string.IsNullOrEmpty(testPlan.QRCodeUrl))
         {
             this.imgPhoto.Src    = "../" + testPlan.QRCodeUrl;
             this.lbWedCode.Text  = "编号:" + testPlan.PlanCode;
             this.lbWedName.Text  = "名称:" + testPlan.PlanName;
             this.lbUnitName.Text = "扫码考试时间:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", testPlan.TestStartTime) + ";至:" + string.Format("{0:yyyy-MM-dd HH:mm:ss}", testPlan.TestEndTime);
         }
     }
 }
示例#15
0
        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var thisUnit = BLL.CommonService.GetIsThisUnit();
                if (thisUnit != null)
                {
                    this.Label8.Text  = thisUnit.UnitName + this.Label8.Text;
                    this.Label18.Text = thisUnit.UnitName + this.Label18.Text;
                    this.Label19.Text = thisUnit.UnitName + this.Label19.Text;
                }

                this.RectifyNoticeId = Request.Params["RectifyNoticeId"];
                var rectifyNotice = BLL.RectifyNoticesService.GetRectifyNoticesById(this.RectifyNoticeId);
                if (rectifyNotice != null)
                {
                    this.txtRectifyNoticeCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.RectifyNoticeId);
                    Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(rectifyNotice.UnitId);
                    if (unit != null)
                    {
                        this.txtUnitName.Text        = unit.UnitName;
                        this.txtUnitNameProject.Text = unit.UnitName + "项目部:";
                    }
                    this.txtDutyPerson1.Text = rectifyNotice.DutyPerson;
                    if (rectifyNotice.CheckedDate != null)
                    {
                        this.txtCheckedDate.Text  = string.Format("{0:yyyy-MM-dd}", rectifyNotice.CheckedDate);
                        this.txtCheckedDate2.Text = rectifyNotice.CheckedDate.Value.Year + "年" + rectifyNotice.CheckedDate.Value.Month + "月" + rectifyNotice.CheckedDate.Value.Day + "日";
                    }
                    if (!string.IsNullOrEmpty(rectifyNotice.WrongContent))
                    {
                        this.txtWrongContent.Text = rectifyNotice.WrongContent;
                    }
                    Model.Sys_User user = BLL.UserService.GetUserByUserId(rectifyNotice.SignPerson);
                    if (user != null)
                    {
                        this.txtSignPerson.Text = user.UserName;
                    }
                    if (rectifyNotice.SignDate != null)
                    {
                        this.txtSignDate.Text = string.Format("{0:yyyy-MM-dd}", rectifyNotice.SignDate);
                    }
                    if (!string.IsNullOrEmpty(rectifyNotice.CompleteStatus))
                    {
                        this.txtCompleteStatus.Text = rectifyNotice.CompleteStatus;
                    }
                    this.txtDutyPerson2.Text = rectifyNotice.DutyPerson;
                    if (rectifyNotice.CompleteDate != null)
                    {
                        this.txtCompleteDate.Text = string.Format("{0:yyyy-MM-dd}", rectifyNotice.CompleteDate);
                    }
                    Model.AttachFile attachFile = BLL.AttachFileService.GetAttachFile(this.RectifyNoticeId, BLL.Const.ProjectRectifyNoticeMenuId);
                    if (attachFile != null)
                    {
                        List <string> urls  = new List <string>();
                        string[]      lists = attachFile.AttachUrl.Split(',');
                        foreach (var list in lists)
                        {
                            if (!string.IsNullOrEmpty(list))
                            {
                                urls.Add(list);
                            }
                        }
                        string str = string.Empty;
                        str = "<table id='Table3' runat='server' width='100%' cellpadding='0' cellspacing='0' border='0' bordercolor='#000000'>";
                        if (urls.Count > 1)   //两个附件
                        {
                            string photo1 = "<img alt='' runat='server' id='img111' width='280' height='280' src='" + "../" + urls[0] + "' />";
                            string photo2 = "<img alt='' runat='server' id='img111' width='280' height='280' src='" + "../" + urls[1] + "' />";
                            str += "<tr><td align='center' colspan='2'>" + photo1 + "</td>";
                            str += "<td align='center' colspan='2'>" + photo2 + "</td></tr>";
                        }
                        else if (urls.Count == 1)
                        {
                            string photo1 = "<img alt='' runat='server' id='img111' width='250' height='250' src='" + "../" + urls[0] + "' />";
                            str += "<td align='center' colspan='4'>" + photo1 + "</td></tr>";
                        }
                        str += "</table>";
                        this.div3.InnerHtml = str;
                    }
                }
            }
        }