Ejemplo n.º 1
0
        private void btnSendSms_Click(object sender, System.EventArgs e)
        {
            try
            {
                var list = new List <Guid>();
                for (var i = 0; i < DGrid.RowCount; i++)
                {
                    if ((bool)DGrid[dgIsChecked.Index, i].Value)
                    {
                        list.Add((Guid)DGrid[dgGuid.Index, i].Value);
                    }
                }

                if (list.Count <= 0)
                {
                    for (var i = 0; i < DGrid.RowCount; i++)
                    {
                        list.Add((Guid)DGrid[dgGuid.Index, i].Value);
                    }
                }

                var frm = new frmSendSms(list, Settings.Classes.clsGlobal.BirthDayText);
                frm.ShowDialog(this);
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }
Ejemplo n.º 2
0
 private void 短信发送ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dgvShowOrders.CurrentRow != null)
     {
         string moblePhone, customerName, customerNo, content;
         customerNo   = dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[1];
         customerName = string.IsNullOrEmpty(dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[3]) ? dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[2] : dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[3];
         moblePhone   = string.IsNullOrEmpty(dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[5]) ? dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[4] : dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[5];
         //发送短信内容
         content = @"尊敬的";
         if (!string.IsNullOrEmpty(dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[2]))
         {
             content += dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[2] + @"先生、";
         }
         if (!string.IsNullOrEmpty(dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[3]))
         {
             content += dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[3] + @"女士";
         }
         content += ":您好!我是金夫人嫁衣馆礼服师" + dgvShowOrders.Columns[dgvShowOrders.CurrentCell.ColumnIndex].HeaderText + @",你预约的挑选婚礼当天婚纱时间是" + dtpDate.Value.ToLongDateString() + dgvShowOrders.CurrentCell.Tag.ToString().Split(',')[8] + ",请准时到达,感谢您的支持与配合,解放碑不好停车,最好是选择轻轨或公交出行,以免耽搁你的时间,谢谢。";
         if (string.IsNullOrEmpty(moblePhone))
         {
             MessageBox.Show(@"手机号码无效,检查后重试!");
             return;
         }
         List <string> customerInfo = new List <string>();
         customerInfo.Add(customerNo);
         customerInfo.Add(customerName);
         customerInfo.Add(moblePhone);
         customerInfo.Add(content);
         frmSendSms frmSendSms = new frmSendSms(customerInfo);
         frmSendSms.ShowDialog();
     }
 }
Ejemplo n.º 3
0
 private void 短信发送ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dgvOrders.CurrentRow != null)
     {
         string moblePhone, customerName, customerNo;
         customerNo = dgvOrders.CurrentRow.Cells["CustomerNO"].Value.ToString();
         if (string.IsNullOrEmpty(dgvOrders.CurrentRow.Cells["CustomerName2"].Value.ToString()))
         {
             customerName = dgvOrders.CurrentRow.Cells["CustomerName1"].Value.ToString();
         }
         else
         {
             customerName = dgvOrders.CurrentRow.Cells["CustomerName2"].Value.ToString();
         }
         if (string.IsNullOrEmpty(dgvOrders.CurrentRow.Cells["MobilePhone2"].Value.ToString()))
         {
             moblePhone = dgvOrders.CurrentRow.Cells["MobilePhone1"].Value.ToString();
         }
         else
         {
             moblePhone = dgvOrders.CurrentRow.Cells["MobilePhone2"].Value.ToString();
         }
         if (string.IsNullOrEmpty(moblePhone))
         {
             MessageBox.Show(@"手机号码无效,检查后重试!");
             return;
         }
         List <string> customerInfo = new List <string>();
         customerInfo.Add(customerNo);
         customerInfo.Add(customerName);
         customerInfo.Add(moblePhone);
         frmSendSms frmSendSms = new frmSendSms(customerInfo);
         frmSendSms.ShowDialog();
     }
 }
Ejemplo n.º 4
0
 private void btnSendSms_Click(object sender, EventArgs e)
 {
     try
     {
         var frm = new frmSendSms();
         frm.ShowDialog(this);
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }
Ejemplo n.º 5
0
        private void mnuMostajerSms_Click(object sender, EventArgs e)
        {
            try
            {
                if (DGrid.RowCount <= 0)
                {
                    return;
                }
                if (DGrid.CurrentRow == null)
                {
                    return;
                }
                var list = new List <Guid> {
                    (Guid)DGrid[dgSSideGuid.Index, DGrid.CurrentRow.Index].Value
                };

                var frm = new frmSendSms(list, "");
                frm.ShowDialog(this);
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }
Ejemplo n.º 6
0
 private void btnSMS_Click(object sender, EventArgs e)
 {
     frmSendSms sms = new frmSendSms(frmControler.CurrentPatient, Config.CompanyId);
     sms.ShowDialog();
 }