public IEnumerable <Order> Closed(string login) { FrontPad frontPad = new FrontPad(login, "10"); List <Order> list = frontPad.Parse(); return(list); }
public IEnumerable <Order> Empty() { FrontPad frontPad = new FrontPad("", "4"); List <Order> list = frontPad.Parse(); return(list); }
public IEnumerable <Order> Active(string login) { FrontPad frontPad = new FrontPad(login, "12"); List <Order> list = frontPad.Parse(); foreach (var elem in list) { if (!SmsExists(Convert.ToInt32(elem.id), elem.phone)) { string phone = elem.phone; phone = phone.Substring(1); string s = elem.id.Substring(elem.id.Length - 4); int i = Convert.ToInt32(s); int code = 9999 - i; SmsService.sendSms("7" + phone, code.ToString()); Sm sms = new Sm(); sms.orderid = Convert.ToInt32(elem.id); sms.phone = elem.phone; db.Sms.Add(sms); db.SaveChanges(); } } return(list); }