Ejemplo n.º 1
0
 public void CreateRepairOrder(RepairOrder repairOrder)
 {
     using (FibrellaContext context = new FibrellaContext())
     {
         context.RepairOrders.Add(repairOrder);
         context.SaveChanges();
     }
 }
Ejemplo n.º 2
0
        public IList <RepairOrder> GetAllRepairOrders()
        {
            IList <RepairOrder> repairList = new List <RepairOrder>();

            using (FibrellaContext context = new FibrellaContext())
            {
                repairList = context.RepairOrders.ToList();
            }
            return(repairList);
        }
Ejemplo n.º 3
0
        public RepairOrder GetRepairOrder(string searchString)
        {
            RepairOrder repair = new RepairOrder();

            using (FibrellaContext context = new FibrellaContext())
            {
                long convertedSmne = Convert.ToInt64(searchString);
                repair = context.RepairOrders.FirstOrDefault(z => z.SMNE == convertedSmne);
            }
            return(repair);
        }