Пример #1
0
        public ActionResult Edit(HotelOtherService_model cat)
        {
            HotelOtherService tblcat = db.HotelOtherServices.Where(x => x.OtherServiceID == cat.OtherServiceID).Single <HotelOtherService>();

            tblcat.TexiService = cat.TexiService;
            tblcat.HotelID     = Convert.ToInt32(Session["HotelId"]);

            tblcat.PickupPlace      = cat.PickupPlace;
            tblcat.DestinationPlace = cat.DestinationPlace;
            tblcat.VehicleType      = cat.VehicleType;
            db.SubmitChanges();
            return(View());
        }
Пример #2
0
        public ActionResult Edit(int id)
        {
            HotelOtherService_model cat = db.HotelOtherServices.Where(x => x.OtherServiceID == id).Select(x => new HotelOtherService_model()
            {
                OtherServiceID   = x.OtherServiceID,
                HotelID          = x.HotelID,
                TexiService      = x.TexiService,
                PickupPlace      = x.PickupPlace,
                DestinationPlace = x.DestinationPlace,
                VehicleType      = x.VehicleType,
            }).SingleOrDefault();

            return(View(cat));
        }
Пример #3
0
        public ActionResult HotelOtherService(HotelOtherService_model cat)
        {
            HotelOtherService tblcat = new HotelOtherService();

            tblcat.HotelID     = Convert.ToInt32(Session["HotelId"]);
            tblcat.TexiService = cat.TexiService;

            tblcat.PickupPlace      = cat.PickupPlace;
            tblcat.DestinationPlace = cat.DestinationPlace;
            tblcat.VehicleType      = cat.VehicleType;
            db.HotelOtherServices.InsertOnSubmit(tblcat);
            db.SubmitChanges();
            return(View());
        }