Ejemplo n.º 1
0
 public int Add(CampingFormDetails campingDetails)
 {
     string sql =
         $@"INSERT INTO campingdetails (showid, startdate, enddate, costpernight, costpershow, maxsplots, `limit`, ChargeType, MemberAllocation, JudgeAllocation)
         VALUES ({campingDetails.ShowId}, '{campingDetails.StartDate:yyyy-MM-dd}','{campingDetails.EndDate:yyyy-MM-dd}', {campingDetails
             .CostPerNight}, {campingDetails.CostPerShow}, {campingDetails.MaxPlots}, {campingDetails.Limit}, {campingDetails
             .ChargeType} , {campingDetails.MemberAllocation}, {campingDetails.JudgeAllocation} )";
     return RunInsert(sql);
 }
Ejemplo n.º 2
0
        public static void Add(CampingFormDetails campingDetails)
        {
            var moduleSettings = ModuleConfig.GetSettings();
            var c = new Data.Camping(moduleSettings);

            c.Add(campingDetails);
        }
        public JsonResult SetCampingDates(CampingFormDetails campingFormDetails )
        {
            Business.Camping.Delete(campingFormDetails.ShowId);
            Business.Camping.Add(campingFormDetails);

            return Json(new {
                Status = 0
            });
        }