Пример #1
0
        private void buttonX3_Click(object sender, EventArgs e)
        {
            if (dgvcus[0, dgvcus.CurrentRow.Index].Value.ToString() != null)
            {
                string    ticketcell = dgvcus[0, dgvcus.CurrentRow.Index].Value.ToString();
                int       g          = Convert.ToInt32(ticketcell);
                sabtbelit tickt      = new sabtbelit();
                tickt.id = Convert.ToInt32(ticketcell);

                DataTable  dt      = tickt.vwselect();
                Frm_ticket tick    = new Frm_ticket();
                Frm_Login  userlog = new treelayer.Frm_Login();


                for (int i = 0; i <= g; i++)
                {
                    tick.txtmo.Text     = dgvcus.CurrentRow.Cells[1].Value.ToString();
                    tick.txtlasmo.Text  = dgvcus.CurrentRow.Cells[2].Value.ToString();
                    tick.txtkarbar.Text = userlog.txt_username.Text;
                }

                tick.Show();
            }
            else
            {
                MessageBox.Show("برای ثبت بلیط ابتدا یک ردیف را انتخاب کنید ");
            }
        }
Пример #2
0
        private void Frm_ticket_Load(object sender, EventArgs e)
        {
            sabtbelit sabtuser = new sabtbelit();

            dgvbilit.DataSource = sabtuser.vwselect();


            // Frm_Login userlog = new treelayer.Frm_Login();
            // txtkarbar.Text = PublicVaribal.gusername;
        }