Exemplo n.º 1
0
        private void gridView_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            if (0 > e.RowHandle && sender.GetType() != typeof(GridView))
            {
                return;
            }

            DataRow dr = gridView.GetDataRow(e.RowHandle);

            if (null != dr && dr.Table.Columns.Contains("state_cd"))
            {
                try
                {
                    int   state_cd  = KnUtil.parseInt32(dr["state_cd"].ToString());
                    Color row_color = ObjOrder.getStateColor(state_cd);

                    // 색상 적용
                    if (row_color != Color.Empty)
                    {
                        e.Appearance.BackColor = row_color;
                    }
                }
                catch (Exception ex)
                {
                    TsLog.writeLog(ex.Message);
                }
            }
        }
Exemplo n.º 2
0
        private void gridView_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
        {
            if (0 > e.RowHandle && sender.GetType() != typeof(GridView))
            {
                return;
            }

            DataRow dr = gridView.GetDataRow(e.RowHandle);

            if (null != dr && dr.Table.Columns.Contains("display_index"))
            {
                try
                {
                    // 색상 적용
                    int display_index = KnUtil.parseInt32(dr["display_index"].ToString());
                    if (0 == (display_index % 2))
                    {
                        e.Appearance.BackColor = Color.FromArgb(253, 253, 253);
                    }
                }
                catch (Exception ex)
                {
                    TsLog.writeLog(ex.Message);
                }
            }
        }
Exemplo n.º 3
0
        public bool setObj(DataRow _dr)
        {
            if (null == _dr)
            {
                return(false);
            }

            try
            {
                m_config_id           = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "config_id"));
                m_is_use              = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "is_use"));
                m_is_install          = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "is_install"));
                m_input_type          = KnUtil.getDataRowString(_dr, "input_type");
                m_input_port_num      = KnUtil.getDataRowString(_dr, "input_port_num");
                m_input_port_baud     = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "input_port_baud"));
                m_listen_port_num     = KnUtil.getDataRowString(_dr, "listen_port_num");
                m_listen_port_baud    = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "listen_port_baud"));
                m_conn_print_port_num = KnUtil.getDataRowString(_dr, "conn_print_port_num");
            }
            catch (Exception ex)
            {
                TsLog.writeLog(ex.Message);
                Debug.Assert(false);
                return(false);
            }
            return(true);
        }
Exemplo n.º 4
0
        public bool setObj(DataRow _dr)
        {
            if (null == _dr)
            {
                return(false);
            }

            try
            {
                // Order
                m_order_num      = _dr["order_num"].ToString();
                m_order_biz_date = KnUtil.parseInt32(_dr["order_biz_date"].ToString());
                m_order_type     = KnUtil.parseInt32(_dr["order_type"].ToString());
                m_state_cd       = KnUtil.parseInt32(_dr["state_cd"].ToString());

                m_call_num      = _dr["call_num"].ToString();
                m_call_datetime = KnUtil.parseDateTime(_dr["call_datetime"].ToString());
                m_date_1        = KnUtil.parseDateTime(KnUtil.getDataRowString(_dr, "date_1"));
                m_date_2        = KnUtil.parseDateTime(KnUtil.getDataRowString(_dr, "date_2"));
                m_date_3        = KnUtil.parseDateTime(KnUtil.getDataRowString(_dr, "date_3"));
                m_date_4        = KnUtil.parseDateTime(KnUtil.getDataRowString(_dr, "date_4"));
                m_date_5        = KnUtil.parseDateTime(KnUtil.getDataRowString(_dr, "date_5"));
                m_date_6        = KnUtil.parseDateTime(KnUtil.getDataRowString(_dr, "date_6"));
                m_date_7        = KnUtil.parseDateTime(KnUtil.getDataRowString(_dr, "date_7"));

                // Shop
                m_shop_name           = KnUtil.getDataRowString(_dr, "shop_name");
                m_shop_request_time   = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "shop_request_time"));
                m_shop_request_option = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "shop_request_option"));
                m_shop_cost           = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "shop_cost"));

                // Customer
                m_customer_name                 = KnUtil.getDataRowString(_dr, "customer_name");
                m_customer_cost                 = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "customer_cost"));
                m_customer_additional_cost      = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "customer_additional_cost"));
                m_customer_additional_cost_memo = KnUtil.getDataRowString(_dr, "customer_additional_cost_memo");

                m_customer_pay_type_cd   = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "customer_pay_type_cd"));
                m_customer_pay_type_memo = KnUtil.getDataRowString(_dr, "customer_pay_type_memo");

                m_customer_request_option = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "customer_request_option"));
                m_customer_request_time   = KnUtil.parseInt32(KnUtil.getDataRowString(_dr, "customer_request_time"));
                m_customer_request_memo   = KnUtil.getDataRowString(_dr, "customer_request_memo");

                // Locate Arv
                m_arv_locate_name                = KnUtil.getDataRowString(_dr, "arv_locate_name");
                m_arv_locate_address             = KnUtil.getDataRowString(_dr, "arv_locate_address");
                m_arv_locate_alternative_address = KnUtil.getDataRowString(_dr, "arv_locate_alternative_address");
                m_arv_locate_memo                = KnUtil.getDataRowString(_dr, "arv_locate_memo");
                m_arv_person_tel_num             = KnUtil.getDataRowString(_dr, "arv_person_tel_num");
                m_arv_person_memo                = KnUtil.getDataRowString(_dr, "arv_person_memo");
            }
            catch (Exception ex)
            {
                TsLog.writeLog(ex.Message);
                return(false);
            }
            return(true);
        }
Exemplo n.º 5
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());
        }
Exemplo n.º 6
0
 // control -> object
 override protected void setDlgControlDataToObjects()
 {
     for (int i = 0; i < m_controls_config_unit_list.Length; i++)
     {
         Controls_ConfigUnit sel_ctr = m_controls_config_unit_list[i];
         if (null != sel_ctr)
         {
             ObjConfigPrintOutput sel_obj = m_config_list.getObject(i);
             if (null != sel_ctr)
             {
                 sel_obj.m_is_use             = (sel_ctr.chk_is_use.Checked ? 1 : 0);
                 sel_obj.m_print_connect_type = KnDevexpressFunc.ComboBoxGetSelectedItemKey(sel_ctr.cbx_print_connect_type);
                 sel_obj.m_print_port_num     = KnDevexpressFunc.ComboBoxGetSelectedItemKey(sel_ctr.cbx_print_port_num);
                 sel_obj.m_print_port_baud    = KnUtil.parseInt32(KnDevexpressFunc.ComboBoxGetSelectedItemKey(sel_ctr.cbx_print_port_baud));
             }
             else
             {
                 sel_obj.m_is_use = 0;
             }
         }
     }
 }
Exemplo n.º 7
0
        public void onChangeObj(ObjOrder _obj, bool _is_change_state = false)
        {
            Utility.Utility.LogWrite("onChangeObj인자2개짜리");
            try
            {
                // save
                Kons.ShopCallpass.AppMain.AppCore.Instance.getAppDoc().setObjOrder(_obj);

                // check visible
                if (!isShowOrder(_obj))
                {
                    return;
                }

                // control
                DataTable view_table = getGridViewDataSource();
                if (null != view_table)
                {
                    // 기존 객체 얻기
                    DataRow[] sel_rows = null;
                    try
                    {
                        sel_rows = view_table.Select(String.Format("order_num = '{0}'", _obj.m_order_num));
                    }
                    catch (Exception err)
                    {
                        TsLog.writeLog(err.Message);
                    }

                    // 기존 없으면 생성
                    if (null == sel_rows || 0 == sel_rows.Length)
                    {
                        sel_rows = new DataRow[1];
                        if (null != sel_rows)
                        {
                            sel_rows[0] = view_table.NewRow();
                        }
                        view_table.Rows.InsertAt(sel_rows[0], 0);
                    }
                    else
                    {
                        if (!_is_change_state)
                        {
                            // 상태변경을 해야하는 경우(배달요청후)가 아니면 기존 상태를 안바뀌게 하기위해 아래 채우기전에 이전값으로 넣음
                            // 중복으로 연계 눌렀을경우 상태가 변경되는것을 막기위해 기본적으로 이전 상태를 유지한다.
                            _obj.m_state_cd = KnUtil.parseInt32(sel_rows[0]["state_cd"].ToString());
                        }
                    }

                    // 새로 받은 내용 채우기
                    if (null != sel_rows[0])
                    {
                        ObjOrder.setTableData(ref sel_rows[0], ref _obj); // obj -> data row
                    }

                    // 다시 그리기
                    redrawListControl();
                }
            }
            catch (Exception ex)
            {
                Kons.ShopCallpass.AppMain.AppCore.detectException(ex.Message);
            }
        }