コード例 #1
0
        // ------------------------------------------------------------------------------
        //
        private void connectListenPort()
        {
            // disconnect if open
            disconnectListenPort();

            try
            {
                // Create the serial port with basic settings
                m_listen_port                = new SerialPort(COMPORT_LISTEN, 9600, Parity.None, 8, StopBits.One);
                m_listen_port.Handshake      = Handshake.None;
                m_listen_port.ReadBufferSize = 4096;
                m_listen_port.ReadTimeout    = 2000;

                // Attach a method to be called when there
                // is data waiting in the port's buffer
                m_listen_port.DataReceived += new SerialDataReceivedEventHandler(onDataReceivedListenPort);
                m_listen_port.DtrEnable     = true;

                Debug.WriteLine("m_listen_port.PortName : " + m_listen_port.PortName);
                // Begin communications
                m_listen_port.Open();

                // message
                printListenPortReceivedData("> connected " + COMPORT_LISTEN);
            }
            catch (Exception err)
            {
                KnDevexpressFunc.showMessage(err.Message);
                disconnectListenPort();
            }
        }
コード例 #2
0
        // ------------------------------------------------------------------------------
        //
        private void connectPrintPort()
        {
            // disconnect if open
            disconnectPrintPort();

            try
            {
                // Create the serial port with basic settings
                m_print_port             = new SerialPort(COMPORT_PRINT, 9600, Parity.None, 8, StopBits.One);
                m_print_port.Handshake   = Handshake.None;
                m_print_port.ReadTimeout = 2000;

                // Attach a method to be called when there
                // is data waiting in the port's buffer
                m_print_port.DataReceived += new SerialDataReceivedEventHandler(onDataReceivedPrintPort);

                // Begin communications
                m_print_port.Open();

                // message
                printPrintPortReceivedData("> connected " + COMPORT_PRINT);
            }
            catch (Exception err)
            {
                KnDevexpressFunc.showMessage(err.Message);
                disconnectPrintPort();
            }
        }
コード例 #3
0
        public void requestOrderPrint(ObjOrder _sel_order)
        {
            if (null == _sel_order)
            {
                Debug.WriteLine("homg");
                KnDevexpressFunc.showMessage("잘못된 주문입니다. 주문을 선택 후 출력하기를 \n시도 해 주십시오.", MessageBoxIcon.Information);
                return;
            }

            if (null == _sel_order.m_print_port_num ||
                0 == _sel_order.m_print_port_num.Length)
            {
                Debug.WriteLine("jung");
                KnDevexpressFunc.showMessage("해당 주문의 주문연동 설정된 출력포트는 프린트 설정이 \n안되어 있습니다.", MessageBoxIcon.Information);
                return;
            }

            if (null == _sel_order.m_print_raw_data_buf ||
                0 == _sel_order.m_print_raw_data_buf.Length)
            {
                Debug.WriteLine("sun");
                KnDevexpressFunc.showMessage("선택된 주문은 출력할 데이터가 없습니다.", MessageBoxIcon.Information);
                return;
            }

            FormMain main_form = Kons.ShopCallpass.AppMain.AppCore.Instance.Mainform;

            if (null != main_form)
            {
                Debug.WriteLine("bab");
                main_form.printOrder(_sel_order);
            }
        }
コード例 #4
0
        private void changeOrderState(int _new_state_cd, int _extra_data_int = 0, String _extra_data_var = "")
        {
            if (null == gridView.GetFocusedRowCellValue("order_num"))
            {
                KnDevexpressFunc.showMessage("선택된 주문이 없습니다.", MessageBoxIcon.Information);
                return;
            }

            String order_num    = gridView.GetFocusedRowCellValue("order_num").ToString();
            Int32  old_state_cd = KnUtil.parseInt32(gridView.GetFocusedRowCellValue("state_cd").ToString());
        }
コード例 #5
0
 private void ctr_btn_req_print_Click(object sender, EventArgs e)
 {
     using (new KnFormWaitCursors(this))
     {
         if (null != m_parent_form)
         {
             m_parent_form.requestOrderPrint(m_dlg_obj);
             KnDevexpressFunc.showMessage("영수증 프린트로 출력을 요청 하였습니다.", MessageBoxIcon.Information);
         }
         label1.Focus();
     }
 }
コード例 #6
0
        private void showDlgModifyObj(String _order_num = "")
        {
            if (0 == _order_num.Length)
            {
                KnDevexpressFunc.showMessage("선택된 주문이 없습니다.", MessageBoxIcon.Information);
                return;
            }

            ObjOrder sel_order = Kons.ShopCallpass.AppMain.AppCore.Instance.getAppDoc().getObjOrder(_order_num);

            if (null != sel_order)
            {
                FormDlgOrderDetail dlg = new FormDlgOrderDetail(this, sel_order);
                dlg.ShowDialog();
            }
        }
コード例 #7
0
        public void requestOrderPrint()
        {
            if (null == gridView.GetFocusedRowCellValue("order_num"))
            {
                KnDevexpressFunc.showMessage("선택된 주문이 없습니다.", MessageBoxIcon.Information);
                return;
            }

            Debug.WriteLine("주문출력");
            String sel_order_num = gridView.GetFocusedRowCellValue("order_num").ToString();

            if (null != sel_order_num)
            {
                Debug.WriteLine("들");
                requestOrderPrint(Kons.ShopCallpass.AppMain.AppCore.Instance.getAppDoc().getObjOrder(sel_order_num));
            }
        }
コード例 #8
0
        public void requestDelivery()
        {
            Utility.Utility.LogWrite("requestDelivery");

            if (null == gridView.GetFocusedRowCellValue("order_num"))
            {
                KnDevexpressFunc.showMessage("선택된 주문이 없습니다.", MessageBoxIcon.Information);
                return;
            }

            String sel_order_num = gridView.GetFocusedRowCellValue("order_num").ToString();

            if (null != sel_order_num)
            {
                requestDelivery(Kons.ShopCallpass.AppMain.AppCore.Instance.getAppDoc().getObjOrder(sel_order_num));
            }
        }
コード例 #9
0
        public void requestDelivery(ObjOrder _sel_order)
        {
            Utility.Utility.LogWrite("requestDelivery 재정의 함수");

            if (null == _sel_order)
            {
                KnDevexpressFunc.showMessage("잘못된 주문입니다. 주문을 선택 후 출력하기를 \n시도 해 주십시오.", MessageBoxIcon.Information);
                return;
            }

            if (null != _sel_order)
            {
                if ((int)ObjOrder.STATE_TYPE.ORDER_STATE_0 != _sel_order.m_state_cd)
                {
                    if (DialogResult.Yes != MessageBox.Show("선택한 주문은 이미 배달대행을 요청한 건 입니다. \r다시 배달 요청을 하시겠습니까?", "확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                    {
                        return;
                    }
                }

                FormDlgRequestDelivery dlg = new FormDlgRequestDelivery(this, _sel_order);
                dlg.ShowDialog();
            }
        }