Example #1
0
        public static List <VehicleSearch> getvehiclelist(string[] id)//shows checked records
        {
            Customer_Vehicle_Booking1 cvb = new Customer_Vehicle_Booking1();
            var e = (from l in v.VehicleSearches
                     where id.Contains(l.Vehicle_Code) == true
                     select l).ToList();


            return(e);
        }
Example #2
0
        public static string BAapprove(string cstatus, int bookingid)//BA approve customer reuquests
        {
            var b = from cl in v.Customer_Vehicle_Booking1
                    where cl.Booking_id == bookingid
                    select cl;
            Customer_Vehicle_Booking1 cvb = (Customer_Vehicle_Booking1)b.FirstOrDefault();

            cvb.Status = cstatus;
            v.SaveChanges();
            return("APPROVED");
        }
 public static string BAapprove(string cstatus, int bookingid)//BA approve customer reuquests
 {
     try
     {
         var b = from cl in v.Customer_Vehicle_Booking1
                 where cl.Booking_id == bookingid
                 select cl;
         Customer_Vehicle_Booking1 cvb = (Customer_Vehicle_Booking1)b.FirstOrDefault();
         cvb.Status = cstatus;
         v.SaveChanges();
         return("Approved Successfully");
     }
     catch (Exception) { }
     return(null);
 }
Example #4
0
        public static string GoToBAdmin(List <VehicleSearch> vs, string cid, string status)//adding confirmed records to Customer_Vehicle_Booking table
        {
            Customer_Vehicle_Booking1 cvb1 = new Customer_Vehicle_Booking1();

            foreach (var item in vs)
            {
                cvb1.Branch_Location = item.Branch_Location;

                cvb1.Vehicle_id = item.Vehicle_Code;

                cvb1.Customer_id = cid;
                cvb1.Status      = status;
                v.Customer_Vehicle_Booking1.Add(cvb1);
                v.SaveChanges();
            }
            return("Thank You for booking! You can see your booking status here!");
        }