Esempio n. 1
0
 public static List <List <string> > FindLike(string infoStr)
 {
     return(DBController.SQLNonVoidCommand(
                $"SELECT * FROM Users " +
                $"WHERE id LIKE '%{infoStr}%' " +
                $"OR Name LIKE '%{infoStr}%' " +
                $"OR AccessLevel LIKE '%{infoStr}%'"));
 }
Esempio n. 2
0
        private static void FillEmployeeStatistic(string cashierName, long fromTime, long toTime)
        {
            List <Invoice> data = new List <Invoice>();
            var            info = DBController.SQLNonVoidCommand(
                $"SELECT Data FROM documents WHERE CashierName='{cashierName}' AND DateTime BETWEEN {fromTime} AND {toTime}");
            var jsons = info.Select(x => x.First()).ToList();

            foreach (var json in jsons)
            {
                data.Add(JsonConvert.DeserializeObject <Invoice>(json));
            }
            if (data.Count != 0)
            {
                ItemsPositions.Add(new EmployeeStatistic(data));
            }
        }