public ActionResult Adding(LocationWithCityModel locationWithCityModel) { var city = new Citys { Id_City = locationWithCityModel.Id_City, City = locationWithCityModel.City, Street = locationWithCityModel.Street, Postal_Code = locationWithCityModel.Postal_Code, }; var locations = new Locations { Id_City = locationWithCityModel.Id_City, Id_Locations = locationWithCityModel.Id_Locations, Floor = locationWithCityModel.Floor, Room = locationWithCityModel.Room }; using (var ctx = new ResourcesServicesContext()) { ctx.City.Add(city); ctx.Location.Add(locations); ctx.SaveChanges(); } return(RedirectToAction("Index", "Location")); }
public ActionResult Index() { List <Citys> address = null; List <Locations> locationses = null; using (var ctx = new ResourcesServicesContext()) { address = ctx.City.ToList(); locationses = ctx.Location.ToList(); } var citywithadressquerry = from c in address join a in locationses on c.Id_City equals a.Id_City select new LocationWithCityModel { City = c.City, Street = c.Street, Postal_Code = c.Postal_Code, Floor = a.Floor, Room = a.Room }; var citywithadress = citywithadressquerry.ToList(); return(View(citywithadress)); }
public ActionResult Index() { List <Model_Equimpments> modelEquimpmentses = null; using (var ctx = new ResourcesServicesContext()) { modelEquimpmentses = ctx.Model_Equimpment.ToList(); } return(View(modelEquimpmentses)); }
public ActionResult Index() { List <Citys> address = null; using (var ctx = new ResourcesServicesContext()) { address = ctx.City.ToList(); } return(View(address)); }
public ActionResult Index() { List <Permissions> permision = null; using (var ctx = new ResourcesServicesContext()) { permision = ctx.Permission.ToList(); } return(View(permision)); }
public ActionResult Index() { List <Enities.Positions> positionses = null; using (var ctx = new ResourcesServicesContext()) { positionses = ctx.Position.ToList(); } return(View(positionses)); }
public ActionResult Editing(Positions posit_only1) { using (var ctx = new ResourcesServicesContext()) { var model_eq = ctx.Position.SingleOrDefault(x => x.Id_Position == posit_only1.Id_Position); model_eq.Position_name = posit_only1.Position_name; ctx.SaveChanges(); } return(RedirectToAction("Index", "Model_Equimpments")); }
public ActionResult Editing(Permissions permision_only) { using (var ctx = new ResourcesServicesContext()) { var model_eq = ctx.Permission.SingleOrDefault(x => x.Id_Permission == permision_only.Id_Permission); model_eq.Permission_Name = permision_only.Permission_Name; model_eq.Permission_Description = permision_only.Permission_Description; ctx.SaveChanges(); } return(RedirectToAction("Index", "Model_Equimpments")); }
public ActionResult Editing(Model_Equimpments model_only) { using (var ctx = new ResourcesServicesContext()) { var model_eq = ctx.Model_Equimpment.SingleOrDefault(x => x.Id_Model == model_only.Id_Model); model_eq.Mark = model_only.Mark; model_eq.Model = model_only.Model; ctx.SaveChanges(); } return(RedirectToAction("Index", "Model_Equimpments")); }
public ActionResult Editing(Citys city_only) { using (var ctx = new ResourcesServicesContext()) { var city = ctx.City.SingleOrDefault(x => x.Id_City == city_only.Id_City); city.City = city_only.City; city.Street = city_only.Street; city.Postal_Code = city_only.Postal_Code; ctx.SaveChanges(); } return(RedirectToAction("Index", "Adress")); }
public ActionResult Edit(int symbol) { Positions positions = null; using (var ctx = new ResourcesServicesContext()) { positions = ctx.Position.SingleOrDefault(x => x.Id_Position == symbol); } var posit_only = new Positions { Position_name = positions.Position_name, }; return(View(posit_only)); }
public ActionResult Edit(int symbol) { Model_Equimpments modelEquimpments = null; using (var ctx = new ResourcesServicesContext()) { modelEquimpments = ctx.Model_Equimpment.SingleOrDefault(x => x.Id_Model == symbol); } var model_only = new Model_Equimpments { Mark = modelEquimpments.Mark, Model = modelEquimpments.Model, }; return(View(model_only)); }
public ActionResult Edit(int symbol) { Permissions permissions = null; using (var ctx = new ResourcesServicesContext()) { permissions = ctx.Permission.SingleOrDefault(x => x.Id_Permission == symbol); } var permision_only = new Permissions { Permission_Name = permissions.Permission_Name, Permission_Description = permissions.Permission_Description, }; return(View(permision_only)); }
public ActionResult Addproccess(Positions positions) { var positiont = new Positions { Position_name = positions.Position_name, }; using (var ctx = new ResourcesServicesContext()) { ctx.Position.Add(positiont); ctx.SaveChanges(); } return(RedirectToAction("Index", "Positions")); }
public ActionResult Editing(LocationWithCityModel locationswithcity) { using (var ctx = new ResourcesServicesContext()) { var city = ctx.City.SingleOrDefault(x => x.Id_City == locationswithcity.Id_Locations); var locaiton = ctx.Location.SingleOrDefault(x => x.Id_Locations == locationswithcity.Id_Locations); city.City = locationswithcity.City; city.Postal_Code = locationswithcity.Postal_Code; city.Street = locationswithcity.Street; locaiton.Id_Locations = locationswithcity.Id_Locations; locaiton.Floor = locationswithcity.Floor; locaiton.Room = locationswithcity.Room; ctx.SaveChanges(); } return(RedirectToAction("Index", "Location")); }
public ActionResult Index() { List <ProviderModel> providers = null; using (var ctx = new ResourcesServicesContext()) { providers = ctx.Provider.Select(x => new ProviderModel { CityProv = x.CityProv, Company_Name = x.Company_Name, StreetProv = x.StreetProv, PostCodeProv = x.PostCodeProv, Nip_Prov = x.Nip_Prov }).ToList(); } return(View(providers)); }
public ActionResult Addproccess(Model_Equimpments modelEquimpments) { var modelEquimpment = new Model_Equimpments { Mark = modelEquimpments.Mark, Model = modelEquimpments.Model, }; using (var ctx = new ResourcesServicesContext()) { ctx.Model_Equimpment.Add(modelEquimpment); ctx.SaveChanges(); } return(RedirectToAction("Index", "Model_Equimpments")); }
public ActionResult Adding(Permissions permissions) { var permission = new Permissions { Permission_Name = permissions.Permission_Name, Permission_Description = permissions.Permission_Description, }; using (var ctx = new ResourcesServicesContext()) { ctx.Permission.Add(permission); ctx.SaveChanges(); } return(RedirectToAction("Index", "Permissions")); }
public ActionResult Editing(Providers providers_only) { using (var ctx = new ResourcesServicesContext()) { var providers = ctx.Provider.SingleOrDefault(x => x.Id_Providers == providers_only.Id_Providers); providers.Company_Name = providers_only.Company_Name; providers.CityProv = providers_only.CityProv; providers.StreetProv = providers_only.StreetProv; providers.PostCodeProv = providers_only.PostCodeProv; providers.Nip_Prov = providers_only.Nip_Prov; ctx.SaveChanges(); } return(RedirectToAction("Index", "Providers")); }
public ActionResult Edit(int symbol) { Citys city = null; using (var ctx = new ResourcesServicesContext()) { city = ctx.City.SingleOrDefault(x => x.Id_City == symbol); } var city_only = new Citys { Id_City = city.Id_City, City = city.City, Street = city.Street, Postal_Code = city.Postal_Code }; return(View(city_only)); }
public ActionResult Addproccess(Citys citys) { var city = new Citys { City = citys.City, Street = citys.Street, Postal_Code = citys.Postal_Code, }; using (var ctx = new ResourcesServicesContext()) { ctx.City.Add(city); ctx.SaveChanges(); } return(RedirectToAction("Index", "Adress")); }
public ActionResult Edit(int symbol) { Providers provider = null; using (var ctx = new ResourcesServicesContext()) { provider = ctx.Provider.SingleOrDefault(x => x.Id_Providers == symbol); } var providersonly = new Providers { Company_Name = provider.Company_Name, CityProv = provider.CityProv, StreetProv = provider.StreetProv, PostCodeProv = provider.PostCodeProv, Nip_Prov = provider.Nip_Prov }; return(View(providersonly)); }
public ActionResult Adding(Providers providers) { var provider = new Providers { Company_Name = providers.Company_Name, StreetProv = providers.StreetProv, PostCodeProv = providers.PostCodeProv, CityProv = providers.CityProv, Nip_Prov = providers.Nip_Prov }; using (var ctx = new ResourcesServicesContext()) { ctx.Provider.Add(provider); ctx.SaveChanges(); } return(RedirectToAction("Index", "Providers")); }
public ActionResult Edit(int symbol) { Citys city = null; Locations locations = null; using (var ctx = new ResourcesServicesContext()) { city = ctx.City.SingleOrDefault(x => x.Id_City == symbol); locations = ctx.Location.SingleOrDefault(x => x.Id_Locations == symbol); } var locationswithcity = new LocationWithCityModel { City = city.City, Street = city.Street, Postal_Code = city.Postal_Code, Floor = locations.Floor, Room = locations.Room }; return(View(locationswithcity)); }