Exemple #1
0
        private void Pay()
        {
            CardConn conn = new CardConn();
            string cardNo = txtCardNo.Text.Trim();
            string password = string.Empty;
            string shopId = conn.ShopId;
            string posId = conn.Posid;
            string cashierId = conn.Cashierid;

            string payValue = PayAmount.ToString();
            string owenerId = "11111";
            string cdSeq = "555";
            string date = DateTime.Now.ToString("YYYYMMdd");
            string time = DateTime.Now.ToString("hhmmss");
            Header payCardHeader = new PayCardHeader(cardNo, password, shopId, posId, cashierId,date,time, payValue, owenerId, cdSeq);
            ProcessResult processResult = conn.PayCard(payCardHeader);
            bool isProcess = processResult.IsProcessed;
            if (isProcess)
            {
                this.Close();
                CardPrint cardPrint=new CardPrint();
                cardPrint.ProcessResult = processResult;
                cardPrint.Print();

                ConfigeHelper.SetConfigValue("Order", cardPrint.GetOrderNew());
                MessageBox.Show(processResult.Result);

            }
        }
Exemple #2
0
        private void Pay()
        {
            CardConn conn      = new CardConn();
            string   input     = txtCardNo.Text.Trim();
            string   cardNo    = GetCardNo(input);
            string   password  = GetCardPwd(input);
            string   shopId    = conn.ShopId;
            string   posId     = conn.Posid;
            string   cashierId = conn.Cashierid;

            string        payValue      = PayAmount.ToString();
            CardPrint     cardPrint     = new CardPrint();
            string        owenerId      = cardPrint.GetOrder();
            string        cdSeq         = "555";
            string        date          = DateTime.Now.ToString("yyyyMMdd");
            string        time          = DateTime.Now.ToString("hhmmss");
            Header        payCardHeader = new PayCardHeader(cardNo, password, shopId, posId, cashierId, date, time, payValue, owenerId, cdSeq);
            ProcessResult processResult = conn.PayCard(payCardHeader);
            bool          isProcess     = processResult.IsProcessed;

            if (isProcess)
            {
                this.Close();

                cardPrint.ProcessResult = processResult;
                if (processResult.Code == "0000")
                {
                    cardPrint.Print();

                    ConfigeHelper.SetConfigValue("Order", cardPrint.GetOrderNew());
                }

                MessageBox.Show(processResult.Result);
            }
        }
Exemple #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     string   cardNo        = txtCardNo.Text.Trim();
     string   password      = txtPassword.Text.Trim();
     string   shopId        = txtShopId.Text.Trim();
     string   posId         = txtPosId.Text.Trim();
     string   cashierId     = txtCashierId.Text.Trim();
     string   payValue      = txtPayValue.Text.Trim();
     string   owenerId      = txtOwner.Text.Trim();
     string   cdSeq         = txtCdseq.Text.Trim();
     string   date          = DateTime.Now.ToString("YYYYMMdd");
     string   time          = DateTime.Now.ToString("hhmmss");
     Header   payCardHeader = new PayCardHeader(cardNo, password, shopId, posId, cashierId, date, time, payValue, owenerId, cdSeq);
     CardConn cardCon       = new CardConn();
     //textBox1.Text = cardCon.PayCard(payCardHeader);
 }
Exemple #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     string cardNo = txtCardNo.Text.Trim();
     string password = txtPassword.Text.Trim();
     string shopId = txtShopId.Text.Trim();
     string posId = txtPosId.Text.Trim();
     string cashierId = txtCashierId.Text.Trim();
     string payValue = txtPayValue.Text.Trim();
     string owenerId = txtOwner.Text.Trim();
     string cdSeq = txtCdseq.Text.Trim();
     string date = DateTime.Now.ToString("YYYYMMdd");
     string time = DateTime.Now.ToString("hhmmss");
     Header payCardHeader = new PayCardHeader(cardNo, password, shopId, posId, cashierId,date,time, payValue, owenerId, cdSeq);
     CardConn cardCon=new CardConn();
     //textBox1.Text = cardCon.PayCard(payCardHeader);
 }