public void UpdateShowMessage(int showId, string memberMessage)
        {
            Shows shows = new Shows(showId);
            shows.MemberMessage = memberMessage;

            shows.Save();
        }
        public StatusCls CreateShow(int orgId, string showName, string ShowDate, int srcId, string closingDate)
        {
            var status = new StatusCls();
            var shows = new Shows();
            status.ShowID = shows.AddShow(orgId, showName, ShowDate);
            var newShow = new Shows(status.ShowID);
            if (!string.IsNullOrEmpty( closingDate ))
            {
                newShow.ClosingDate = DateTime.Parse(closingDate);
                newShow.Save();
            }

            var showDetails = new ShowDetails();
            if (srcId == -1)
            {
                showDetails.AddDay(DateTime.Parse(ShowDate), status.ShowID, 3);
                ShowCharges[] ShowChargesList = {
                                ShowCharges.CreateCharge("Single Entry", 3.00M, status.ShowID),
                                ShowCharges.CreateCharge("Vegas Money", 4.00M, status.ShowID),
                                ShowCharges.CreateCharge("Pairs", 5M, status.ShowID),
                                ShowCharges.CreateCharge("Team", 10M, status.ShowID)
                            };

                ClassTypes.CreateClassType("Agility", "Ag", EntryTypes.Standard, 1, ShowChargesList[0].ID, status.ShowID);
                ClassTypes.CreateClassType("Jumping", "Jmp", EntryTypes.Standard, 1, ShowChargesList[0].ID, status.ShowID);
                ClassTypes.CreateClassType("Money Class", "Money", EntryTypes.Standard, 1, ShowChargesList[1].ID, status.ShowID);
                ClassTypes.CreateClassType("Team", "Tms", EntryTypes.Team, 1, ShowChargesList[3].ID, status.ShowID);
                ClassTypes.CreateClassType("Pairs", "Prs", EntryTypes.Pairs, 1, ShowChargesList[2].ID, status.ShowID);
                ClassTypes.CreateClassType("Veterans", "Vets", EntryTypes.Veterans, 1, ShowChargesList[0].ID, status.ShowID);
                ClassTypes.CreateClassType("Anysize", "Any", EntryTypes.Veterans, 1, ShowChargesList[0].ID, status.ShowID);

                ShowDiscounts.CreateDiscount(DiscountTypes.Member, 5, 5, DateTime.Now, "", ShowChargesList[0].ID, status.ShowID);
                ShowDiscounts.CreateDiscount(DiscountTypes.Member, 4, 2, DateTime.Now, "", 0, status.ShowID);
                ShowDiscounts.CreateDiscount(DiscountTypes.Judge, 5, 5, DateTime.Now, "", ShowChargesList[0].ID, status.ShowID);
                ShowDiscounts.CreateDiscount(DiscountTypes.Judge, 4, 1, DateTime.Now, "", 0, status.ShowID);
                ShowDiscounts.CreateDiscount(DiscountTypes.Fixed, 1, 2.75M, DateTime.Now, "", 0, status.ShowID);
                ShowDiscounts.CreateDiscount(DiscountTypes.TransactionCharge, 1, 0.5M, DateTime.Now, "", 0, status.ShowID);
            }
            else
            {
                var showChargeMap = CreateShowChargeMap(srcId, status.ShowID);
                var classTypesMap = CreateClassTypes(srcId, status.ShowID, showChargeMap);
                var showDiscountMap = CreateDiscountTypes(srcId, status.ShowID, showChargeMap);

                //List<ClassTypes> srcClassTypesList = ClassTypes.GetClassTypesForShow(srcid);
                //List<ShowDiscounts> srcShowDiscountsList = ShowDiscounts.getClassChargeDetails(srcid);
                List<ShowDetails> srcShowDaysList = ShowDetails.GetShowDetails(srcId);

                //DateTime lastShowDate = Convert.ToDateTime(context.Request["lastshowdate"]);
                //lastShowDate = lastShowDate.AddDays(1);
                //ShowDetails sd = new ShowDetails(ShowDetailsID);

                //status.ShowDetailsID = sd.Copy(lastShowDate);
                var showDate = DateTime.Parse(ShowDate);
                foreach (ShowDetails showDay in srcShowDaysList)
                {
                    showDetails.AddDay(showDate, status.ShowID, 3);
                    ShowClasses showClass = new ShowClasses();
                    showClass.BulkCopy(srcId, showDay.ID, showDetails.ID, showChargeMap, classTypesMap, status.ShowID);
                    showDate = showDate.AddDays(1);
                }
                ShowDiscounts.CreateDiscount(DiscountTypes.Fixed, 1, 1M, DateTime.Now, "", 0, status.ShowID);
                ShowDiscounts.CreateDiscount(DiscountTypes.TransactionCharge, 1, 0.5M, DateTime.Now, "", 0, status.ShowID);
            }
            return status;
        }
        public void UpdateShowDetails(ShowSummaryDetailsDto showSummaryDetails)
        {
            var shows = new Shows(showSummaryDetails.ShowId)
            {
                ShowName = showSummaryDetails.ShowName,
                ShowDate = showSummaryDetails.ShowDate,
                ClosingDate = showSummaryDetails.ClosingDate,
                Venue = showSummaryDetails.Venue,
                VenuePostcode = showSummaryDetails.Venuepostcode
            };

            shows.Save();
        }
 public void UpdateScheduleMessage(ShowSummaryDetailsDto showSummaryDetails)
 {
     var shows = new Shows(showSummaryDetails.ShowId) {ScheduleMessage = showSummaryDetails.ScheduleMessage};
     shows.Save();
 }
 public void UpdateRunningPlanMessage(ShowSummaryDetailsDto showSummaryDetails)
 {
     var shows = new Shows(showSummaryDetails.ShowId)
     {
         RunningPlanMessage = showSummaryDetails.RunningPlanMessage
     };
     shows.Save();
 }
 public void UpdateScheduleMessage(Core.Models.ShowSummaryDetails showSummaryDetails)
 {
     Shows shows = new Shows(showSummaryDetails.ShowId);
     shows.ScheduleMessage = showSummaryDetails.ScheduleMessage;
     shows.Save();
 }
 public void UpdateRunningPlanMessage(Core.Models.ShowSummaryDetails showSummaryDetails)
 {
     Shows shows = new Shows(showSummaryDetails.ShowId);
     shows.RunningPlanMessage = showSummaryDetails.RunningPlanMessage;
     shows.Save();
 }