public JsonResult AjaxTypeUpdate(string row)
        {
            TPO.Web.Core.ResponseMessage responseMessage;

            try
            {
                TPOFormulationLineProductModel formulationLineProduct = JsonConvert.DeserializeObject <TPOFormulationLineProductModel>(row);
                if (formulationLineProduct != null)
                {
                    formulationLineProduct.LastModified = DateTime.Now;
                    TPOFormulationLineProductDto dto = new TPOFormulationLineProductDto();
                    using (TPOFormulationLineProductService service = new TPOFormulationLineProductService())
                    {
                        Mapper.Map(formulationLineProduct, dto);
                        if (formulationLineProduct.Id > 0)
                        {
                            service.Update(dto);
                        }
                    }
                }

                responseMessage = SetResponseMesssage(ActionTypeMessage.SuccessfulSave);
            }
            catch (Exception exc)
            {
                responseMessage = SetResponseMesssage(ActionTypeMessage.FailedSave, exc.Message);
            }

            return(Json(responseMessage, JsonRequestBehavior.AllowGet));
        }
        public ActionResult AjaxTypeUpdate(string row)
        {
            TPOFormulationLineProductModel formulationLineProduct = JsonConvert.DeserializeObject <TPOFormulationLineProductModel>(row);

            if (formulationLineProduct != null)
            {
                formulationLineProduct.LastModified = DateTime.Now;
                TPOFormulationLineProductDto dto = new TPOFormulationLineProductDto();
                using (TPOFormulationLineProductService service = new TPOFormulationLineProductService())
                {
                    Mapper.Map(formulationLineProduct, dto);
                    if (formulationLineProduct.Id > 0)
                    {
                        service.Update(dto);
                    }
                }
            }

            return(RedirectToAction("Edit", "TPOProduct"));
        }