예제 #1
0
 private void panelSendSms_Click(object sender, EventArgs e)
 {
     var frm = new SendSMSfrm();
     frm.ShowDialog();
 }
예제 #2
0
        private void toolStripButtonSendMessage_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count < 1)
                return;

            var srNos = new List<long>();
            for (int i = 0; i < dataGridView1.SelectedRows.Count; i++)
            {
                srNos.Add(Convert.ToInt64(dataGridView1.SelectedRows[i].Cells["SrNo"].Value));
            }

            var candidates = _pagination.PageData.Where(x => srNos.Contains(x.SrNo)).ToList();

            var emptyMobileNos = candidates.Where(x => string.IsNullOrEmpty(x.Email)).Select(x => x.CompanyName).ToArray();
            if (emptyMobileNos.Any())
            {
                MessageBox.Show(string.Format("{0} Candidate don't have email id", string.Join(",", emptyMobileNos)), "Error Message", MessageBoxButtons.OK);
                return;
            }

            var contactDetail = candidates.Select(x => (IMobile)x);
            var frm = new SendSMSfrm(contactDetail);
            frm.ShowDialog();
        }
예제 #3
0
        private void sendMessageToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count < 1)
                return;

            var srNo = Convert.ToInt64(dataGridView1.SelectedRows[0].Cells["SrNo"].Value);
            var candidate = pagination.PageData.Single(x => x.SrNo == srNo);

            if (string.IsNullOrEmpty(candidate.MobileNo))
            {
                MessageBox.Show("Candidate don't have mobile number", "Error Message", MessageBoxButtons.OK);
                return;
            }

            var frm = new SendSMSfrm(candidate);
            frm.ShowDialog();
        }