Exemple #1
0
        override protected void initDlgControls()
        {
            if (null == m_dlg_obj)
            {
                return;
            }

            // border
            //ctr_tbx_order_num.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            //ctr_tbx_order_type.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            //ctr_tbx_state_cd.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            //ctr_tbx_call_num.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            //ctr_tbx_call_datetime.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            //ctr_tbx_customer_cost.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            //ctr_tbx_customer_request_memo.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            //ctr_lbx_arv_locate_address.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            //ctr_lbx_arv_locate_alternative_address.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            //ctr_lbx_arv_locate_memo.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;

            // set enable
            ctr_tbx_order_num.Properties.ReadOnly                      = true;
            ctr_tbx_order_type.Properties.ReadOnly                     = true;
            ctr_tbx_state_cd.Properties.ReadOnly                       = true;
            ctr_tbx_call_num.Properties.ReadOnly                       = true;
            ctr_tbx_cust_pay_type_name.Properties.ReadOnly             = true;
            ctr_tbx_call_datetime.Properties.ReadOnly                  = true;
            ctr_tbx_customer_cost.Properties.ReadOnly                  = true;
            ctr_tbx_customer_request_memo.Properties.ReadOnly          = true;
            ctr_lbx_arv_locate_address.Properties.ReadOnly             = true;
            ctr_lbx_arv_locate_alternative_address.Properties.ReadOnly = true;
            ctr_lbx_arv_locate_memo.Properties.ReadOnly                = true;

            // set content
            ctr_tbx_order_num.Text                      = m_dlg_obj.m_order_num;
            ctr_tbx_order_type.Text                     = ObjOrder.getOrderTypeString(m_dlg_obj.m_order_type);
            ctr_tbx_state_cd.Text                       = ObjOrder.getStateString(m_dlg_obj.m_state_cd);
            ctr_tbx_call_num.Text                       = m_dlg_obj.m_call_num;
            ctr_tbx_cust_pay_type_name.Text             = ObjOrder.getCustPayTypeString(m_dlg_obj.m_customer_pay_type_cd);
            ctr_tbx_call_datetime.Text                  = m_dlg_obj.m_call_datetime.ToString("yyyy-MM-dd HH:mm:ss");
            ctr_tbx_customer_cost.Text                  = Kons.Utility.KnUtil.formatMoney(m_dlg_obj.m_customer_cost);
            ctr_tbx_customer_request_memo.Text          = m_dlg_obj.m_customer_request_memo;
            ctr_lbx_arv_locate_address.Text             = m_dlg_obj.m_arv_locate_address;
            ctr_lbx_arv_locate_alternative_address.Text = m_dlg_obj.m_arv_locate_alternative_address; // 대체 가능한 주소 - 신주소
            ctr_lbx_arv_locate_memo.Text                = m_dlg_obj.m_arv_locate_memo;

            //
            if ((int)ObjOrder.STATE_TYPE.ORDER_STATE_0 == m_dlg_obj.m_state_cd)
            {
                ctr_btn_req_delivery.Enabled = true;
            }
            else
            {
                ctr_btn_req_delivery.Enabled = false;
            }
        }
Exemple #2
0
        private void gridView_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
        {
            // row handle & sender check
            if (gridView.FocusedRowHandle < 0 && sender.GetType() != typeof(GridView))
            {
                return;
            }

            try
            {
                switch (e.Column.FieldName)
                {
                case "order_type":
                {
                    int order_type = ((null == e.Value || 0 == e.Value.ToString().Length) ? 0 : (int)e.Value);
                    e.DisplayText = ObjOrder.getOrderTypeString(order_type);
                }
                break;

                case "call_datetime":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("MM-dd HH:mm"));
                }
                break;

                case "date_1":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_2":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_3":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_4":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_5":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_6":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "date_7":
                {
                    DateTime datetime = ((null == e.Value || 8 > e.Value.ToString().Length) ? DateTime.MinValue : (DateTime)e.Value);
                    e.DisplayText = (DateTime.MinValue == datetime ? "" : datetime.ToString("HH:mm"));
                }
                break;

                case "customer_pay_type_cd":
                {
                    int customer_pay_type_cd = ((null == e.Value || 0 == e.Value.ToString().Length) ? 0 : (int)e.Value);
                    e.DisplayText = ObjOrder.getCustPayTypeString(customer_pay_type_cd);
                }
                break;

                case "shop_cost":
                {
                    e.DisplayText = ((null == e.Value || 0 == e.Value.ToString().Length) ? "" : KnUtil.formatMoney((int)e.Value));
                }
                break;

                case "customer_cost":
                {
                    e.DisplayText = ((null == e.Value || 0 == e.Value.ToString().Length) ? "" : KnUtil.formatMoney((int)e.Value));
                }
                break;
                }
            }
            catch (Exception ex)
            {
                String erro_msg = (null == ex.Message ? "error - OrderList_gridView_CustomColumnDisplayText" : ex.Message);
                TsLog.writeLog(erro_msg);
                Debug.Assert(false, erro_msg);
            }
        }