Exemple #1
0
        private void btnAddProg_Click(object sender, EventArgs e)
        {
            using (var frm = new frmProgram())
            {
                if (frm.ShowDialog() == DialogResult.Cancel) return;

                Dal.AddOrUpdateProgram(null, frm.textBox1.Text);

            }
            LoadData();
        }
Exemple #2
0
        private void EditProgram(DataRow workoutProgram)
        {
            using (var frm = new frmProgram())
            {
                frm.textBox1.Text = workoutProgram["Name"].ToString();
                frm.btnOk.Text = "שמור";
                if (frm.ShowDialog() == DialogResult.Cancel) return;

                Dal.AddOrUpdateProgram(workoutProgram["id"] as int?, frm.textBox1.Text);
            }
            LoadData();
        }