public void LoadComments(int AccID) { LoanAccountDSTableAdapters.AccountCommentTableAdapter accComment = new LoanAccountDSTableAdapters.AccountCommentTableAdapter(); LoanAccountDS.AccountCommentDataTable tblAccComment = accComment.GetAccountComment(AccID); foreach (LoanAccountDS.AccountCommentRow r in tblAccComment) { 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><i><b> " + r.datUser.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 LoadComments(int AccID) { LoanAccountDSTableAdapters.AccountCommentTableAdapter accComment = new LoanAccountDSTableAdapters.AccountCommentTableAdapter(); LoanAccountDS.AccountCommentDataTable tblAccComment = accComment.GetAccountComment(AccID); foreach (LoanAccountDS.AccountCommentRow r in tblAccComment) { 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><i><b> " + r.datUser.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 btnSaveComments_Click(object sender, EventArgs e) { if (Page.IsValid) { try { LoanAccountDSTableAdapters.AccountCommentTableAdapter accComment = new LoanAccountDSTableAdapters.AccountCommentTableAdapter(); accComment.InsertAccountComment(txtComment.Value.Trim(), Convert.ToInt32(MySessionManager.AccountID), MySessionManager.CurrentUser.UserID); } catch (Exception ex) { } } }
protected void btnSaveComments_Click(object sender, EventArgs e) { if (Page.IsValid) { try { LoanAccountDSTableAdapters.AccountCommentTableAdapter accComment = new LoanAccountDSTableAdapters.AccountCommentTableAdapter(); accComment.InsertAccountComment(txtComment.Value.Trim(), Convert.ToInt32(MySessionManager.AccountID), MySessionManager.CurrentUser.UserID); } catch (Exception ex) { } } }
public void LoadComments(int AccID) { LoanAccountDSTableAdapters.AccountCommentTableAdapter accComment = new LoanAccountDSTableAdapters.AccountCommentTableAdapter(); LoanAccountDS.AccountCommentDataTable tblAccComment = accComment.GetAccountComment(AccID); foreach (LoanAccountDS.AccountCommentRow r in tblAccComment) { HtmlGenericControl myp = new HtmlGenericControl("p"); HtmlGenericControl mypMessage = new HtmlGenericControl("div"); HtmlGenericControl myDiv = new HtmlGenericControl("div"); myDiv.Attributes["class"] = ""; myp.InnerHtml = "<h6>" + r.datUser.ToString() + "'s Comment on" + r.modifiedDate.ToLongDateString() + "</h6>"; mypMessage.InnerText = r.datDescription.ToString(); Literal myLine = new Literal(); myLine.Text = "<hr/><br/>"; myDiv.Controls.Add(myp); myDiv.Controls.Add(myLine); myDiv.Controls.Add(mypMessage); myDiv.Controls.Add(myLine); // this.Comments.Controls.Add(myDiv); } }
public void LoadComments(int AccID) { LoanAccountDSTableAdapters.AccountCommentTableAdapter accComment = new LoanAccountDSTableAdapters.AccountCommentTableAdapter(); LoanAccountDS.AccountCommentDataTable tblAccComment = accComment.GetAccountComment(AccID); foreach (LoanAccountDS.AccountCommentRow r in tblAccComment) { HtmlGenericControl myp = new HtmlGenericControl("p"); HtmlGenericControl mypMessage = new HtmlGenericControl("div"); HtmlGenericControl myDiv = new HtmlGenericControl("div"); myDiv.Attributes["class"] = ""; myp.InnerHtml = "<h6>" + r.datUser.ToString()+"'s Comment on"+ r.modifiedDate.ToLongDateString() + "</h6>"; mypMessage.InnerText=r.datDescription.ToString(); Literal myLine = new Literal(); myLine.Text = "<hr/><br/>"; myDiv.Controls.Add(myp); myDiv.Controls.Add(myLine); myDiv.Controls.Add(mypMessage); myDiv.Controls.Add(myLine); // this.Comments.Controls.Add(myDiv); } }