Ejemplo n.º 1
0
        void obj_ondatasaved(object sender, Custom.Advanceformclosedargs e)
        {
            var emp = (employee)e.data;
            var k   = new EmployeeViwer()
            {
                id     = emp.id,
                name   = emp.name,
                salary = (decimal)emp.salary,
                phone  = emp.phone,
                addr   = emp.adress
            };

            panel4.Controls.Add(k);
        }
Ejemplo n.º 2
0
        private void employees_list_Load(object sender, EventArgs e)
        {
            List <employee> employeese = db.employees.ToList();

            foreach (employee emp in employeese)
            {
                var k = new EmployeeViwer()
                {
                    id     = emp.id,
                    name   = emp.name,
                    salary = (decimal)emp.salary,
                    phone  = emp.phone,
                    addr   = emp.adress
                };
                panel4.Controls.Add(k);
            }
        }