Пример #1
0
        public ActionResult Alter(Transfer prod)
        {
            TransferIntern prodI = new TransferIntern();

            prodI.Id          = prod.Id;
            prodI.Name        = prod.Name;
            prodI.Category    = prod.Category;
            prodI.Supplier    = prod.Supplier;
            prodI.Producer    = prod.Producer;
            prodI.Description = prod.Description;
            prodI.Price       = prod.Price;
            prodI.modeJson    = prod.modeJson;

            if (prod.Id == 0)
            {
                prodI.create = true;
            }
            else
            {
                prodI.create = false;
            }

            if (prodI.create == true && prod.modeJson == true)
            {
                prodI.Id = rep.GetLastJsonIndex();
            }

            return(View(prodI));
        }