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

            ProductionShiftModel productionShift = JsonConvert.DeserializeObject <ProductionShiftModel>(row);

            try
            {
                if (productionShift != null)
                {
                    productionShift.LastModified = DateTime.Now;
                    productionShift.ModifiedBy   = CurrentUser;
                    productionShift.Code         = LookupShiftTypeCode(productionShift.TypeID);
                    ProductionShiftDto dto = new ProductionShiftDto();
                    using (ProductionShiftService service = new ProductionShiftService())
                    {
                        dto = service.Get(productionShift.Id);
                        Mapper.Map(productionShift, dto);
                        service.Update(dto);
                    }
                }

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

            productionShift.ResponseMessage = responseMessage;

            return(Json(productionShift, JsonRequestBehavior.AllowGet));
        }