예제 #1
0
        public static bool UpdatefuelDetail(UpdateFuelModel model)
        {
            using (var conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
            {
                using (var cmd = new SqlCommand("sp_UpdateFuelPrice", conn))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("fuel_listi_id", model.FuelListID);
                    cmd.Parameters.AddWithValue("pumpid", model.PumpID);
                    cmd.Parameters.AddWithValue("fuelid", model.FuelID);
                    cmd.Parameters.AddWithValue("updatedby", model.UpdatedBy);
                    cmd.Parameters.AddWithValue("price", model.Price);

                    conn.Open();
                    try
                    {
                        cmd.ExecuteNonQuery();
                    }
                    catch (Exception ex)
                    {
                        throw;
                    }


                    conn.Close();
                }
            }
            return(true);
        }
예제 #2
0
        public ActionResult UpdateFuelDetails(UpdateFuelModel model)
        {
            var data = BusinessAccessLayer.BALFuel.BALUpdatefuelDetail(model);

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
 public static bool BALUpdatefuelDetail(UpdateFuelModel model)
 {
     return(DataRepository.FuelRepository.UpdatefuelDetail(model));
 }