Exemple #1
0
        void gpPQ11_RowDataBound(WSWD.WmallPos.POS.FX.Win.UserControls.RowDataBoundEventArgs e)
        {
            PQ11RespData data = (PQ11RespData)e.ItemData;

            if (data == null)
            {
                for (int i = 0; i < e.Row.Cells.Length; i++)
                {
                    e.Row.Cells[i].Controls[0].Text    = string.Empty;
                    e.Row.Cells[3].Controls[0].Visible = false;

                    if (i >= 5)
                    {
                        InputText it = (InputText)e.Row.Cells[i].Controls[0];
                        it.Focusable = false;
                        it.HasBorder = false;
                    }
                }
                return;
            }

            e.Row.Cells[0].Controls[0].Text = data.PresentDate.Substring(2) + "-" + data.PresentNo + "-" + data.PresentSeq;
            e.Row.Cells[1].Controls[0].Text = data.TksGiftName;
            int amt = TypeHelper.ToInt32(data.PresentAmt);

            e.Row.Cells[2].Controls[0].Text    = string.Format("{0:#,###}", TypeHelper.ToInt32(data.PresentAmt));
            e.Row.Cells[3].Controls[0].Text    = data.ExchGiftNo;
            e.Row.Cells[3].Controls[0].Visible = !string.IsNullOrEmpty(data.ExchGiftNo);
            e.Row.Cells[4].Controls[0].Text    = string.Format("{0:#,###}", TypeHelper.ToInt32(data.ReturnAmt));

            e.Row.Cells[5].Controls[0].Text = string.IsNullOrEmpty(data.ExchGiftNo) ? data.RtnCashAmt.ToString() : data.RtnGiftCashAmt.ToString();
            e.Row.Cells[6].Controls[0].Text = data.RtnGiftAmt.ToString();
            e.Row.Cells[7].Controls[0].Text = data.RtnPresentAmt.ToString();

            e.Row.Cells[8].Controls[0].Text = data.RtnCantRsn;

            // 상품권 있을때 현물입력 못하게
            if (!string.IsNullOrEmpty(data.ExchGiftNo))
            {
                e.Row.Cells[7].Controls[0].Tag = true;
            }
            else
            {
                // 상품권 아닐때, 상품권금액 입력 불가
                e.Row.Cells[6].Controls[0].Tag = true;
            }


            for (int i = 5; i < 9; i++)
            {
                InputText it = (InputText)e.Row.Cells[i].Controls[0];
                it.Focusable = true;
                it.HasBorder = true;
            }

            if (e.Row.RowIndex == 0)
            {
                ((InputText)e.Row.Cells[5].Controls[0]).SetFocus();
            }
        }
Exemple #2
0
        /// <summary>
        /// 반납상품교환권 등록화면
        /// <param name="giftButton">해당행의 교환권번호버튼</param>
        /// </summary>
        void ShowDetailExchGiftList(WSWD.WmallPos.POS.FX.Win.UserControls.Button giftButton)
        {
            // TODO
            // 1. Check amount, remain 회수금액 > 0
            // 2. Check 미회수입력
            SaleGridCell cell        = giftButton.Parent as SaleGridCell;
            SaleGridRow  row         = cell.Row;
            string       noRtnReason = row.Cells[8].Controls[0].Text;

            if (!string.IsNullOrEmpty(noRtnReason))
            {
                ShowMessageBox(WSWD.WmallPos.FX.Shared.MessageDialogType.Warning, string.Empty,
                               ERR_MSG_NORTN_RSN_ENTER_INVALID);
                return;
            }

            if (string.IsNullOrEmpty(giftButton.Text))
            {
                return;
            }

            string exchGiftNo = giftButton.Text;

            Int64 cashAmt = TypeHelper.ToInt64(row.Cells[5].Controls[0].Text.Replace(",", ""));
            //Int64 giftAmt = TypeHelper.ToInt64(row.Cells[6].Controls[0].Text.Replace(",", ""));
            Int64 retAmt = TypeHelper.ToInt64(row.Cells[4].Controls[0].Text.Replace(",", ""));

            // SHOW POUPP
            using (var pop = ChildManager.ShowPopup(string.Empty, "WSWD.WmallPos.POS.SL.dll",
                                                    "WSWD.WmallPos.POS.SL.VC.POS_SL_P007", m_rtnPrsGiftList, giftButton.Text, retAmt - cashAmt))
            {
                var res = pop.ShowDialog(this);
                if (res == DialogResult.OK)
                {
                    // Update back to row data from P007 pop
                    var retList = (List <RtnPrsGiftData>)pop.ReturnResult["GIFT_LIST"];
                    m_rtnPrsGiftList[giftButton.Text] = retList;

                    // update total input gift amt;
                    PQ11RespData data = (PQ11RespData)row.ItemData;
                    data.RtnGiftAmt = (long)pop.ReturnResult["GIFT_TOTAL"];
                    row.Cells[6].Controls[0].Text = data.RtnGiftAmt.ToString();
                    data.RtnPrsnList = new List <RtnPrsGiftData>();
                    data.RtnPrsnList.AddRange(retList);
                }
            }
        }
Exemple #3
0
        public POS_SL_P005(List <PQ11RespData> presentList, BasketHeader basketHeader)
        {
            InitializeComponent();

            this.m_prsnList = new List <PQ11RespData>();

            if (presentList != null)
            {
                foreach (var prn in presentList)
                {
                    PQ11RespData p = (PQ11RespData)PQ11RespData.Parse(typeof(PQ11RespData), prn.ToString());
                    this.m_prsnList.Add(p);
                }
            }

            this.m_bskHeader = basketHeader;

            // 데이타로드
            FormInitialize();
        }
Exemple #4
0
        /// <summary>
        /// 현재입력중인 데이타를 확인한다
        /// </summary>
        void ValidateCurrentInput()
        {
            if (this.FocusedControl == null)
            {
                return;
            }

            InputText input = (InputText)this.FocusedControl;

            if ((input.Tag == null ? false : (bool)input.Tag))
            {
                return;
            }

            SaleGridCell cell = (SaleGridCell)input.Parent;

            Int64 val = 0;

            if (cell.ColumnIndex != 8 &
                input.DataType == WSWD.WmallPos.POS.FX.Shared.InputTextDataType.Numeric)
            {
                val        = TypeHelper.ToInt64(input.Text);
                val        = ValidateMoney(val);
                input.Text = val.ToString();
            }

            PQ11RespData data = (PQ11RespData)cell.Row.ItemData;

            if (data == null)
            {
                return;
            }

            // todo
            // 1.aappl value to data item;

            switch (cell.ColumnIndex)
            {
            case 5:
                // if cash column; it ExchGiftNo empty, only accept cash
                if (string.IsNullOrEmpty(data.ExchGiftNo))
                {
                    data.RtnCashAmt     = val;
                    data.RtnGiftCashAmt = 0;
                }
                else
                {
                    // if not, accept cash stands for gift
                    data.RtnGiftCashAmt = val;
                    data.RtnCashAmt     = 0;
                }
                break;

            case 6:
                data.RtnGiftAmt = val;
                break;

            case 7:
                // 현물금액
                data.RtnPresentAmt = val;
                break;

            default:
                //if (!"1".Equals(input.Text) && !string.IsNullOrEmpty(input.Text))
                //{
                //    input.Text = "2";
                //}

                if (!string.IsNullOrEmpty(input.Text))
                {
                    if (!m_nonRtnReasons.ContainsKey(input.Text))
                    {
                        input.Text = string.Empty;
                    }
                }

                data.RtnCantRsn = input.Text;
                break;
            }
        }