public ActionResult tickerGridViewPartialAddNew(HovisMillingPortal.Models.t_Milling_ticker item)
        {
            //ViewBag.Company = new SelectList(db.t_SOP_Company, "CompRecid", "Compcode");
            var model = db.t_Milling_ticker;

            if (ModelState.IsValid)
            {
                try
                {
                    model.Add(item);
                    db.SaveChanges();
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = e.Message;
                }
            }
            else
            {
                ViewData["EditError"] = "Please, correct all errors.";
            }
            var Newmodel = db.t_Milling_ticker.ToList();

            return(PartialView("_tickerGridViewPartial", Newmodel));
        }
        public ActionResult tickerGridViewPartialUpdate(HovisMillingPortal.Models.t_Milling_ticker item)
        {
            //ViewBag.Company = new SelectList(db.t_SOP_Company, "CompRecid", "Compcode");
            var    britishZone  = TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time");
            var    adjusteddate = TimeZoneInfo.ConvertTime(DateTime.Now, TimeZoneInfo.Local, britishZone);
            string updatedby    = "";

            if (User.Identity.Name != null)
            {
                updatedby = User.Identity.Name;
            }


            var model = db.t_Milling_ticker;

            if (ModelState.IsValid)
            {
                try
                {
                    var modelItem = model.FirstOrDefault(it => it.tickerRecid == item.tickerRecid);
                    if (modelItem != null)
                    {
                        modelItem.LastChangedBy   = updatedby;
                        modelItem.LastChangedDate = adjusteddate;
                        modelItem.tickerData      = item.tickerData;
                        this.UpdateModel(modelItem);
                        db.SaveChanges();
                    }
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = e.Message;
                }
            }
            else
            {
                ViewData["EditError"] = "Please, correct all errors.";
            }
            var Newmodel = db.t_Milling_ticker.ToList();

            return(PartialView("_tickerGridViewPartial", Newmodel));
        }