Ejemplo n.º 1
0
        private void btnAddPro_Click(object sender, EventArgs e)
        {
            string title      = txtTitle.Text;
            var    startdate  = dateStart.Value;
            var    finishdate = dateFinish.Value;
            var    status     = promotionController.GetStatus(startdate, finishdate);

            promotionController.Create(
                new PromotionDto()
            {
                Title      = title,
                StartDate  = startdate,
                FinishDate = finishdate,
                Status     = status
            });

            MessageBox.Show("You added promotion successfully", "Notification");
            loadTable();
        }