Exemple #1
0
 public ActionResult Edit([Bind(Include = "Id,Name")] AspNetRoles aspNetRoles)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aspNetRoles).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aspNetRoles));
 }
 public ActionResult Edit([Bind(Include = "Id,Email,EmailConfirmed,PasswordHash,SecurityStamp,PhoneNumber,PhoneNumberConfirmed,TwoFactorEnabled,LockoutEndDateUtc,LockoutEnabled,AccessFailedCount,UserName")] AspNetUsers aspNetUsers)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aspNetUsers).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aspNetUsers));
 }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "MigrationId,ContextKey,Model,ProductVersion")] C__MigrationHistory c__MigrationHistory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(c__MigrationHistory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(c__MigrationHistory));
 }
Exemple #4
0
 public ActionResult Edit([Bind(Include = "TVA_ID,Name,Value")] Tvas tvas)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tvas).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tvas));
 }
Exemple #5
0
 public ActionResult Edit([Bind(Include = "Customer_ID,Name,Code")] Customers customers)
 {
     if (ModelState.IsValid)
     {
         db.Entry(customers).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(customers));
 }
Exemple #6
0
 public ActionResult Edit([Bind(Include = "LoginProvider,ProviderKey,UserId")] AspNetUserLogins aspNetUserLogins)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aspNetUserLogins).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserId = new SelectList(db.AspNetUsers, "Id", "Email", aspNetUserLogins.UserId);
     return(View(aspNetUserLogins));
 }
 public ActionResult Edit([Bind(Include = "ExpenseType_ID,Name,Ceiling,Fixed,OnlyManagers,Tva_ID")] ExpanseTypes expanseTypes)
 {
     if (ModelState.IsValid)
     {
         db.Entry(expanseTypes).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Tva_ID = new SelectList(db.Tvas, "TVA_ID", "Name", expanseTypes.Tva_ID);
     return(View(expanseTypes));
 }
Exemple #8
0
 public ActionResult Edit([Bind(Include = "Id,UserId,ClaimType,ClaimValue")] AspNetUserClaims aspNetUserClaims)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aspNetUserClaims).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserId = new SelectList(db.AspNetUsers, "Id", "Email", aspNetUserClaims.UserId);
     return(View(aspNetUserClaims));
 }
 public ActionResult Edit([Bind(Include = "ExpanseReport_ID,Employee_ID,Author_ID,CreationDate,Year,Month,StatusCode,ManagerValidationDate,AccountingValidatationDate,Total_HT,Total_TVA,Total_TTC,ManagerComment,AccountingComment")] ExpanseReports expanseReports)
 {
     if (ModelState.IsValid)
     {
         db.Entry(expanseReports).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Employee_ID = new SelectList(db.Employees, "Employee_ID", "User_ID", expanseReports.Employee_ID);
     ViewBag.Author_ID   = new SelectList(db.Employees, "Employee_ID", "User_ID", expanseReports.Author_ID);
     return(View(expanseReports));
 }
 public ActionResult Edit([Bind(Include = "Project_ID,Name,Description,Budget,Customer_ID,Pole_ID")] Projects projects)
 {
     if (ModelState.IsValid)
     {
         db.Entry(projects).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Customer_ID = new SelectList(db.Customers, "Customer_ID", "Name", projects.Customer_ID);
     ViewBag.Pole_ID     = new SelectList(db.Poles, "Pole_ID", "Name", projects.Pole_ID);
     return(View(projects));
 }
Exemple #11
0
        public async Task <ActionResult> Edit([Bind(Include = "Pole_ID,Name,Manager_ID")] Poles poles)
        {
            if (ModelState.IsValid)
            {
                db.Entry(poles).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.Manager_ID = new SelectList(db.Employees, "Employee_ID", "User_ID", poles.Manager_ID);
            return(View(poles));
        }
        public async Task <ActionResult> Edit([Bind(Include = "Employee_ID,User_ID,FirstName,LastName,Email,Telephone,Pole_ID")] Employees employees)
        {
            if (ModelState.IsValid)
            {
                db.Entry(employees).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.User_ID = new SelectList(db.AspNetUsers, "Id", "Email", employees.User_ID);
            ViewBag.Pole_ID = new SelectList(db.Poles, "Pole_ID", "Name", employees.Pole_ID);
            return(View(employees));
        }
 public ActionResult Edit([Bind(Include = "Expanse_ID,ExpanseReport_ID,Day,ExpanseType_ID,Customer_ID,Project_ID,Amount_HT,Amount_TVA,Amount_TTC")] Expanses expanses)
 {
     if (ModelState.IsValid)
     {
         db.Entry(expanses).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Customer_ID      = new SelectList(db.Customers, "Customer_ID", "Name", expanses.Customer_ID);
     ViewBag.ExpanseReport_ID = new SelectList(db.ExpanseReports, "ExpanseReport_ID", "ManagerComment", expanses.ExpanseReport_ID);
     ViewBag.ExpanseType_ID   = new SelectList(db.ExpanseTypes, "ExpenseType_ID", "Name", expanses.ExpanseType_ID);
     ViewBag.Project_ID       = new SelectList(db.Projects, "Project_ID", "Name", expanses.Project_ID);
     return(View(expanses));
 }