Exemple #1
0
        private void loadData()
        {
            bll = Common.BLLLoader.GetMemberCardBll();
            List <Models.MemberCard> cards = null;

            try
            {
                cards = bll.GetAllMemberCard();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "数据库不可用", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            if (cards == null)
            {
                return;
            }

            this.dgvList.Rows.Clear();

            foreach (Models.MemberCard card in cards)
            {
                this.dgvList.Rows.Add(new String[]
                {
                    card.CardNo,
                    card.CategoryId.ToString(),
                    "",
                    card.CreatedAt.ToString(),
                    card.UpdatedAt.ToString()
                });
            }
            this.tsslMemberCardNum.Text = cards.Count.ToString();
        }
Exemple #2
0
 private void initBll()
 {
     BllFactory.DLLBasePath = Application.StartupPath;
     recordBll = BllFactory.GetMemberCardRecordBll();
     cardBll   = BllFactory.GetMemberCardBll();
     catBll    = BllFactory.GetMemberCardCategoryBll();
 }
Exemple #3
0
 private void initBll()
 {
     catBll    = BLLLoader.GetMemberCardCategoryBll();
     cardBll   = BLLLoader.GetMemberCardBll();
     recordBll = BLLLoader.GetMemberCardRecordBll();
     logBll    = BLLLoader.GetSaleLogBll();
 }
Exemple #4
0
        private void FrmAdd_Load(object sender, System.EventArgs e)
        {
            categoryBll = BLLLoader.GetMemberCardCategoryBll();
            cardBll     = BLLLoader.GetMemberCardBll();

            List <MemberCardCategory> list = categoryBll.GetAllMemberCardCategory();

            this.cbxCategory.DisplayMember = "Name";
            this.cbxCategory.ValueMember   = "Id";
            this.cbxCategory.DataSource    = list;
        }