protected void BtnDel_Click(object sender, EventArgs e) { if (ProjectOverAction.DelDocument(new Guid(this.HdnDocCode.Value)) == 1) { this.JS.Text = "alert('删除成功!');parent.frames[1].location = 'DocumentAdd.aspx?pc=" + this.ProjectCode + "&allowadd=1'"; this.DgdDocument_Bind(); return; } this.JS.Text = "alert('删除失败!');"; }
private void RestoreDocumentInfo(Guid docCode) { ProjectDocumentInfo oneDocumentInfo = ProjectOverAction.GetOneDocumentInfo(docCode); this.HdnDocCode.Value = oneDocumentInfo.DocumentCode.ToString(); this.HdnProjectCode.Value = oneDocumentInfo.ProjectCode.ToString(); this.TxtDocumentName.Text = oneDocumentInfo.DocumentName; this.TxtFileCode.Text = oneDocumentInfo.FileCode; this.TxtRollCode.Text = oneDocumentInfo.RollCode; this.TxtStorage.Text = oneDocumentInfo.Storage; this.TxtRemark.Text = oneDocumentInfo.Remark; this.DDTClass.SelectedValue = oneDocumentInfo.ClassCode.ToString(); }
private void RestoreDocumentInfo(Guid docCode) { if (docCode != Guid.Empty) { ProjectDocumentInfo oneDocumentInfo = ProjectOverAction.GetOneDocumentInfo(docCode); this.LblDocumentName.Text = oneDocumentInfo.DocumentName; this.LblFileCode.Text = oneDocumentInfo.FileCode; this.LblRollCode.Text = oneDocumentInfo.RollCode; this.LblStorage.Text = oneDocumentInfo.Storage; this.LblRemark.Text = oneDocumentInfo.Remark; this.LblClass.Text = com.jwsoft.pm.entpm.PageHelper.QueryBasicCode(this, "DocumentType", 20, oneDocumentInfo.ClassCode); this.dgdAnnex_Bind(this.DocumentCode, 0, 26); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { if (base.Request["prjId"] == null) { this.JS.Text = "alert('参数错误!');"; } else { this.ProjectCode = base.Request["prjId"]; } com.jwsoft.pm.entpm.PageHelper.BindDropDownTree(this.DDTClass, 20); this.SqlWhere = ProjectOverAction.GetSqlWhere(this.ProjectCode, 0, "", 9999); this.DgdDocument_Bind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { if (base.Request["prjId"] == null) { this.JS.Text = "alert('参数错误!');"; } else { this.ProjectCode = base.Request["prjId"]; } com.jwsoft.pm.entpm.PageHelper.BindDropDownTree(this.DDTClass, 20); this.SqlWhere = ProjectOverAction.GetSqlWhere(this.ProjectCode, 0, "", 9999); this.DgdDocument_Bind(); this.BtnDel.Attributes["onclick"] = "if (!confirm('你确定要删除选定的记录吗?')){return false;}"; } }
protected void BtnSave_Click(object sender, EventArgs e) { if (ProjectOverAction.UpdDocument(new ProjectDocumentInfo { DocumentCode = new Guid(this.DocumentCode), ProjectCode = new Guid(this.HdnProjectCode.Value), ClassCode = Convert.ToInt32(this.DDTClass.SelectedValue.Trim()), DocumentName = this.TxtDocumentName.Text.Trim(), FileCode = this.TxtFileCode.Text.Trim(), RollCode = this.TxtRollCode.Text.Trim(), Storage = this.TxtStorage.Text.Trim(), Remark = this.TxtRemark.Text.Trim(), State = 0, AddDate = DateTime.Today }) == 1) { base.RegisterScript("top.ui.tabSuccess({ parentName: '_documentlist' });"); return; } base.RegisterScript("top.ui.alert('添加失败!');"); }
protected void BtnSave_Click(object sender, EventArgs e) { ProjectDocumentInfo projectDocumentInfo = new ProjectDocumentInfo(); projectDocumentInfo.DocumentCode = Guid.NewGuid(); projectDocumentInfo.ProjectCode = new Guid(this.ProjectCode); projectDocumentInfo.ClassCode = Convert.ToInt32(this.DDTClass.SelectedValue.Trim()); projectDocumentInfo.DocumentName = this.TxtDocumentName.Text.Trim(); projectDocumentInfo.FileCode = this.TxtFileCode.Text.Trim(); projectDocumentInfo.RollCode = this.TxtRollCode.Text.Trim(); projectDocumentInfo.Storage = this.TxtStorage.Text.Trim(); projectDocumentInfo.Remark = this.TxtRemark.Text.Trim(); projectDocumentInfo.State = 0; projectDocumentInfo.AddDate = DateTime.Today; if (ProjectOverAction.AddDocument(projectDocumentInfo) == 1) { base.RegisterScript("top.ui.tabSuccess({ parentName: '_documentlist' });"); } else { base.RegisterScript("top.ui.alert('添加失败!');"); } this.HdnDocCode.Value = projectDocumentInfo.DocumentCode.ToString(); }
protected void btnSearch_Click(object sender, EventArgs e) { this.SqlWhere = ProjectOverAction.GetSqlWhere(this.ProjectCode, Convert.ToInt32(this.DDLTerm.SelectedValue), this.TxtTerm.Text.Trim(), Convert.ToInt32(this.DDTClass.SelectedValue.Trim())); this.DgdDocument_Bind(); }
private void DgdDocument_Bind() { this.DgdDocument.DataSource = ProjectOverAction.QueryProjectDocumentList(this.SqlWhere); this.DgdDocument.DataBind(); }