public void loadAdvise() { usersTableAdapters.GetUserNameTableAdapter user = new usersTableAdapters.GetUserNameTableAdapter(); InvestmentDSTableAdapters.GetAdviseTableAdapter advise = new InvestmentDSTableAdapters.GetAdviseTableAdapter(); InvestmentDS.GetAdviseDataTable tblAdvise = advise.GetAdvise(MySessionManager.InvAppID, MySessionManager.ClientID); if (tblAdvise.Rows.Count > 0) { foreach (InvestmentDS.GetAdviseRow r in tblAdvise) { //txtDescription.Value = tblAdvise[0].datDescription.ToString(); HtmlGenericControl myp = new HtmlGenericControl("p"); HtmlGenericControl mypMessage = new HtmlGenericControl("blockquote"); HtmlGenericControl myDiv = new HtmlGenericControl("div"); myDiv.Attributes["class"] = " col-md-12 alert alert-info"; myDiv.Style["padding"] = "4px"; myp.InnerHtml = "<h5><span> Stage:" + r.datStage.ToString() + "</span><br/><i> <b> " + user.Getuser(r.userID).ToString() + "</b>'s comment on " + r.modifiedDate.ToLongDateString() + "</i></h5>" + "<hr style='margin:3px'/>"; mypMessage.Attributes["class"] = "text-justify"; mypMessage.InnerHtml = "<p>" + r.datDescription.ToString() + "</p>"; Literal myLine = new Literal(); myLine.Text = "<hr style='margin:3px'/><br/>"; myDiv.Controls.Add(myp); myDiv.Controls.Add(myLine); myDiv.Controls.Add(mypMessage); myDiv.Controls.Add(myLine); this.Comments.Controls.Add(myDiv); } } }
public void loadAdvise() { usersTableAdapters.GetUserNameTableAdapter user = new usersTableAdapters.GetUserNameTableAdapter(); InvestmentDSTableAdapters.GetAdviseTableAdapter advise = new InvestmentDSTableAdapters.GetAdviseTableAdapter(); InvestmentDS.GetAdviseDataTable tblAdvise =advise.GetAdvise(MySessionManager.InvAppID, MySessionManager.ClientID); if (tblAdvise.Rows.Count > 0) { foreach (InvestmentDS.GetAdviseRow r in tblAdvise) { //txtDescription.Value = tblAdvise[0].datDescription.ToString(); HtmlGenericControl myp = new HtmlGenericControl("p"); HtmlGenericControl mypMessage = new HtmlGenericControl("blockquote"); HtmlGenericControl myDiv = new HtmlGenericControl("div"); myDiv.Attributes["class"] = " col-md-12 alert alert-info"; myDiv.Style["padding"] = "4px"; myp.InnerHtml = "<h5><span> Stage:" + r.datStage.ToString() + "</span><br/><i> <b> " + user.Getuser(r.userID).ToString() +"</b>'s comment on " + r.modifiedDate.ToLongDateString() + "</i></h5>" + "<hr style='margin:3px'/>"; mypMessage.Attributes["class"] = "text-justify"; mypMessage.InnerHtml = "<p>" + r.datDescription.ToString() + "</p>"; Literal myLine = new Literal(); myLine.Text = "<hr style='margin:3px'/><br/>"; myDiv.Controls.Add(myp); myDiv.Controls.Add(myLine); myDiv.Controls.Add(mypMessage); myDiv.Controls.Add(myLine); this.Comments.Controls.Add(myDiv); } } }
protected void btnSave_Click(object sender, EventArgs e) { if (Page.IsValid) { InvestmentDSTableAdapters.GetAdviseTableAdapter advise = new InvestmentDSTableAdapters.GetAdviseTableAdapter(); //Invest.GetRiskReportDataTable tblRiskReport = riskRpt.GetRiskReport(MySessionManager.AppID, MySessionManager.ClientID); advise.InsertAdvise("Initial Interview", MySessionManager.ClientID, MySessionManager.InvAppID, txtDescription.Value.Trim(), MySessionManager.CurrentUser.UserID); this.editskip.Value = "1"; Response.Redirect(Request.RawUrl); } }
protected void btnSave_Click(object sender, EventArgs e) { if (Page.IsValid) { InvestmentDSTableAdapters.GetAdviseTableAdapter advise = new InvestmentDSTableAdapters.GetAdviseTableAdapter(); //Invest.GetRiskReportDataTable tblRiskReport = riskRpt.GetRiskReport(MySessionManager.AppID, MySessionManager.ClientID); advise.InsertAdvise("Initial Interview", MySessionManager.ClientID, MySessionManager.InvAppID, txtDescription.Value.Trim(), MySessionManager.CurrentUser.UserID); this.editskip.Value = "1"; Response.Redirect(Request.RawUrl); } }