Пример #1
0
 public ActionResult Edit([Bind(Include = "VendorId,VendorNumber,VendorName,ContactId,DiscountRate,EnterUserId,EnterDate,IsActive")] SMA_Lookup_Vendor sMA_Lookup_Vendor)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sMA_Lookup_Vendor).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ContactId   = new SelectList(db.SMA_Lookup_Contact, "ContactId", "Title", sMA_Lookup_Vendor.ContactId);
     ViewBag.EnterUserId = new SelectList(db.SMA_Lookup_User, "UserId", "FirstName", sMA_Lookup_Vendor.EnterUserId);
     return(View(sMA_Lookup_Vendor));
 }
Пример #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            SMA_Lookup_Vendor sMA_Lookup_Vendor = db.SMA_Lookup_Vendor.Find(id);

            sMA_Lookup_Vendor.IsActive   = false;
            sMA_Lookup_Vendor.InActiveDT = DateTime.Now;
            CustomIdentity iden = (CustomIdentity)HttpContext.User.Identity;

            sMA_Lookup_Vendor.InActiveBy = iden.UserId;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #3
0
        // GET: Setting/Vendor/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SMA_Lookup_Vendor sMA_Lookup_Vendor = db.SMA_Lookup_Vendor.Find(id);

            if (sMA_Lookup_Vendor == null)
            {
                return(HttpNotFound());
            }
            return(View(sMA_Lookup_Vendor));
        }
Пример #4
0
        // GET: Setting/Vendor/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SMA_Lookup_Vendor sMA_Lookup_Vendor = db.SMA_Lookup_Vendor.Find(id);

            if (sMA_Lookup_Vendor == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ContactId   = new SelectList(db.SMA_Lookup_Contact, "ContactId", "Title", sMA_Lookup_Vendor.ContactId);
            ViewBag.EnterUserId = new SelectList(db.SMA_Lookup_User, "UserId", "FirstName", sMA_Lookup_Vendor.EnterUserId);
            return(View(sMA_Lookup_Vendor));
        }