protected void lbtnAddMessage_Click(object sender, EventArgs e) { AddMessage("You", txtMessage.InnerText, System.DateTime.Now.ToString()); if (txtMessage.InnerText.Trim() != "") { TMSLibrary.Message objMsg = new TMSLibrary.Message(); objMsg.BookingId = _bookingId; //getting Transporter Id from FormView Control objMsg.ToId = Convert.ToInt32(((Label)(FrmTransporterDetails.FindControl("lblTransporterId"))).Text); objMsg.FromId = ((User)Session["userinfo"]).UserId; objMsg.Messagee = txtMessage.InnerText.Trim(); TMSLibrary.MessageMethods.AddMessage(objMsg); txtMessage.InnerText = ""; } else { ScriptManager.RegisterStartupScript(this, GetType(), "popup", "alert(Please Enter Message);", true); return; } }
protected void btnAddMessage_Click(object sender, EventArgs e) { if (txtMessage.Text.Trim() != "") { TMSLibrary.Message objMsg = new TMSLibrary.Message(); objMsg.BookingId = Convert.ToInt16(_bookingId); //getting Transporter Id from FormView Control objMsg.ToId = Convert.ToInt32(((Label)(FrmTransporterDetails.FindControl("lblTransporterId"))).Text); objMsg.FromId = ((User)Session["userinfo"]).UserId; objMsg.Messagee = txtMessage.Text.Trim(); TMSLibrary.MessageMethods.AddMessage(objMsg); fillMessage(); txtMessage.Text = ""; MakeGridResponsible(); } else { ValidatePopup("Please Enter Message"); return; } }
protected void btnAddMessage_Click(object sender, EventArgs e) { if (txtMessage.Text.Trim() != "") { TMSLibrary.Message objMsg = new TMSLibrary.Message(); objMsg.BookingId = Convert.ToInt16(ValueHiddenField.Value); //getting Transporter Id from FormView Control objMsg.ToId = Convert.ToInt32(((Label)(FrmCustomerDetails.FindControl("lblCustomerId"))).Text); objMsg.FromId = ((User)Session["userinfo"]).UserId; objMsg.Messagee = txtMessage.Text.Trim(); TMSLibrary.MessageMethods.AddMessage(objMsg); fillMessage(); txtMessage.Text = ""; ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "ShowModal()", true); makeGridResponsible(); grdNoteResponsible(); } else { ValidatePopup("Please Enter Message"); return; } }