protected override void OnInit(System.EventArgs e) { if (!string.IsNullOrEmpty(base.Request["prjId"])) { this.prjId = base.Request["prjId"].ToString(); } if (!string.IsNullOrEmpty(base.Request["prjState"])) { this.prjState = base.Request["prjState"].ToString(); } if (!string.IsNullOrEmpty(base.Request["reportId"])) { this.reportId = base.Request["reportId"].ToString(); } if (!string.IsNullOrEmpty(base.Request["ic"])) { this.reportId = base.Request["ic"].ToString(); PTStartReport byId = this.startReportServer.GetById(this.reportId); if (byId != null) { this.prjId = byId.PrjGuid; } } base.OnInit(e); }
private System.Collections.Generic.List <ReportInfo> GetStartReport(System.Collections.Generic.List <ReportInfo> reportList) { PTStartReport byPrjGuid = this.startReportServer.GetByPrjGuid(this.hfldPrjId.Value); if (byPrjGuid != null) { ReportInfo reportInfo = new ReportInfo(); reportInfo.ReportTypeId = "1"; reportInfo.ReportTypeName = "开工报告"; reportInfo.ReportId = byPrjGuid.ReportId; if (byPrjGuid.RealityStartDate.HasValue) { reportInfo.ReportDate = new System.DateTime?(byPrjGuid.RealityStartDate.Value); } else { reportInfo.ReportDate = null; } reportInfo.ConstUnit = byPrjGuid.ConstructionUnit; reportInfo.InputDate = byPrjGuid.InputDate; reportInfo.InputUser = byPrjGuid.InputUser; reportInfo.FlowState = byPrjGuid.FlowState.Value; reportList.Add(reportInfo); } return(reportList); }
protected void BindInfos() { this.hfldStartReportId.Value = this.reportId; PTStartReport byId = this.startReportServer.GetById(this.reportId); if (byId != null) { this.txtSingleProjectName.Text = byId.SingleProjectName; this.txtProjectPlace.Text = byId.ProjectPlace; this.txtConstructionUnit.Text = byId.ConstructionUnit; if (byId.ApplyStartDate.HasValue) { this.txtApplyStartDate.Text = byId.ApplyStartDate.Value.ToString("yyyy-MM-dd"); } if (byId.RealityStartDate.HasValue) { this.txtRealityStartDate.Text = byId.RealityStartDate.Value.ToString("yyyy-MM-dd"); } this.txtMainContent.Text = byId.MainContent; this.txtPrepareCondition.Text = byId.PrepareCondition; this.txtExistenceProblem.Text = byId.ExistenceProblem; this.txtSupervisorUnitOpinion.Text = byId.SupervisorUnitOpinion; this.txtBuildUnitOpinion.Text = byId.BuildUnitOpinion; this.txtApplyUnit.Text = byId.ApplyUnit; this.txtAuditUnit.Text = byId.AuditUnit; this.txtActualPrincipal.Text = byId.ActualPrincipal; this.hfldInputUser.Value = byId.InputUser; this.hfldInputDate.Value = byId.InputDate.ToString(); if (!string.IsNullOrEmpty(byId.ImplDep)) { this.dropImplDep.SelectedValue = byId.ImplDep; } } }
protected void btnSave_Click(object sender, System.EventArgs e) { try { if (!string.IsNullOrEmpty(this.reportId)) { PTStartReport byId = this.startReportServer.GetById(this.reportId); if (!(byId.FlowState == -1) && !(byId.FlowState == -3) && !(base.UserCode == "00000000")) { base.RegisterShow("系统提示", "此项目的开工报告已经提交审核,不能再做修改!"); return; } PTStartReport model = this.GetModel(byId); this.startReportServer.Update(model); } else { PTStartReport pTStartReport = new PTStartReport(); pTStartReport = this.GetModel(pTStartReport); pTStartReport.FlowState = new int?(-1); this.startReportServer.Add(pTStartReport); } } catch { base.RegisterShow("系统提示", "保存失败!"); return; } string message = "winclose('StartWorkReportEdit','StartWorkReportList.aspx', true)"; base.RegisterScript(message); }
public void CommitEvent(object key) { PTStartReport byId = new PTStartReport(); byId = new PTStartReportService().GetById(key.ToString()); if (byId != null) { string prjGuid = byId.PrjGuid; if (ProjectInfo.GetById(prjGuid) != null) { ProjectInfo.UpdatePrjState(prjGuid, "7"); ProjectInfo.UpdatePrjGroup(prjGuid, byId.ImplDep); } } }
protected PTStartReport GetModel(PTStartReport startReport) { startReport.ReportId = this.hfldStartReportId.Value; startReport.PrjGuid = this.hfldPrjGuid.Value; startReport.SingleProjectName = this.txtSingleProjectName.Text.Trim(); startReport.ProjectPlace = this.txtProjectPlace.Text.Trim(); startReport.ConstructionUnit = this.txtConstructionUnit.Text.Trim(); if (!string.IsNullOrEmpty(this.txtApplyStartDate.Text.Trim())) { startReport.ApplyStartDate = new System.DateTime?(System.Convert.ToDateTime(this.txtApplyStartDate.Text.Trim())); } else { startReport.ApplyStartDate = null; } if (!string.IsNullOrEmpty(this.txtRealityStartDate.Text.Trim())) { startReport.RealityStartDate = new System.DateTime?(System.Convert.ToDateTime(this.txtRealityStartDate.Text.Trim())); } else { startReport.RealityStartDate = null; } if (!string.IsNullOrEmpty(this.dropImplDep.SelectedValue)) { startReport.ImplDep = this.dropImplDep.SelectedValue; } startReport.MainContent = this.txtMainContent.Text.Trim(); startReport.PrepareCondition = this.txtPrepareCondition.Text.Trim(); startReport.ExistenceProblem = this.txtExistenceProblem.Text.Trim(); startReport.SupervisorUnitOpinion = this.txtSupervisorUnitOpinion.Text.Trim(); startReport.BuildUnitOpinion = this.txtBuildUnitOpinion.Text.Trim(); startReport.ApplyUnit = this.txtApplyUnit.Text.Trim(); startReport.AuditUnit = this.txtAuditUnit.Text.Trim(); startReport.InputUser = this.hfldInputUser.Value; startReport.InputDate = System.Convert.ToDateTime(this.hfldInputDate.Value); startReport.ActualPrincipal = this.txtActualPrincipal.Text.Trim(); return(startReport); }
protected void BindInfos() { this.hfldStartReportId.Value = this.reportId; try { PTStartReport byId = this.startReportServer.GetById(this.reportId); if (byId != null) { this.BindProject(byId.PrjGuid); this.txtSingleProjectName.Text = byId.SingleProjectName; this.txtProjectPlace.Text = byId.ProjectPlace; this.txtConstructionUnit.Text = byId.ConstructionUnit; if (byId.ApplyStartDate.HasValue) { this.txtApplyStartDate.Text = byId.ApplyStartDate.Value.ToString("yyyy-MM-dd"); } if (byId.RealityStartDate.HasValue) { this.txtRealityStartDate.Text = byId.RealityStartDate.Value.ToString("yyyy-MM-dd"); } this.txtMainContent.Text = byId.MainContent; this.txtPrepareCondition.Text = byId.PrepareCondition; this.txtExistenceProblem.Text = byId.ExistenceProblem; this.txtSupervisorUnitOpinion.Text = byId.SupervisorUnitOpinion; this.txtBuildUnitOpinion.Text = byId.BuildUnitOpinion; this.txtApplyUnit.Text = byId.ApplyUnit; this.txtAuditUnit.Text = byId.AuditUnit; if (!string.IsNullOrEmpty(byId.ImplDep)) { System.Collections.Generic.IList <XpmCode> list = new System.Collections.Generic.List <XpmCode>(); XpmCodeServices xpmCodeServices = new XpmCodeServices(); list = xpmCodeServices.GetBySignCode("dd"); foreach (XpmCode current in list) { if (current.NoteID == System.Convert.ToInt32(byId.ImplDep)) { this.txtImplDep.Text = current.CodeName; } } } this.lblActualPrincipal.Text = byId.ActualPrincipal; System.Guid id = new System.Guid(this.prjId); PTPrjInfoZTB byId2 = new PTPrjInfoZTBService().GetById(id); if (byId2 != null) { this.lblMainPrincipal.Text = byId2.WorkUnit; this.txtPrjName.Text = byId2.PrjName; this.hfldPrjState.Value = byId2.PrjState.ToString(); } PTPrjInfo byId3 = new PTPrjInfoService().GetById(this.prjId); if (byId3 != null) { this.lblMainPrincipal.Text = byId3.WorkUnit; this.txtPrjName.Text = byId3.PrjName; this.hfldPrjState.Value = byId3.PrjState.ToString(); } } else { this.BindProject(this.reportId); } } catch { this.BindProject(this.reportId); } }