public static SurveyCompany CreateSurveyCompany(string surveyCompanyId)
        {
            SurveyCompany surveyCompany = new SurveyCompany();

            surveyCompany.SurveyCompanyId = surveyCompanyId;
            return(surveyCompany);
        }
Exemplo n.º 2
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            SurveyCompany surveyCompany = await db.SurveyCompany.FindAsync(id);

            db.SurveyCompany.Remove(surveyCompany);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Exemplo n.º 3
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,Name")] SurveyCompany surveyCompany)
        {
            if (ModelState.IsValid)
            {
                db.Entry(surveyCompany).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(surveyCompany));
        }
Exemplo n.º 4
0
        public async Task <ActionResult> Create([Bind(Include = "Id,Name")] SurveyCompany surveyCompany)
        {
            if (ModelState.IsValid)
            {
                db.SurveyCompany.Add(surveyCompany);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(surveyCompany));
        }
Exemplo n.º 5
0
        // GET: SurveyCompanies/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SurveyCompany surveyCompany = await db.SurveyCompany.FindAsync(id);

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