Beispiel #1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (EmpAddEditForm frm = new EmpAddEditForm(null))
     {
         if (frm.ShowDialog() == DialogResult.OK)
         {
             employeeinfoBindingSource.DataSource = EmployeeInfoServices.GetAll();
         }
     }
 }
Beispiel #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (employeeinfoBindingSource.Current == null)
            {
                return;
            }

            using (EmpAddEditForm frm = new EmpAddEditForm(employeeinfoBindingSource.Current as employee_info))
            {
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    employeeinfoBindingSource.DataSource = EmployeeInfoServices.GetAll();
                }
            }
        }