public static int InsertIntoOwnerFuel(OwnerPriceInfo OP) { try { using (IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["FuelPurchaseSQL"].ConnectionString)) { var parameters = new DynamicParameters(); parameters.Add("@priceMarion", OP.North69); parameters.Add("@pricePendleton", OP.South69); parameters.Add("@BidForDate", OP.BidForDate); var result = db.Execute("up_Insert_OwnerOpsFuelPricing", param: parameters, commandType: CommandType.StoredProcedure); return(result); } } catch (Exception ex) { throw ex; } }
//Method to save info internal bool SaveOwnerOpsPrice(double?priceMarion, double?pricePendleton, DateTime BidForDate) { OwnerPriceInfo OP = new OwnerPriceInfo(); if (priceMarion == null || pricePendleton == null) { return(false); } if (priceMarion != null) { OP.North69 = priceMarion; } if (pricePendleton != null) { OP.South69 = pricePendleton; } //THIS SHOULD LATER COME FROM WHATEVER INPUT WE ARE GETTING QUOTES FROM TODO: OP.BidForDate = BidForDate; InsertIntoOwnerFuel(OP); return(true); }