Ejemplo n.º 1
0
        private void btnDetails_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                int TicketId = 0;
                int index    = 0;
                int PageNo   = 1;
                if (!string.IsNullOrEmpty(iPageNum.ToString()))
                {
                    PageNo = iPageNum;
                }
                if (dgPromoHistGridView.SelectedIndex >= 0)
                {
                    if (PageNo > 1)
                    {
                        index = dgPromoHistGridView.SelectedIndex + (NoOfRecordsInPage * (PageNo - 1));
                    }
                    else
                    {
                        index = dgPromoHistGridView.SelectedIndex;
                    }


                    TicketId        = Convert.ToInt32((((System.Data.DataRowView)(dgPromoHistGridView.SelectedItem)).Row)["PromotionalID"]);
                    promoName       = Convert.ToString((((System.Data.DataRowView)(dgPromoHistGridView.SelectedItem)).Row)["PromotionalName"]);
                    promHistDetails = new PromoHistDetails(TicketId, promoName);

                    promHistDetails.ShowDialogEx(this);
                }
                else
                {
                    MessageBox.ShowBox("MessageID883", BMC_Icon.Information);
                }
                //   int TicketId = (lstPromoHistGridView.SelectedItem as PromotionalClass).PromotionalID ;
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
        private void btnDetails_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                int TicketId=0;
                int index = 0;
                int PageNo = 1;
                if (!string.IsNullOrEmpty(iPageNum.ToString()))
                {
                    PageNo = iPageNum;
                }
                if (dgPromoHistGridView.SelectedIndex >= 0)
                {
                    if (PageNo>1)
                    {
                        index = dgPromoHistGridView.SelectedIndex + (NoOfRecordsInPage * (PageNo - 1));
                    }
                    else
                    {
                        index = dgPromoHistGridView.SelectedIndex;
                    }


                    TicketId = Convert.ToInt32((((System.Data.DataRowView)(dgPromoHistGridView.SelectedItem)).Row)["PromotionalID"]);
                    promoName = Convert.ToString((((System.Data.DataRowView)(dgPromoHistGridView.SelectedItem)).Row)["PromotionalName"]);
                    promHistDetails = new PromoHistDetails(TicketId, promoName);

                    promHistDetails.ShowDialogEx(this);
                }
                else
                {
                    MessageBox.ShowBox("MessageID883", BMC_Icon.Information);
                }
             //   int TicketId = (lstPromoHistGridView.SelectedItem as PromotionalClass).PromotionalID ;
                
                
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }