Beispiel #1
0
        //המרה לDB
        public static TypesOfService ConvertionToTypesOfService(TypesOfService t)
        {
            TypesOfService newTypeOfServiceConvertion = new  TypesOfService();

            newTypeOfServiceConvertion.TypesOfServiceId   = t.TypesOfServiceId;
            newTypeOfServiceConvertion.TypesOfServiceName = t.TypesOfServiceName;
            return(newTypeOfServiceConvertion);
        }
Beispiel #2
0
        //המרה מDB
        public static typeOfServiceDto ConvertionToDto(TypesOfService t)
        {
            typeOfServiceDto newTypeOfServiceConvertion = new typeOfServiceDto();

            newTypeOfServiceConvertion.TypesOfServiceId   = t.TypesOfServiceId;
            newTypeOfServiceConvertion.TypesOfServiceName = t.TypesOfServiceName;
            return(newTypeOfServiceConvertion);
        }
Beispiel #3
0
        public ActionResult DeleteConfirmed(int id)
        {
            TypesOfService typesOfService = db.TypesOfServices.Find(id);

            db.TypesOfServices.Remove(typesOfService);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #4
0
 public ActionResult Edit([Bind(Include = "Id,Landscaping,SnowRemoval,Pavement,Exterior,Plumbing,Electrical,Appliances,Painting,General,HVAC,Roofing,Windows,Cleaning,Carpet,DrywallInsulation,Doors")] TypesOfService typesOfService)
 {
     if (ModelState.IsValid)
     {
         db.Entry(typesOfService).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(typesOfService));
 }
Beispiel #5
0
        // GET: TypesOfServices/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TypesOfService typesOfService = db.TypesOfServices.Find(id);

            if (typesOfService == null)
            {
                return(HttpNotFound());
            }
            return(View(typesOfService));
        }