Exemple #1
0
        private void PictureBox_Click(object sender, EventArgs e)
        {
            PictureBox       pictureClick = sender as PictureBox;
            PromotionalItems promotional  = pictureClick.Tag as PromotionalItems;

            if (promotional != null && promotional.PromotionalID > 0)
            {
                var findPromotionalID = promotionalItemsServices.Find(promotional.PromotionalID);
                var editPromotional   = promotionalItemsServices.Update(new PromotionalItems()
                {
                    IsUsed = findPromotionalID.IsUsed = true
                });
                var controlParticipants = participantsServices.Insert(new Participants()
                {
                    customerID         = customerServices.Find(I => I.CustomerIdentity == tbTCKN.Text).CustomerID,
                    PromotionalItemsID = promotional.PromotionalID,
                    StoreID            = Method.store_ID,
                    CreationDate       = DateTime.Now
                });
                PromosyonForm form = new PromosyonForm(promotional);
                form.MdiParent = this.MdiParent;
                form.Show();
            }
            else
            {
                MessageBox.Show("Sistem hatalı");
            }
        }
 public PromosyonForm(PromotionalItems items)
 {
     InitializeComponent();
     lblInfo.Text = items.PromotionalName + "\n" + items.Description + "\n Hediyesini Kazandınız...";
 }