示例#1
0
        public ActionResult Delete(Int16 id)
        {
            HotelOtherService cat = db.HotelOtherServices.Where(x => x.OtherServiceID == id).Single <HotelOtherService>();

            db.HotelOtherServices.DeleteOnSubmit(cat);
            db.SubmitChanges();
            return(RedirectToAction("Index"));
        }
示例#2
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());
        }
示例#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());
        }