示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SMA_Sale_Inventory_Xrf sMA_Sale_Inventory_Xrf = db.SMA_Sale_Inventory_Xrf.Find(id);

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

            sMA_Sale_Inventory_Xrf.InActiveBy = iden.UserId;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "xrfId,SaleId,ProductionId,EnterUserId,EnterDate")] SMA_Sale_Inventory_Xrf sMA_Sale_Inventory_Xrf)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sMA_Sale_Inventory_Xrf).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductionId = new SelectList(db.SMA_Inventory, "ProductionId", "Name", sMA_Sale_Inventory_Xrf.ProductionId);
     ViewBag.EnterUserId  = new SelectList(db.SMA_Lookup_User, "UserId", "FirstName", sMA_Sale_Inventory_Xrf.EnterUserId);
     ViewBag.SaleId       = new SelectList(db.SMA_Sale, "SaleId", "InvoiceNumber", sMA_Sale_Inventory_Xrf.SaleId);
     return(View(sMA_Sale_Inventory_Xrf));
 }
示例#3
0
        // GET: Sales/SaleInventory/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SMA_Sale_Inventory_Xrf sMA_Sale_Inventory_Xrf = db.SMA_Sale_Inventory_Xrf.Find(id);

            if (sMA_Sale_Inventory_Xrf == null)
            {
                return(HttpNotFound());
            }
            return(View(sMA_Sale_Inventory_Xrf));
        }
示例#4
0
        // GET: Sales/SaleInventory/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SMA_Sale_Inventory_Xrf sMA_Sale_Inventory_Xrf = db.SMA_Sale_Inventory_Xrf.Find(id);

            if (sMA_Sale_Inventory_Xrf == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ProductionId = new SelectList(db.SMA_Inventory, "ProductionId", "Name", sMA_Sale_Inventory_Xrf.ProductionId);
            ViewBag.EnterUserId  = new SelectList(db.SMA_Lookup_User, "UserId", "FirstName", sMA_Sale_Inventory_Xrf.EnterUserId);
            ViewBag.SaleId       = new SelectList(db.SMA_Sale, "SaleId", "InvoiceNumber", sMA_Sale_Inventory_Xrf.SaleId);
            return(View(sMA_Sale_Inventory_Xrf));
        }