Пример #1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            lblSuccess.Text = "";
            job             = (DbJob)Session["Job"];
            int  jobId     = job.JobId;
            Guid sessionId = (Guid)Session["sessionId"];

            if (service.AddComment(jobId, sessionId, txtComment.Text) == true)
            {
                lblSuccess.Text   = "Your comment has been successfully added";
                lblError.Text     = "";
                pnlAddCom.Visible = false;
                txtComment.Text   = "";
                dt = ToDataTable <DbComments>(service.ViewComments(job.JobId).ToList());
                dt.Columns.Remove("CommentId");
                dt.Columns.Remove("JobId");

                gvComments.DataSource = dt;
                gvComments.DataBind();
            }
            else
            {
                lblError.Text = "Something went wrong! Please try again";
            }
        }
Пример #2
0
 private void btnAddCom_Click(object sender, EventArgs e)
 {
     service.AddComment(jobId, sessionId, txtComment.Text);
     FilldgvComments();
     txtComment.Text = "";
     lblMessage.Text = "You comment has been successfully added";
     panel2.Visible  = false;
 }
Пример #3
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            lblSuccess.Text = "";
            jobId           = int.Parse(Session["jobId"].ToString());
            Guid sessionId = (Guid)Session["sessionId"];

            if (service.AddComment(jobId, sessionId, txtComment.Text) == true)
            {
                lblSuccess.Text   = "Your comment has been successfully added";
                lblError.Text     = "";
                pnlAddCom.Visible = false;
                txtComment.Text   = "";
                BindCommentData(jobId);
            }
            else
            {
                lblError.Text   = "Something went wrong! Please try again";
                lblSuccess.Text = "";
            }
        }