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; } }
private void gridView_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) { if (gridView.FocusedRowHandle < 0 && sender.GetType() != typeof(GridView)) { return; } try { if (gridView.IsRowSelected(e.RowHandle) || gridView.FocusedRowHandle == e.RowHandle) { Rectangle bounds = e.Bounds; // rowInfo.Bounds; bounds.X -= 1; bounds.Width += 2; if (null == m_focus_pen) { m_focus_pen = new Pen(Brushes.OrangeRed, 2); } e.Graphics.DrawLine(m_focus_pen, new Point(bounds.X, bounds.Y), new Point(bounds.X + bounds.Width, bounds.Y)); e.Graphics.DrawLine(m_focus_pen, new Point(bounds.X, bounds.Y + bounds.Height), new Point(bounds.X + bounds.Width, bounds.Y + bounds.Height)); } switch (e.Column.FieldName) { case "display_index": { e.DisplayText = (gridControl.FocusedView.RowCount - e.RowHandle).ToString(); } break; case "state_cd": { //Debug.WriteLine("e.Column.FieldName : " + e.Column.FieldName); //Debug.WriteLine("ObjOrder.getStateString(state_cd) : " + ObjOrder.getStateString(state_cd)); int state_cd = (int)e.CellValue; string text = ObjOrder.getStateString(state_cd); Bitmap img = ObjOrder.getStateImage(state_cd); if (img != null) { Point pos = new Point(); pos.X = e.Bounds.Location.X + 2; pos.Y = e.Bounds.Location.Y + ((e.Bounds.Height - img.Height) / 2); e.Graphics.DrawImage(img, pos.X, pos.Y, img.Width, img.Height); int margin_x = img.Width + 4; Rectangle rect = new Rectangle(e.Bounds.X + margin_x, e.Bounds.Y, e.Bounds.Width - margin_x, e.Bounds.Height); e.Appearance.DrawString(e.Cache, text, rect); e.Handled = true; } } break; case "call_num": { e.DisplayText = ((null == e.CellValue || 8 > e.CellValue.ToString().Length) ? e.CellValue.ToString() : KnUtil.formatTelNumber(e.CellValue.ToString())); } break; } } catch (Exception ex) { String erro_msg = (null == ex.Message ? "error - OrderList_gridView_CustomDrawCell" : ex.Message); TsLog.writeLog(erro_msg); //Debug.Assert(false, erro_msg); } }