public static DataTable UpdateWaitingSendSms(string idGrp, int waiting) { if (idGrp != "" && idGrp != null) { return(SendSmsContactDAO.UpdateWaitingSendSms(idGrp, waiting)); } return(null); }
public static bool CheckSendedSmsToday(string idGrp) { DataTable dt; dt = SendSmsContactDAO.CheckSendedSms(idGrp); if (dt != null && dt.Rows.Count > 0) { return(true); } return(false); }
public static DataTable InsertSendSms(string idGrp) { DataTable DtInsert = null; if (idGrp != "" && idGrp != null && !(CheckSendedSmsToday(idGrp))) { DataTable dtOs; dtOs = ContactBuisnes.GetConatctOstads(idGrp); if (dtOs != null && dtOs.Rows.Count > 0) { string persianDate = DatePersian.GetDateNow(); string Time = DatePersian.GetTimeNow12(); string fullNameSt = ContactBuisnes.FullNameSt(idGrp); string textMsg = TextLogSms.GetTextLogSms(fullNameSt, idGrp); DtInsert = SendSmsContactDAO.InsertLogSms(fullNameSt, idGrp, persianDate, Time, textMsg, CheckTimeSendSms()); if (CheckTimeSendSms()) { SendSmsOS(dtOs, textMsg); } } } return(DtInsert); }
public static DataTable GetlogsNotSendSms(string idGrp = "-1") { const int waiting = 0; return(SendSmsContactDAO.SelectLogSms(idGrp, waiting)); }