Esempio n. 1
0
        public void BuySubscription(Client client, Subscription subscription)
        {
            string subNextId = DataBaseManager.GetNextId("subscription");

            subscriptionManager.AddNewSubscription(client, subscription);

            string querry = string.Format(
                "UPDATE `drivefitness`.`clients` SET `subscriptionid`='{0}' WHERE `id`='{1}';",
                subNextId,
                client.ID
                );

            DataBaseManager.SendCommand(querry);

            //messager.SuccessMessage(string.Format("Абонемент выдан клиенту: {0}", client));

            messager.SuccessMessage(string.Format("Клиенту \"{3}\" добавлен новый абонемент:{0}Занятий: {1}, Стоимость: {2}",
                                                  Environment.NewLine,
                                                  subscription.CountTraining,
                                                  subscription.SubPrice,
                                                  client
                                                  ));
        }