Beispiel #1
0
 public static List<SelectListItem> PriceHeaders()
 {
     using (var context = new EpiContext())
     {
         return context.PriceHeaders.Select(x => new SelectListItem
         {
             Text = x.PriceDescrip,
             Value = x.PriceHeaderId.ToString()
         }).ToList();
     }
 }
Beispiel #2
0
 public static List<SelectListItem> BodyPartsLookup()
 {
     using (var context = new EpiContext())
     {
         return context.BodyParts.Select(x => new SelectListItem
         {
             Text = x.BodyPartDescrip,
             Value = x.BodyPartId.ToString()
         }).ToList();
     }
 }
Beispiel #3
0
 public static List<SelectListItem> CustomersLookup()
 {
     using (var context = new EpiContext())
     {
         return context.Customers.Select(x => new SelectListItem
         {
             Text = x.FullName,
             Value = x.CustomerId.ToString()
         }).ToList();
     }
 }
Beispiel #4
0
 public static List <SelectListItem> PriceHeaders()
 {
     using (var context = new EpiContext())
     {
         return(context.PriceHeaders.Select(x => new SelectListItem
         {
             Text = x.PriceDescrip,
             Value = x.PriceHeaderId.ToString()
         }).ToList());
     }
 }
Beispiel #5
0
 public static List <SelectListItem> BodyPartsLookup()
 {
     using (var context = new EpiContext())
     {
         return(context.BodyParts.Select(x => new SelectListItem
         {
             Text = x.BodyPartDescrip,
             Value = x.BodyPartId.ToString()
         }).ToList());
     }
 }
Beispiel #6
0
 public static List <SelectListItem> CustomersLookup()
 {
     using (var context = new EpiContext())
     {
         return(context.Customers.Select(x => new SelectListItem
         {
             Text = x.FullName,
             Value = x.CustomerId.ToString()
         }).ToList());
     }
 }
Beispiel #7
0
        public static object CustomerFilter(string term)
        {
            using (var context = new EpiContext())
            {
                var result = context.Customers.Where(x => x.FullName.Contains(term)).Select(x => new
                {
                    id = x.CustomerId,
                    text = x.FullName
                }).ToList();

                result.Add(new { id = -1, text = "ახლის დამატება" });

                return result;
            }
        }
Beispiel #8
0
        public static object CustomerFilter(string term)
        {
            using (var context = new EpiContext())
            {
                var result = context.Customers.Where(x => x.FullName.Contains(term)).Select(x => new
                {
                    id   = x.CustomerId,
                    text = x.FullName
                }).ToList();

                result.Add(new { id = -1, text = "ახლის დამატება" });

                return(result);
            }
        }