public ActionResult CreateStockAdjustment(string Code = "", string ProductServiceName = "", double Quantity = 0, bool Active = true, string ProductServiceCode = "", string Description = "") { var stockAdjustment = stockAdjustmentRepository.GetByCode(Code) == null ? new OnPointSport.Core.Domain.StockAdjustment() : stockAdjustmentRepository.GetByCode(Code); stockAdjustment.Code = stockAdjustment.Id == 0 ? GetCode() : Code; stockAdjustment.ProductServiceCode = ProductServiceCode; stockAdjustment.Quantity = Quantity; stockAdjustment.Active = Active; stockAdjustment.Description = Description; stockAdjustmentRepository.Save(stockAdjustment); return(Json(JsonRequestBehavior.AllowGet)); }