Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            addEdit ad = new addEdit();

            ad.money_done = 0;
            ad.ShowDialog();
            fill();
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            addEdit ad = new addEdit();

            ad.Text                         = "تعديل";
            ad.button1.Text                 = "تعديل";
            ad.money_done                   = decimal.Parse(DataGrid.CurrentRow.Cells[6].Value.ToString());
            ad.textBox1.Text                = DataGrid.CurrentRow.Cells[0].Value.ToString();
            ad.textBox2.Text                = DataGrid.CurrentRow.Cells[4].Value.ToString();
            ad.textBox3.Text                = DataGrid.CurrentRow.Cells[13].Value.ToString();
            ad.dateTimePicker1.Text         = DataGrid.CurrentRow.Cells[10].Value.ToString();
            ad.metroComboBox1.SelectedValue = Int32.Parse(DataGrid.CurrentRow.Cells[1].Value.ToString());
            ad.metroComboBox2.SelectedValue = Int32.Parse(DataGrid.CurrentRow.Cells[8].Value.ToString());
            ad.metroComboBox3.SelectedValue = Int32.Parse(DataGrid.CurrentRow.Cells[11].Value.ToString());
            ad.ShowDialog();
            fill();
        }