Exemplo n.º 1
0
        private void bt_Promotion_Click(object sender, EventArgs e)
        {
            //pnl_Product.Show();
            //pnl_User.Hide();
            bt_Product.BackColor   = Color.Yellow;
            bt_LoginUser.BackColor = Color.Khaki;
            bt_ProdType.BackColor  = Color.LightGreen;
            bt_RFIDTags.BackColor  = Color.LightGreen;
            bt_Tax.BackColor       = Color.DarkOrange;
            bt_SysConfig.BackColor = Color.Orchid;

            DataAccessPOS dbPOS = new DataAccessPOS();

            promos      = dbPOS.Get_All_Promotions();
            isProduct   = false;
            isLoginUser = false;
            isPType     = false;
            isRFIDTag   = false;
            isSysConfig = false;
            isTax       = false;
            isStation   = false;
            isPromotion = true;

            dgvData_Promo_Initialize();
            if (promos.Count > 0)
            {
                foreach (var promo in promos)
                {
                    this.dgvData.Rows.Add(new String[] { promo.Id.ToString(),
                                                         promo.PromoName,
                                                         promo.PromoType.ToString(),
                                                         promo.PromoValue.ToString(),
                                                         promo.PromoQTY.ToString(),
                                                         promo.PromoStartDttm.ToString(),
                                                         promo.PromoEndDttm.ToString() });


                    this.dgvData.FirstDisplayedScrollingRowIndex = dgvData.RowCount - 1;
                }
            }
        }