Esempio n. 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();
            }
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="e"></param>
        void gpPQ12_RowDataBound(WSWD.WmallPos.POS.FX.Win.UserControls.RowDataBoundEventArgs e)
        {
            PQ12RespData data = (PQ12RespData)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[i].Controls[0].ForeColor = Color.Black;
                }
                return;
            }
            e.Row.Cells[0].Controls[0].Text = data.PresentDate.Substring(2) + "-" + data.PresentNo;// +"-" + data.PresentSeq;
            e.Row.Cells[1].Controls[0].Text = data.PrmName;
            e.Row.Cells[2].Controls[0].Text = data.EventGbn;
            e.Row.Cells[3].Controls[0].Text = data.SumFg;
            e.Row.Cells[4].Controls[0].Text = DateTimeUtils.FormatDateString(data.SaleDate, "/");;
            e.Row.Cells[5].Controls[0].Text = data.PosNo;
            e.Row.Cells[6].Controls[0].Text = data.TrxnNo;

            // Loc changed 11.4
            // 반품처리완료여부 = R, 금액 (-)처리
            e.Row.Cells[7].Controls[0].Text = string.Format("{1}{0:#,##0}",
                                                            TypeHelper.ToInt32(data.SaleAmt), data.RtnProcFg.Equals("R") ? "-" : "");
            e.Row.Cells[7].Controls[0].ForeColor = data.RtnProcFg.Equals("R") ? Color.Red : Color.Black;
        }
Esempio n. 3
0
        void gpPQ11_RowDataBound(WSWD.WmallPos.POS.FX.Win.UserControls.RowDataBoundEventArgs e)
        {
            RtnPrsGiftData data = (RtnPrsGiftData)e.ItemData;

            e.Row.Cells[0].Controls[0].Text = (e.Row.RowIndex + 1).ToString("d2");
            e.Row.Cells[1].Controls[0].Text = data != null ? data.GiftNo : string.Empty;
            e.Row.Cells[1].Controls[0].Tag  = true; // no changes
            e.Row.Cells[2].Controls[0].Text = data == null ? string.Empty : string.Format("{0:#,###}", TypeHelper.ToInt32(data.GiftCount));
            e.Row.Cells[3].Controls[0].Text = data == null ? string.Empty : string.Format("{0:#,###}", TypeHelper.ToInt32(data.GiftAmt));
            e.Row.Cells[4].Controls[0].Text = data == null ? string.Empty : data.GiftUsage;
        }
Esempio n. 4
0
        /// <summary>
        /// Find events
        /// </summary>
        /// <param name="row"></param>
        /// <param name="userStates"></param>
        private void FireRowEvent(SaleGridRow row, object itemData)
        {
            if (RowDataBound != null)
            {
                var e = new RowDataBoundEventArgs()
                {
                    Row      = row,
                    ItemData = itemData
                };
                RowDataBound(e);
                if (!e.CancelSet)
                {
                    row.ItemData = itemData;
                }
            }

            if (row.HasCell)
            {
                if (CellDataBound != null)
                {
                    foreach (SaleGridCell cell in row.Cells)
                    {
                        var e = new CellDataBoundEventArgs()
                        {
                            Cell     = cell,
                            ItemData = itemData
                        };

                        CellDataBound(e);

                        if (!e.CancelSet)
                        {
                            row.ItemData = itemData;
                        }
                    }
                }
            }
        }