protected void btnSend_Click(object sender, EventArgs e) { if (isValidate().Equals(true)) { if (grdEmployee.Items.Count > 0) { foreach (GridDataItem item in grdEmployee.Items) { var cb = (CheckBox)item.FindControl("cb_Select"); if (cb.Checked == true) { //string ContactNo = Convert.ToInt32(item["ComplaintID"].Text); string contactno = item["SMSNo"].Text; // contactno = "923343673008"; objBSS.SendSMS("External SMS", contactno, tbSMS.Text, 1); } } } } else { lblNotify.Text = "Either your message box is empty or none of the record is selected"; lblNotify.Visible = true; } }
protected void btnSend_Click(object sender, EventArgs e) { if (isValidate().Equals(true)) { objBSS.SendSMS("External SMS", tbMobileNo.Text, tbSMS.Text, 1); lblSave.Text = "Message send successfully"; lblSave.Visible = true; } else { lblSave.Text = "Either your message box or mobile no is not given"; lblSave.Visible = true; } }
protected void btnSendSMS_Click(object sender, EventArgs e) { try { if (gvComplainCircuits.Items.Count > 0) { foreach (GridDataItem item in gvComplainCircuits.Items) { var cb = (CheckBox)item.FindControl("cb_Select"); if (cb.Checked == true) { //string ContactNo = Convert.ToInt32(item["ComplaintID"].Text); string contactno = item["SMS"].Text; contactno = "923343673008"; objBSS.SendSMS("External SMS", contactno, "Test", 1); } } } } catch (Exception ex) { throw new Exception(ex.Message); } }