try { bool pingResult = verificareInternet(); if (pingResult == true) { sendNotification[] dateNotificari = sendNotification.dateDeTrimisSms(); } }
internal static sendNotification[] dateDeTrimisSms() { Program.Connection.CommandText = "SELECT * FROM tabelanotificari"; DataTable dataFI = new DataTable(); Program.Connection.FillDataTable(dataFI, true); return InterogariDB.Lista<sendNotification>(dataFI, delegate(DataRow rezultatTB) { return new sendNotification(rezultatTB); }); }
class sendNotification { public string PhoneNumber1 { get; set; } public string PhoneNumber2 { get; set; } public string PhoneNumber3 { get; set; } public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } public string Name { get; set; } public int ContractId { get; set; } public string TelefonPc { get; set; } public string CNP { get; set; } public int status_notificari { get; set; } public DateTime data_notificari { get; set; } public int ultima_notificare { get; set; } public sendNotification(DataRow dateDeTrimisNotificari) { this.PhoneNumber1 = (string)dateDeTrimisNotificari["PhoneNumber1"]; this.PhoneNumber2 = (string)dateDeTrimisNotificari["PhoneNumber2"]; this.PhoneNumber3 = (string)dateDeTrimisNotificari["PhoneNumber3"]; this.StartDate = (DateTime)dateDeTrimisNotificari["StartDate"]; this.EndDate = (DateTime)dateDeTrimisNotificari["EndDate"]; this.Name = (string)dateDeTrimisNotificari["Name"]; this.ContractId = (int)dateDeTrimisNotificari["ContractId"]; this.TelefonPc = (string)dateDeTrimisNotificari["TelefonPc"]; this.CNP = (string)dateDeTrimisNotificari["CNP"]; } }
new OleDbDataAdapter(Command).Fill(Table);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)