public string AddTarget() { DataAbstractionLayer dal = new DataAbstractionLayer(); string name = Request.Params["Name"]; string desc = Request.Params["Description"]; bool isValidPrice = Decimal.TryParse(Request.Params["Price"], out decimal price); bool isValidDestId = Int32.TryParse(Request.Params["DestinationID"], out int destinationId); if (isValidDestId && isValidPrice && !string.IsNullOrEmpty(name)) { dal.InsertTarget(new Target { Name = name, Description = desc, Price = price, DestinationID = destinationId }); return("Target added successfully!"); } return("Some field(s) have invalid values, please fix before proceeding."); }