Esempio n. 1
0
 /// <summary>
 /// 处理措施
 /// </summary>
 /// <param name="handleStep"></param>
 /// <returns></returns>
 protected string HandleStepStr(object handleStep)
 {
     if (handleStep != null)
     {
         string        name  = string.Empty;
         List <string> lists = handleStep.ToString().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)
                 {
                     name += con.ConstText + "|";
                 }
             }
             if (!string.IsNullOrEmpty(name))
             {
                 name = name.Substring(0, name.LastIndexOf('|'));
             }
         }
         return(name);
     }
     return(null);
 }
Esempio n. 2
0
        /// <summary>
        /// 获取工作阶段
        /// </summary>
        /// <param name="WorkStage"></param>
        /// <returns></returns>
        protected string ConvertPostType(object PostType)
        {
            string name = string.Empty;

            if (PostType != null)
            {
                string          postType = PostType.ToString().Trim();
                Model.Sys_Const c        = ConstValue.drpConstItemList(ConstValue.Group_PostType).FirstOrDefault(x => x.ConstValue == postType);
                if (c != null)
                {
                    name = c.ConstText;
                }
            }
            return(name);
        }
Esempio n. 3
0
        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
                this.IncentiveNoticeId      = Request.Params["IncentiveNoticeId"];
                this.txtCurrency.Text       = "人民币";
                if (!string.IsNullOrEmpty(this.IncentiveNoticeId))
                {
                    Model.Check_IncentiveNotice incentiveNotice = BLL.IncentiveNoticeService.GetIncentiveNoticeById(this.IncentiveNoticeId);
                    if (incentiveNotice != null)
                    {
                        this.txtIncentiveNoticeCode.Text = CodeRecordsService.ReturnCodeByDataId(this.IncentiveNoticeId);
                        if (!string.IsNullOrEmpty(incentiveNotice.UnitId))
                        {
                            var unit = UnitService.GetUnitByUnitId(incentiveNotice.UnitId);
                            if (unit != null)
                            {
                                this.txtUnitName.Text = unit.UnitName;
                            }
                        }
                        if (!string.IsNullOrEmpty(incentiveNotice.TeamGroupId))
                        {
                            var teamGroup = TeamGroupService.GetTeamGroupById(incentiveNotice.TeamGroupId);
                            if (teamGroup != null)
                            {
                                this.txtTeamGroup.Text = teamGroup.TeamGroupName;
                            }
                        }
                        if (!string.IsNullOrEmpty(incentiveNotice.PersonId))
                        {
                            var person = BLL.PersonService.GetPersonById(incentiveNotice.PersonId);
                            if (person != null)
                            {
                                this.txtPerson.Text = person.PersonName;
                            }
                        }

                        if (incentiveNotice.IncentiveDate != null)
                        {
                            this.txtIncentiveDate.Text = string.Format("{0:yyyy-MM-dd}", incentiveNotice.IncentiveDate);
                        }
                        this.txtBasicItem.Text = incentiveNotice.BasicItem;
                        if (!string.IsNullOrEmpty(incentiveNotice.RewardType))
                        {
                            Model.Sys_Const c = BLL.ConstValue.drpConstItemList(BLL.ConstValue.Group_RewardType).FirstOrDefault(x => x.ConstValue == incentiveNotice.RewardType);
                            if (c != null)
                            {
                                this.txtRewardType.Text = c.ConstText;
                            }
                        }
                        if (incentiveNotice.IncentiveMoney != null)
                        {
                            this.txtPayMoney.Text          = Convert.ToString(incentiveNotice.IncentiveMoney);
                            this.rbtnIncentiveWay1.Checked = true;
                            this.txtBig.Text = Funs.NumericCapitalization(Funs.GetNewDecimalOrZero(txtPayMoney.Text));//转换大写
                        }
                        if (!string.IsNullOrEmpty(incentiveNotice.TitleReward))
                        {
                            this.txtTitleReward.Text       = incentiveNotice.TitleReward;
                            this.rbtnIncentiveWay2.Checked = true;
                        }
                        if (!string.IsNullOrEmpty(incentiveNotice.MattleReward))
                        {
                            this.txtMattleReward.Text      = incentiveNotice.MattleReward;
                            this.rbtnIncentiveWay3.Checked = true;
                        }
                        this.AttachUrl            = incentiveNotice.AttachUrl;
                        this.divFile.InnerHtml    = BLL.UploadAttachmentService.ShowAttachment("../", this.AttachUrl);
                        this.txtFileContents.Text = HttpUtility.HtmlDecode(incentiveNotice.FileContents);
                        if (!string.IsNullOrEmpty(incentiveNotice.Currency))
                        {
                            this.txtCurrency.Text = incentiveNotice.Currency;
                        }
                    }
                }
                ///初始化审核菜单
                this.ctlAuditFlow.MenuId = BLL.Const.ProjectIncentiveNoticeMenuId;
                this.ctlAuditFlow.DataId = this.IncentiveNoticeId;
            }
        }
Esempio n. 4
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 && !string.IsNullOrEmpty(thisunit.UnitCode))
                {
                    string url = "../Images/SUBimages/" + thisunit.UnitCode + ".gif";
                    if (url.Contains('*'))
                    {
                        url = url.Replace('*', '-');
                    }
                    this.image.Src = url;
                }

                this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
                this.AccidentReportOtherId  = Request.Params["AccidentReportOtherId"];
                if (!string.IsNullOrEmpty(this.AccidentReportOtherId))
                {
                    Model.Accident_AccidentReportOther accidentReportOther = BLL.AccidentReportOtherService.GetAccidentReportOtherById(this.AccidentReportOtherId);
                    if (accidentReportOther != null)
                    {
                        Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(accidentReportOther.ProjectId);
                        if (project != null)
                        {
                            this.lblProjectName.Text = project.ProjectName;
                            this.lblProjectCode.Text = project.ProjectCode;
                        }
                        this.txtAccidentReportOtherCode.Text = accidentReportOther.AccidentReportOtherCode;
                        if (!string.IsNullOrEmpty(accidentReportOther.AccidentTypeId))
                        {
                            Model.Sys_Const c = BLL.ConstValue.drpConstItemList(BLL.ConstValue.Group_AccidentInvestigationProcessingReport).FirstOrDefault(x => x.ConstValue == accidentReportOther.AccidentTypeId);
                            if (c != null)
                            {
                                this.txtAccidentTypeName.Text = c.ConstText;
                            }
                        }
                        this.txtAbstract.Text = accidentReportOther.Abstract;
                        if (accidentReportOther.AccidentDate != null)
                        {
                            this.txtAccidentDate.Text = string.Format("{0:yyyy-MM-dd}", accidentReportOther.AccidentDate);
                        }
                        this.txtWorkAreaName.Text = accidentReportOther.WorkArea;
                    }
                    if (accidentReportOther.PeopleNum != null)
                    {
                        this.txtPeopleNum.Text = Convert.ToString(accidentReportOther.PeopleNum);
                    }
                    if (!string.IsNullOrEmpty(accidentReportOther.UnitId))
                    {
                        var unit = BLL.UnitService.GetUnitByUnitId(accidentReportOther.UnitId);
                        if (unit != null)
                        {
                            this.txtUnitName.Text = unit.UnitName;
                        }
                    }

                    if (accidentReportOther.EconomicLoss != null)
                    {
                        this.txtEconomicLoss.Text = Convert.ToString(accidentReportOther.EconomicLoss);
                    }
                    if (accidentReportOther.EconomicOtherLoss != null)
                    {
                        this.txtEconomicOtherLoss.Text = Convert.ToString(accidentReportOther.EconomicOtherLoss);
                    }
                    this.txtReportMan.Text    = accidentReportOther.ReportMan;
                    this.txtReporterUnit.Text = accidentReportOther.ReporterUnit;
                    if (accidentReportOther.ReportDate != null)
                    {
                        this.txtReportDate.Text = string.Format("{0:yyyy-MM-dd}", accidentReportOther.ReportDate);
                    }
                    this.txtProcessDescription.Text   = accidentReportOther.ProcessDescription;
                    this.txtEmergencyMeasures.Text    = accidentReportOther.EmergencyMeasures;
                    this.txtImmediateCause.Text       = accidentReportOther.ImmediateCause;
                    this.txtIndirectReason.Text       = accidentReportOther.IndirectReason;
                    this.txtCorrectivePreventive.Text = accidentReportOther.CorrectivePreventive;
                    if (!string.IsNullOrEmpty(accidentReportOther.CompileMan))
                    {
                        var user = BLL.UserService.GetUserByUserId(accidentReportOther.CompileMan);
                        if (user != null)
                        {
                            this.txtCompileManName.Text = user.UserName;
                        }
                    }
                    if (accidentReportOther.CompileDate != null)
                    {
                        this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", accidentReportOther.CompileDate);
                    }
                }
                BindGrid();
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var unit = BLL.CommonService.GetIsThisUnit();
                if (unit != null && !string.IsNullOrEmpty(unit.UnitCode))
                {
                    string url = "../Images/SUBimages/" + unit.UnitCode + ".gif";
                    if (url.Contains('*'))
                    {
                        url = url.Replace('*', '-');
                    }
                    this.image.Src = url;
                }

                this.btnClose.OnClientClick = ActiveWindow.GetHideReference();

                this.AccidentReportId = Request.Params["AccidentReportId"];
                if (!string.IsNullOrEmpty(this.AccidentReportId))
                {
                    Model.Accident_AccidentReport accidentReport = BLL.AccidentReport2Service.GetAccidentReportById(this.AccidentReportId);
                    if (accidentReport != null)
                    {
                        this.txtAccidentReportCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.AccidentReportId);
                        this.txtUnitName.Text           = BLL.UnitService.GetUnitNameByUnitId(accidentReport.UnitId);
                        this.txtCompileManName.Text     = BLL.UserService.GetUserNameByUserId(accidentReport.CompileMan);
                        Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(accidentReport.ProjectId);
                        if (project != null)
                        {
                            this.lblProjectName.Text = project.ProjectName;
                            this.lblProjectCode.Text = project.ProjectCode;
                        }
                        if (accidentReport.CompileDate != null)
                        {
                            this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", accidentReport.CompileDate);
                        }
                        if (!string.IsNullOrEmpty(accidentReport.AccidentTypeId))
                        {
                            Model.Sys_Const c = BLL.ConstValue.drpConstItemList(BLL.ConstValue.Group_AccidentReportRegistration).FirstOrDefault(x => x.ConstValue == accidentReport.AccidentTypeId);
                            if (c != null)
                            {
                                this.txtAccidentTypeName.Text = c.ConstText;
                            }
                            if (accidentReport.IsNotConfirm != null)
                            {
                                this.txtIsNotConfirm.Visible = false;
                                this.txtIsNotConfirm.Text    = accidentReport.IsNotConfirm == true ? "是" : "否";
                            }
                        }
                        this.txtAbstract.Text = accidentReport.Abstract;
                        if (accidentReport.AccidentDate != null)
                        {
                            this.txtAccidentDate.Text = string.Format("{0:yyyy-MM-dd}", accidentReport.AccidentDate);
                        }
                        this.txtWorkAreaName.Text = accidentReport.WorkArea;
                        if (accidentReport.PeopleNum != null)
                        {
                            this.txtPeopleNum.Text = Convert.ToString(accidentReport.PeopleNum);
                        }
                        if (accidentReport.IsNotConfirm == true)  //待定
                        {
                            this.txtWorkingHoursLoss.Text  = accidentReport.NotConfirmWorkingHoursLoss;
                            this.txtEconomicLoss.Text      = accidentReport.NotConfirmEconomicLoss;
                            this.txtEconomicOtherLoss.Text = accidentReport.NotConfirmEconomicOtherLoss;
                        }
                        else
                        {
                            if (accidentReport.WorkingHoursLoss != null)
                            {
                                this.txtWorkingHoursLoss.Text = Convert.ToString(accidentReport.WorkingHoursLoss);
                            }
                            if (accidentReport.EconomicLoss != null)
                            {
                                this.txtEconomicLoss.Text = Convert.ToString(accidentReport.EconomicLoss);
                            }
                            if (accidentReport.EconomicOtherLoss != null)
                            {
                                this.txtEconomicOtherLoss.Text = Convert.ToString(accidentReport.EconomicOtherLoss);
                            }
                        }
                        this.txtReportMan.Text    = accidentReport.ReportMan;
                        this.txtReporterUnit.Text = accidentReport.ReporterUnit;
                        if (accidentReport.ReportDate != null)
                        {
                            this.txtReportDate.Text = string.Format("{0:yyyy-MM-dd}", accidentReport.ReportDate);
                        }
                        this.txtProcessDescription.Text = accidentReport.ProcessDescription;
                        this.txtEmergencyMeasures.Text  = accidentReport.EmergencyMeasures;
                    }
                }
            }
        }
Esempio n. 6
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;
         }
     }
 }