protected void btnsubmit_Click(object sender, EventArgs e) { try { Forum_BAL frmbal = new Forum_BAL(); Forum forum = new Forum(); string post; int postedby; post = DDLsubject.SelectedItem.ToString() + txtDesc.Text; postedby = AppSessions.StudentID; forum.Post = post; forum.PostedBy = postedby; frmbal.Forum_Insert(forum); Resetcontrols(); } catch (Exception ex) { WebMsg.Show(ex.Message); } finally { WebMsg.Show("Will getback shortly!!!"); } }
private void BindPostGrid() { oForum = new Forum(); oForum_BAL = new Forum_BAL(); DataSet ods = oForum_BAL.Forum_Select_All(oForum); GridViewOperations GrvOperation = new GridViewOperations(); GrvOperation.BindGridWithSorting(this.GvPost, ods, this.SortField, this.SortDirection); }
protected void btnpost_Click(object sender, EventArgs e) { oForum_BAL = new Forum_BAL(); oForum = new Forum(); oForum.Post = TxtForum.Value; oForum.PostedBy = AppSessions.StudentID; bool IsInsert = oForum_BAL.Forum_Insert(oForum); if (IsInsert) { WebMsg.Show("Post has been created successfully."); ResetControl(); } else { WebMsg.Show("There is some problem to create post, please try again."); } }