void SMSJob_Click(object sender, EventArgs e)
        {
            try
            {
                long jobId = grdLister.CurrentRow.Cells["Id"].Value.ToLong();



                if (jobId > 0)
                {
                    Booking objJob = General.GetObject <Booking>(c => c.Id == jobId);
                    if (objJob != null)
                    {
                        frmSMSAll frmSMS = new frmSMSAll("", GetMessage(AppVars.objPolicyConfiguration.DespatchTextForDriver.ToStr(), objJob), objJob.SMSType.ToInt());

                        frmSMS.StartPosition = FormStartPosition.CenterScreen;
                        frmSMS.ShowDialog();

                        Thread.Sleep(500);
                        frmSMS.Dispose();
                    }
                }
            }
            catch (Exception ex)
            {
                ENUtils.ShowMessage(ex.Message);
            }
        }
Exemple #2
0
        private void SMSMessage()
        {
            try
            {
                if (ddl_Driver.SelectedValue == null)
                {
                    ENUtils.ShowMessage("Select any Driver");

                    return;
                }
                else
                {
                    int driverId = ddl_Driver.SelectedValue.ToInt();



                    string mobileNo = General.GetObject <Fleet_Driver>(c => c.Id == driverId).DefaultIfEmpty().MobileNo.ToStr();



                    frmSMSAll frm = new frmSMSAll(mobileNo);
                    frm.ShowDialog();
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemple #3
0
 void EditFareItem2_Click(object sender, EventArgs e)
 {
     try
     {
         if (grdLister.CurrentRow != null && grdLister.CurrentRow is GridViewDataRowInfo)
         {
             string    message = AppVars.objPolicyConfiguration.ArrivalBookingText.ToStr();
             frmSMSAll frm     = new frmSMSAll(grdLister.CurrentRow.Cells["MobileNo"].Value.ToStr(), message, 0);
             frm.ShowDialog();
             frm.Dispose();
         }
     }
     catch (Exception ex)
     {
         ENUtils.ShowMessage(ex.Message);
     }
 }
Exemple #4
0
        private void btnSMS_Click(object sender, EventArgs e)
        {
            try
            {
                List <string> objList = new List <string>();
                var           list    = (from a in grdLister.Rows
                                         select new {
                    MobileNo = a.Cells["MobileNo"].Value.ToStr()
                }).ToList();;
                for (int i = 0; i < list.Count; i++)
                {
                    objList.Add(list[i].MobileNo);
                }


                frmSMSAll frm = new frmSMSAll(objList);

                frm.ShowDialog();
            }
            catch (Exception ex)
            {
                throw;
            }
        }