Example #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            T_CUSTOMER t_CUSTOMER = await db.T_CUSTOMER.FindAsync(id);

            db.T_CUSTOMER.Remove(t_CUSTOMER);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Example #2
0
        public async Task <ActionResult> Edit([Bind(Include = "CUSTOMER_ID,CUSTOMER_NAME,CUSTOMER_CONTRACT,CUSTOMER_CONTACT,CUSTOMER_EMAIL,CUSTOMER_ADDRESS,CUSTOMER_PROJECT_ID,CUSTOMER_CREATION,CUSTOMER_UPDATE,CUSTOMER_ACTIF")] T_CUSTOMER t_CUSTOMER)
        {
            if (ModelState.IsValid)
            {
                db.Entry(t_CUSTOMER).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(t_CUSTOMER));
        }
Example #3
0
        // GET: T_CUSTOMER/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            T_CUSTOMER t_CUSTOMER = await db.T_CUSTOMER.FindAsync(id);

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