示例#1
0
        public Result PaymentTable(string paymentno)
        {
            Result res = new Result();

            if (_paymenttable != null && _paymenttable.Rows.Count != 0)
            {
                decimal cardpaymentamount = 0;
                foreach (DataRow dr in _paymenttable.Rows)
                {
                    //2013.02.13 Amaraa
                    //if (Static.ToStr(dr["PAYMENTTYPE"]) == _core.CardPayment)
                    //{
                    //    cardpaymentamount = cardpaymentamount + Static.ToDecimal(dr["AMOUNT"]);
                    //}
                }
                try
                {
                    if (cardpaymentamount > 0)
                    {
                        GCIPPOSF.CTxn t = new GCIPPOSF.CTxn();
                        t.InitAll();
                        string ret = t.Txn1000(Static.ToDouble(cardpaymentamount), "496");
                        MessageBox.Show(ret);
                    }
                }
                catch (Exception ex)
                {
                    res.ResultNo   = 1;
                    res.ResultDesc = string.Format("{IPPOS оор гүйлгээ хийхэд алдаа гарлаа} : {1}", ex);
                    return(res);
                }
                res = _core.RemoteObject.Connection.Call(_core.RemoteObject.User.UserNo, 500, 500205, 500205, new object[] { _batchno, _paymenttable, string.Format("{0}-{1}", _core.RemoteObject.User.AreaCode, _core.POSNo), paymentno, Static.ToDecimal(numDiff.EditValue) });
                if (res.ResultNo == 0)
                {
                    object[] obj = new object[3];
                    obj[0]    = numPaid.EditValue;
                    obj[1]    = numDiff.EditValue;
                    obj[2]    = res.Param[0];
                    res.Param = obj;
                    return(res);
                }
                else
                {
                    return(res);
                }
            }
            else
            {
                res.ResultNo   = 1;
                res.ResultDesc = "Төлбөрийн мэдээлэлээ оруулна уу.";
            }

            return(res);
        }
示例#2
0
 private void btnIPPOS_Click(object sender, EventArgs e)
 {
     GCIPPOSF.CTxn t = new GCIPPOSF.CTxn();
     t.InitAll();
     t.Settings();
 }