protected void BtnSave_Click(object sender, EventArgs e) { int num; if (!(this._Type == "Auditing")) { if (this._Type == "List") { ConstructOrganizeInfo entContructInfo = this.GetEntContructInfo(); num = ConstructOrganizeAction.SetEntAudit(entContructInfo); if (num == 1) { string text = "parent.desktop.flowclass.location='/EPC/17/Frame.aspx?url=../../epc/17/Ppm/ScienceInnovate/ConstructOrganizeQuery.aspx&Type=List&PrjState=0';"; text += "alert('审核成功');"; text += "top.frameWorkArea.window.desktop.getActive().close();"; this.Js.Text = text; return; } this.Js.Text = "alert('审核失败!'); "; } return; } ConstructOrganizeInfo pPMContructInfo = this.GetPPMContructInfo(); num = ConstructOrganizeAction.SetPPMAudit(pPMContructInfo); if (num == 1) { string text2 = "parent.desktop.flowclass.location='/EPC/17/Frame.aspx?url=../../epc/17/Ppm/ScienceInnovate/ConstructOrganizeQuery.aspx&Type=Auditing&PrjState=0';"; text2 += "alert('审核成功');"; text2 += "top.frameWorkArea.window.desktop.getActive().close();"; this.Js.Text = text2; return; } this.Js.Text = "alert('审核失败!'); "; }
protected void BtnDel_Click(object sender, EventArgs e) { int num = 0; if (this.hfldConstruct.Value.Contains("[")) { List <string> list = new List <string>(); list = JsonHelper.GetListFromJson(this.hfldConstruct.Value); for (int i = 0; i < list.Count; i++) { num = ConstructOrganizeAction.Del(list[i].ToString()); } } else { num = ConstructOrganizeAction.Del(this.hfldConstruct.Value); } if (num == 1) { base.RegisterScript("top.ui.show('删除成功')"); this.ContructBind(); return; } if (num == 2) { base.RegisterScript("top.ui.alert('施工组织已经审核过,不能删除!');"); return; } if (num == 0) { base.RegisterScript("top.ui.show('删除失败')"); } }
private void EntContructBind() { string strPrjCode = this.ViewState["PRJCODE"].ToString(); this.DGrdConstruct.DataSource = ConstructOrganizeAction.GetEntContructList(strPrjCode); this.DGrdConstruct.DataBind(); }
private void GetPPMView(string Id) { if (this._Style == "PPM") { DataTable singleConOrgInfo = ConstructOrganizeAction.GetSingleConOrgInfo(Id); this.TxtAuditPerson.Text = singleConOrgInfo.Rows[0]["PPMAuditPerson"].ToString(); this.DateAuditTime.Text = singleConOrgInfo.Rows[0]["PPMAuditTime"].ToString(); if (singleConOrgInfo.Rows[0]["PPMAuditResult"].ToString().Trim() != "") { this.DDLAuditResult.SelectedValue = singleConOrgInfo.Rows[0]["PPMAuditResult"].ToString().Trim(); this.RadioButtonList1.SelectedValue = singleConOrgInfo.Rows[0]["PPMAuditResult"].ToString().Trim(); } else { this.DDLAuditResult.SelectedItem.Text = "未审核"; } this.TxtAuditIdea.Text = singleConOrgInfo.Rows[0]["PPMAuditIdea"].ToString(); this.TxtRemark.Text = singleConOrgInfo.Rows[0]["PPMAuditRemark"].ToString(); } else { if (this._Style == "Ent") { DataTable singleConOrgInfo2 = ConstructOrganizeAction.GetSingleConOrgInfo(Id); this.TxtAuditPerson.Text = singleConOrgInfo2.Rows[0]["EntAuditPerson"].ToString(); this.DateAuditTime.Text = singleConOrgInfo2.Rows[0]["EntAuditTime"].ToString(); if (singleConOrgInfo2.Rows[0]["EntAuditResult"].ToString().Trim() != "") { this.DDLAuditResult.SelectedValue = singleConOrgInfo2.Rows[0]["EntAuditResult"].ToString().Trim(); this.RadioButtonList1.SelectedValue = singleConOrgInfo2.Rows[0]["EntAuditResult"].ToString().Trim(); } else { this.DDLAuditResult.SelectedItem.Text = "未审核"; } this.TxtAuditIdea.Text = singleConOrgInfo2.Rows[0]["EntAuditIdea"].ToString(); this.TxtRemark.Text = singleConOrgInfo2.Rows[0]["EntAuditRemark"].ToString(); } } this.TxtAuditPerson.Enabled = false; this.DateAuditTime.Enabled = false; this.DDLAuditResult.Enabled = false; this.TxtAuditIdea.Enabled = false; this.TxtRemark.Enabled = false; }
protected void BtnSave_Click(object sender, EventArgs e) { ConstructOrganizeInfo conOrgInfo = this.GetConOrgInfo(); if (this._Type == "Add") { int mark = 2; if (this.cbkmark.Checked) { mark = 3; } ConstructOrganizeAction.Add(conOrgInfo); int num = this.coBll.UpdGuidang("Prj_TechnologyConstructOrganize", mark, Convert.ToInt32(this.DDTClass.SelectedValue.Trim()), " where id=" + conOrgInfo.Id); if (num == 1) { base.RegisterScript("top.ui.tabSuccess({ parentName: '_constructorganizequery' });"); this.BtnSave.Enabled = false; return; } base.RegisterScript("top.ui.alert('保存成功!');"); return; } else { conOrgInfo.Id = int.Parse(this._Id); int mark2 = 2; if (this.cbkmark.Checked) { mark2 = 3; } ConstructOrganizeAction.Update(conOrgInfo); int num = this.coBll.UpdGuidang("Prj_TechnologyConstructOrganize", mark2, Convert.ToInt32(this.DDTClass.SelectedValue.Trim()), " where id=" + conOrgInfo.Id); if (num == 1) { base.RegisterScript("top.ui.tabSuccess({ parentName: '_constructorganizequery' });"); return; } base.RegisterScript("top.ui.alert('保存成功!');"); return; } }
private void GetConOrgInfoOfUpd(string Id) { DataTable singleConOrgInfo = ConstructOrganizeAction.GetSingleConOrgInfo(Id); this.TxtUnit.Text = singleConOrgInfo.Rows[0]["FillUnit"].ToString(); this.TxtPrjName.Text = ((singleConOrgInfo.Rows[0]["TCO_Name"] != DBNull.Value) ? singleConOrgInfo.Rows[0]["TCO_Name"].ToString() : ""); this.TxtWeave.Value = singleConOrgInfo.Rows[0]["WeavePerson"].ToString(); this.DateWeave.Text = Convert.ToDateTime(singleConOrgInfo.Rows[0]["WeaveTime"].ToString()).ToShortDateString(); this.TxtScript.Text = singleConOrgInfo.Rows[0]["Maindescripe"].ToString(); this.TxtRemark.Text = singleConOrgInfo.Rows[0]["Remark"].ToString(); this.DDTClass.SelectedValue = singleConOrgInfo.Rows[0]["filesType"].ToString(); this.hdnFlowGuid.Value = singleConOrgInfo.Rows[0]["FlowGuid"].ToString(); if (singleConOrgInfo.Rows[0]["mark"].ToString().Equals("2")) { this.cbkmark.Checked = false; this.TrGDType.Attributes.Add("style", "display:none;"); return; } this.cbkmark.Checked = true; this.TrGDType.Attributes.Add("style", "display:block;"); }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { com.jwsoft.pm.entpm.PageHelper.BindDropDownTree(this.DDTClass, 20, true); DataTable dataTable = new DataTable(); if (base.Request.QueryString["ic"] != null) { string g = base.Request.QueryString["ic"]; dataTable = this.Bll.getModelByGuid("Prj_V_ScienceInnovate", new Guid(g)); } else { if (base.Request.QueryString["id"] != null) { string strId = base.Request.QueryString["id"]; dataTable = ConstructOrganizeAction.GetSingleConOrgInfo(strId); } } this.lblUnit.Text = dataTable.Rows[0]["FillUnit"].ToString(); this.hdnmark.Value = dataTable.Rows[0]["mark"].ToString(); this.lblName.Text = ((dataTable.Rows[0]["TCO_Name"] != DBNull.Value) ? dataTable.Rows[0]["TCO_Name"].ToString() : ""); this.lblpeople.Text = dataTable.Rows[0]["WeavePerson"].ToString(); this.lblDate.Text = Convert.ToDateTime(dataTable.Rows[0]["WeaveTime"].ToString()).ToShortDateString(); this.lblshuoming.Text = dataTable.Rows[0]["Maindescripe"].ToString(); this.lblRemark.Text = dataTable.Rows[0]["Remark"].ToString(); this.Literal1.Text = FileView.FilesBind(1720, dataTable.Rows[0]["FlowGuid"].ToString()); this.DDTClass.SelectedValue = dataTable.Rows[0]["filesType"].ToString(); if (dataTable.Rows[0]["mark"].ToString().Equals("2")) { this.TrGDType.Attributes.Add("style", "display:none;"); } else { this.TrGDType.Attributes.Add("style", "display:block;"); } this.lblmarkType.Text = this.DDTClass.SelectedItem.Text.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { com.jwsoft.pm.entpm.PageHelper.BindDropDownTree(this.DDTClass, 20, true); this._Type = base.Request.QueryString["Type"].ToString(); this._PrjCode = base.Request.QueryString["pc"].ToString(); this._PrjName = base.Request.QueryString["pn"].ToString(); this._Id = base.Request.QueryString["Id"].ToString(); this.ViewState["TYPE"] = this._Type; this.hdnType.Value = this._Type; this.ViewState["PRJCODE"] = this._PrjCode; this.ViewState["PRJNAME"] = this._PrjName; this.HdnPc.Value = this._PrjCode; this.ViewState["ID"] = this._Id; this.FileLink1.MID = 1720; if (this._Type == "Upd") { this.FileLink1.Type = 1; this.GetConOrgInfoOfUpd(this._Id); this.HdnFileId.Value = this._Id; } else { if (this._Type == "Add") { this.TxtUnit.Text = userManageDb.GetCurrentUserInfo().UserDepartName; this.TxtPrjName.Text = this._PrjName; this.DateWeave.Text = DateTime.Now.ToShortDateString(); this.TxtWeave.Value = userManageDb.GetCurrentUserInfo().UserName; this.ViewState["RecordId"] = ConstructOrganizeAction.GetMaxId().ToString(); this.HdnFileId.Value = ConstructOrganizeAction.GetMaxId().ToString(); this._RecordId = this.ViewState["RecordId"].ToString(); this.hdnFlowGuid.Value = Guid.NewGuid().ToString(); this.FileLink1.Type = 1; } else { if (this._Type == "View") { this.FileLink1.Type = 0; this.BtnSave.Visible = false; this.SetControl(); this.GetConOrgInfoOfUpd(this._Id); this.HdnFileId.Value = this._Id; this.btnClose.Value = "关 闭"; } } } } else { this._Type = this.ViewState["TYPE"].ToString(); if (this._Type == "Add") { this._PrjCode = this.ViewState["PRJCODE"].ToString(); this._PrjName = this.ViewState["PRJNAME"].ToString(); this._RecordId = this.ViewState["RecordId"].ToString(); } else { if (this._Type == "Upd") { this._Id = this.ViewState["ID"].ToString(); } else { if (this._Type == "View") { this._Id = this.ViewState["ID"].ToString(); } } } } this.FileLink1.FID = this.hdnFlowGuid.Value.Trim(); }