예제 #1
0
        public Card(string _cardnum)//возможно, сделать отсюда проверку логина и пароля, и только тогда считывание информации.
        {
            cardnum = _cardnum;
            Connection connect = new Connection();

            connect.Open();
            Dictionary <string, string> userinfo = CardRW.ReadByCNum(cardnum, connect._connect);

            connect.Close();
            //распарсить все из userinfo
        }
예제 #2
0
        private string CreateUniqueCardNumber()
        {
            Connection connect = new Connection();

            connect.Open();
            string lastnum = CardRW.GetLastCardNumber(connect._connect);
            int    num     = int.Parse(lastnum.Substring(9, 15));

            num = num + 1;
            connect.Close();
            return(num.ToString());
        }
예제 #3
0
        public void SaveCard()
        {
            Dictionary <string, string> cardinfo = new Dictionary <string, string>();

            cardinfo.Add("cnum", cardnum);
            cardinfo.Add("cdateexp", dateexp.ToString());
            cardinfo.Add("lname", lastname);
            cardinfo.Add("fname", firstname);
            cardinfo.Add("settleacc", settleacc);
            cardinfo.Add("pID", "");
            cardinfo.Add("pasdateissue", "12-02-2030");
            cardinfo.Add("scrtcode", "013");
            cardinfo.Add("balancelimit", balancelimit.ToString());
            Connection connect = new Connection();

            connect.Open();
            CardRW.CreateCard(cardinfo, connect._connect);
            connect.Close();
        }