Ejemplo n.º 1
0
 /// <summary>
 /// 입력된 금액이 CLEAR되면 처리
 /// </summary>
 /// <param name="e"></param>
 void input_KeyEvent(WSWD.WmallPos.FX.Shared.OPOSKeyEventArgs e)
 {
     if (e.Key.OPOSKey == WSWD.WmallPos.FX.Shared.OPOSMapKeys.KEY_CLEAR)
     {
         ValidateCurrentInput();
     }
     else
     {
         InputText    input = (InputText)this.FocusedControl;
         SaleGridCell cell  = (SaleGridCell)input.Parent;
         if (cell.ColumnIndex == 8)
         {
             ValidateCurrentInput();
         }
     }
 }
Ejemplo n.º 2
0
        void POS_SL_P005_KeyEvent(WSWD.WmallPos.FX.Shared.OPOSKeyEventArgs e)
        {
            // readonly control, just pass
            if (this.FocusedControl != null)
            {
                var it = (InputText)this.FocusedControl;
                if ((it.Tag == null ? false : (bool)it.Tag))
                {
                    if (!e.IsControlKey)
                    {
                        e.IsHandled = true;
                        return;
                    }
                    else if (e.Key.OPOSKey == WSWD.WmallPos.FX.Shared.OPOSMapKeys.KEY_CLEAR)
                    {
                        e.IsHandled = true;
                        this.PreviousControl();
                        return;
                    }
                }
            }

            if (e.Key.OPOSKey == WSWD.WmallPos.FX.Shared.OPOSMapKeys.KEY_CLEAR)
            {
                if (this.FocusedControl != null)
                {
                    var it  = (InputText)this.FocusedControl;
                    var val = TypeHelper.ToInt64(it.Text);
                    if (val > 0)
                    {
                        return;
                    }
                }

                e.IsHandled = true;
                this.PreviousControl();
            }
            else if (e.Key.OPOSKey == WSWD.WmallPos.FX.Shared.OPOSMapKeys.KEY_ENTER)
            {
                e.IsHandled = true;
                this.NextControl();
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Process ENTER, CLEAR: next previous (clear)
        /// ENTER KEy for GiftNo; process PG01
        /// ENTER key for Amt: proces Korean won amount
        /// CLEAR key for GiftNo: Reset input current row
        ///
        /// </summary>
        /// <param name="e"></param>
        void POS_SL_P007_KeyEvent(WSWD.WmallPos.FX.Shared.OPOSKeyEventArgs e)
        {
            if (this.FocusedControl != null)
            {
                InputText    it   = (InputText)this.FocusedControl;
                SaleGridCell cell = (SaleGridCell)it.Parent;

                // 교환권번호컬럼
                if (cell.ColumnIndex == 1)
                {
                    // GiftNo, clear, reset input, invalid
                    if (it.Text.Length > 0 && e.Key.OPOSKey == WSWD.WmallPos.FX.Shared.OPOSMapKeys.KEY_BKS)
                    {
                        //2015.08.26 정광호 수정
                        ResetInputs(true);
                        //ResetInputs();
                        return;
                    }

                    if (it.Text.Length > 0 && e.Key.OPOSKey == WSWD.WmallPos.FX.Shared.OPOSMapKeys.KEY_CLEAR)
                    {
                        it.Text     = string.Empty;
                        e.IsHandled = true;
                        //2015.08.26 정광호 수정
                        ResetInputs(true);
                        //ResetInputs();
                        return;
                    }

                    if (it.Text.Length > 0 && e.Key.OPOSKey == WSWD.WmallPos.FX.Shared.OPOSMapKeys.KEY_ENTER)
                    {
                        ValidateGiftNo(false, it.Text);
                        e.IsHandled = true;
                        return;
                    }

                    if (!e.IsControlKey)
                    {
                        StatusMessage = MSG_INPUT;
                    }
                }

                if (e.Key.OPOSKey == WSWD.WmallPos.FX.Shared.OPOSMapKeys.KEY_CLEAR)
                {
                    SaleGridRow row  = (SaleGridRow)cell.Parent;
                    var         itNo = (InputText)row.Cells[1].Controls[0];

                    if (it.Text.Length > 0 && !it.ReadOnly && itNo.Text.Length == 0)
                    {
                        e.IsHandled = true;
                        it.Text     = string.Empty;
                        UpdateTotalGiftAmt();
                        return;
                    }

                    e.IsHandled = true;
                    this.PreviousControl();
                }
                else if (e.Key.OPOSKey == WSWD.WmallPos.FX.Shared.OPOSMapKeys.KEY_ENTER)
                {
                    // validate number enterred
                    if (cell.ColumnIndex == 3 && !it.ReadOnly)
                    {
                        var val = TypeHelper.ToInt64(it.Text.Replace(",", ""));
                        val     = ValidateMoney(val);
                        it.Text = val.ToString();
                    }

                    // update total git amount
                    UpdateTotalGiftAmt();
                    e.IsHandled = true;
                    this.NextControl();
                }
            }
        }