예제 #1
0
        private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
        {
            int    column  = dataGridView1.CurrentCell.ColumnIndex;
            string colName = dataGridView1.Columns[column].Name;

            if (colName == "colPromocion")
            {
                TextBox tb           = e.Control as TextBox;
                Form    frmSelectIMG = new frmlSelectImg();
                frmSelectIMG.ShowDialog();
                try
                {
                    tb.Text = selectedPromo;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }

            if (colName == "colDias")
            {
                TextBox tb            = e.Control as TextBox;
                Form    frmSelectDias = new frmSelectDays();
                frmSelectDias.ShowDialog();
                try
                {
                    tb.Text = selectedDdays;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }
        }
예제 #2
0
        private void selectDdays()
        {
            Form frmSelectDays = new frmSelectDays();

            frmSelectDays.Show();
        }