protected void Page_Load(object sender, System.EventArgs e) { if (!base.IsPostBack) { this.hfldIsWBSRelevance.Value = this.isWBSRelevance; if (this.type == "add") { this.txtDate.Text = System.DateTime.Now.ToString("yyyy-M-d"); this.txtInputUser.Text = PageHelper.QueryUser(this, base.UserCode); this.hfldReportId.Value = System.Guid.NewGuid().ToString(); } else { this.hfldReportId.Value = this.conId; this.BindGv(); ConstructReport byId = ConstructReport.GetById(this.conId); this.txtDate.Text = byId.InputDate.ToString("yyyy-M-dd"); this.txtInputUser.Text = byId.InputUser; this.txtWorkCard.Value = byId.WorkCard; } this.hfldAddOrEdit.Value = this.type; this.hfldPrjId.Value = this.prjId; this.FileUpload1.RecordCode = this.hfldReportId.Value; } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { this.hfldIsWBSRelevance.Value = this.isWBSRelevance; this.BindGv(); ConstructReport byId = ConstructReport.GetById(this.conId); this.txtDate.Text = byId.InputDate.ToString("yyyy-M-dd"); this.txtInputUser.Text = byId.InputUser; this.txtWorkCard.Value = byId.WorkCard; this.hfldReportId.Value = this.conId; ProjectInfo byId2 = ProjectInfo.GetById(byId.ProjectId); this.lblPrjName.Text = StringUtility.GetStr(byId2.PrjName, 25); this.spPrjName.Attributes.Add("title", byId2.PrjName); this.FileUpload1.InnerHtml = this.FilesBind(this.conId); } }
protected void Page_Load(object sender, System.EventArgs e) { if (!base.IsPostBack) { this.InitPage(); PrjInfoModel prjInfoModel = new PrjInfoModel(); ConstructReport byId = ConstructReport.GetById(this.consRepId); prjInfoModel = this.ptPrjInfoBll.GetModelByPrjGuid(byId.ProjectId); System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); stringBuilder.AppendFormat(prjInfoModel.PrjName + "下", new object[0]); stringBuilder.Append(byId.InputDate.ToString("yyyy年MM月dd日")); stringBuilder.Append("的施工报量"); this.lblPrjName.Text = stringBuilder.ToString(); this.BindGv(); this.hfldConsRepId.Value = this.consRepId; } }
protected void btnUpdate_Click(object sender, System.EventArgs e) { if (this.gvTask.Rows.Count == 0) { base.RegisterScript("alert('系统提示:\\n\\n没有选择任务的时候不能进行保存!')"); return; } this.hfldIsPostBack.Value = "true"; ConstructReport constructReport = ConstructReport.Create(this.hfldReportId.Value, this.hfldPrjId.Value, this.txtInputUser.Text.Trim(), System.Convert.ToDateTime(this.txtDate.Text), null, this.txtWorkCard.Value.Trim(), -1); ConstructReport byId = ConstructReport.GetById(this.hfldReportId.Value); constructReport.IsValid = true; if (byId != null) { constructReport.Update(constructReport); System.Collections.IEnumerator enumerator = this.gvTask.Rows.GetEnumerator(); try { while (enumerator.MoveNext()) { GridViewRow gridViewRow = (GridViewRow)enumerator.Current; string taskId = this.gvTask.DataKeys[gridViewRow.RowIndex].Values[0].ToString(); string id = this.gvTask.DataKeys[gridViewRow.RowIndex].Values[1].ToString(); string text = ((TextBox)gridViewRow.FindControl("txtCompleteQuantity")).Text; string text2 = ((TextBox)gridViewRow.FindControl("txtWorkContent")).Text; System.Collections.Generic.List <ConstructResource> resourceList = null; ConstructTask constructTask = ConstructTask.Create(id, this.hfldReportId.Value, taskId, System.Convert.ToDecimal(text), text2, "", resourceList); constructTask.Update(constructTask); } goto IL_1A8; } finally { System.IDisposable disposable = enumerator as System.IDisposable; if (disposable != null) { disposable.Dispose(); } } } constructReport.State = "0"; constructReport.Add(constructReport); IL_1A8: base.RegisterScript("top.ui.tabSuccess({ parentName: '_ConstructTask' });"); }
protected void btnBindResTask_Click(object sender, System.EventArgs e) { if (!string.IsNullOrEmpty(this.hfldResourceId.Value)) { ISerializable serializable = new JsonSerializer(); string[] array = serializable.Deserialize <string[]>(this.hfldResourceId.Value); if (this.type == "add" && ConstructReport.GetById(this.hfldReportId.Value) == null) { ConstructReport constructReport = ConstructReport.Create(this.hfldReportId.Value, this.hfldPrjId.Value, this.txtInputUser.Text.Trim(), System.DateTime.Now, null, this.txtWorkCard.Value.Trim(), -1); constructReport.State = "0"; constructReport.IsValid = false; constructReport.Add(constructReport); BudConsReportService budConsReportService = new BudConsReportService(); BudConsReport byId = budConsReportService.GetById(this.hfldReportId.Value); if (byId != null) { byId.ConstractId = this.contractId; budConsReportService.Update(byId); } } string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string taskId = array2[i]; if (!ConstructTask.isExist(this.hfldReportId.Value, taskId)) { System.Collections.Generic.List <ConstructResource> resourceList = null; ConstructTask constructTask = ConstructTask.Create(System.Guid.NewGuid().ToString(), this.hfldReportId.Value, taskId, System.Convert.ToDecimal("0.000"), "", "", resourceList); constructTask.Add(constructTask, this.isWBSRelevance); } } } this.SelectResource1.ResourceId = string.Empty; this.SelectResource1.ResTempType = string.Empty; this.conId = this.hfldReportId.Value; this.BindGv(); }