Beispiel #1
0
 protected void btnClearComments_Click(object sender, EventArgs e)
 {
     lblCommentsMessage.Text = string.Empty;
     txtComment.Text         = string.Empty;
     MPComments.Show();
     ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:count()", true);
 }
Beispiel #2
0
 protected void btnComment_Click(object sender, EventArgs e)
 {
     txtComment.Attributes.Add("maxlength", txtComment.MaxLength.ToString());
     lblCommentsMessage.Text = string.Empty;
     GetCommentsDetails();
     ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:count()", true);
     MPComments.Show();
 }
Beispiel #3
0
        protected void btnAddComments_Click(object sender, EventArgs e)
        {
            try
            {
                lblCommentsMessage.Text = string.Empty;
                if (txtComment.Text.Trim() == "")
                {
                    lblCommentsMessage.Text      = "Please Enter Comments";
                    lblCommentsMessage.ForeColor = Color.Red;
                }
                else
                {
                    SqlParameter[] param = new SqlParameter[]
                    {
                        new SqlParameter("@OPR", "9"),
                        new SqlParameter("@PlantCode", lblplantcode.Text),
                        new SqlParameter("@Line", lblline.Text),
                        new SqlParameter("@Date", lbldate.Text),
                        new SqlParameter("@ShiftCode", lblshift.Text),
                        new SqlParameter("@Comments", txtComment.Text.ToString().Trim()),
                        new SqlParameter("@CreatedBy", Convert.ToString(Session["username"]))
                    };
                    DBClass.ExecuteNonQuery_WithParam(param, "DM_SP_DML_DATA");

                    lblCommentsMessage.Text      = "Comments Saved Successfully.";
                    lblCommentsMessage.ForeColor = Color.Green;
                }
            }
            catch (Exception ex)
            {
                lblCommentsMessage.Text      = ex.Message.ToString();
                lblCommentsMessage.ForeColor = Color.Red;
                _logger.Error(string.Concat("btnAddComments_Click::", ex.Message), ex);
            }

            ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:count()", true);
            MPComments.Show();
        }