/// **************************************************************************** /// <summary> /// 数据加载 /// </summary> /// **************************************************************************** private void LoadData(bool Flag) { if (this.ApplicationCode != "") { BLL.DesignDocument cDesignDocument = new BLL.DesignDocument(); cDesignDocument.DesignDocumentCode = this.ApplicationCode; this.DocumentState = cDesignDocument.State; if (Flag) { this.txtTitle.Value = cDesignDocument.Title; this.txtProjectCode.InnerHtml = BLL.ProjectRule.GetProjectName(cDesignDocument.ProjectCode); this.txtUnitCode.Value = cDesignDocument.UnitCode; this.txtContext.Value = cDesignDocument.Context.Replace("\n", "<br>"); } else { this.tdTitle.InnerHtml = cDesignDocument.Title; this.tdProjectCode.InnerHtml = BLL.ProjectRule.GetProjectName(cDesignDocument.ProjectCode); this.tdUnitCode.InnerHtml = BLL.SystemRule.GetUnitName(cDesignDocument.UnitCode); this.tdContext.InnerHtml = cDesignDocument.Context; } } else { this.txtProjectCode.InnerHtml = BLL.ProjectRule.GetProjectName(this.ProjectCode); this.tdProjectCode.InnerHtml = BLL.ProjectRule.GetProjectName(this.ProjectCode); if (Flag) { //this.txtUnitCode.Value = cDesignDocument.UnitCode; } } }
/// **************************************************************************** /// <summary> /// 删除数据 /// </summary> /// **************************************************************************** public void Delete() { BLL.DesignDocument cDesignDocument = new BLL.DesignDocument(); cDesignDocument.DesignDocumentCode = this.ApplicationCode; cDesignDocument.dao = this.dao; cDesignDocument.DesignDocumentDelete(); }
/// **************************************************************************** /// <summary> /// 数据加载 /// </summary> /// **************************************************************************** private void LoadData() { try { BLL.DesignDocument cDesignDocument = new BLL.DesignDocument(); if (_DesignDocumentCode != null) { cDesignDocument.DesignDocumentCode = _DesignDocumentCode; } if (_Title != null) { cDesignDocument.Title = _Title; } if (_ProjectCode != null) { cDesignDocument.ProjectCode = _ProjectCode; } if (_UnitCode != null) { cDesignDocument.UnitCode = _UnitCode; } if (_Context != null) { cDesignDocument.Context = _Context; } if (_CreateDate != null) { cDesignDocument.CreateDate = _CreateDate; } if (_CreateUser != null) { cDesignDocument.CreateUser = _CreateUser; } if (_State != null) { cDesignDocument.State = _State; } if (_Flag != null) { cDesignDocument.Flag = _Flag; } if (_Type != null) { cDesignDocument.Type = _Type; } DataTable dt = cDesignDocument.GetDesignDocuments(); this.dgList.DataSource = dt; this.dgList.DataBind(); this.gpControl.RowsCount = dt.Rows.Count.ToString(); dt.Dispose(); } catch (Exception ex) { ApplicationLog.WriteLog(this.ToString(), ex, ""); } }
/// **************************************************************************** /// <summary> /// 提交数据 /// </summary> /// **************************************************************************** public void ConfirmData(bool flag,string Type) { BLL.DesignDocument cDesignDocument = new BLL.DesignDocument(); cDesignDocument.DesignDocumentCode = this.ApplicationCode; if (flag) { cDesignDocument.State = Type + "2"; } else { cDesignDocument.State = Type + "3"; } cDesignDocument.dao = this.dao; cDesignDocument.DesignDocumentSubmit(); }
/// **************************************************************************** /// <summary> /// 提交数据 /// </summary> /// **************************************************************************** public void SubmitData() { BLL.DesignDocument cDesignDocument = new BLL.DesignDocument(); cDesignDocument.DesignDocumentCode = this.ApplicationCode; cDesignDocument.Title = this.txtTitle.Value; cDesignDocument.ProjectCode = this.ProjectCode; cDesignDocument.UnitCode = this.txtUnitCode.Value; cDesignDocument.Context = this.txtContext.Value; cDesignDocument.CreateDate = DateTime.Now.ToString(); cDesignDocument.CreateUser = this.UserCode; cDesignDocument.State = this.DocumentState; cDesignDocument.Flag = this.DocumentFlag; cDesignDocument.dao = this.dao; cDesignDocument.DesignDocumentSubmit(); if (this.ApplicationCode == "") { this.ApplicationCode = cDesignDocument.DesignDocumentCode; this.AttachMentAdd1.SaveAttachMent(this.ApplicationCode); } }