Exemplo n.º 1
0
        private void btnSendSMS_Click(object sender, System.EventArgs e)
        {
            btnSendSMS.Enabled = false;
            int totalsend = 0;
            List <SMS_Model> sms_list_recepient = list_recepient.Where(x => x.IS_Send == 0).ToList();

            string sms_api_response = string.Empty;

            foreach (SMS_Model item in sms_list_recepient)
            {
                totalsend++;
                sms_api_response = SMS_Service_API.Send_SMS_Service(item.Mobile_Number, item.Message_Text);

                if (sms_api_response == "S")
                {
                    sms_repository.Update_SMS_Status_All_Class(item.SMS_ID);
                }
            }

            if (totalsend > 0)
            {
                Message_PopUp.Show_Success_Message("SMS Successfully Send ");
            }

            bind_Grid();

            Check_SMS_Balance();
        }
Exemplo n.º 2
0
        private void btnGenerateNumber_Click(object sender, System.EventArgs e)
        {
            if (string.IsNullOrEmpty(txt_message_text.Text))
            {
                Message_PopUp.Show_Error_Message("Please Enter Message Text");
            }
            else
            {
                string result = sms_repository.Construct_SMS_All_Class(txt_message_text.Text);

                if (result == "ARGEN001")
                {
                    Message_PopUp.Show_Error_Message("Already Constructed.");
                }
                if (result == "S")
                {
                    Message_PopUp.Show_Success_Message("Message Constructed.");
                }
            }
            bind_Grid();
        }