Пример #1
0
        public ModelEmployee Login(String SerialNumber, String Password)
        {
            var employee    = new ModelEmployee();
            var daoEmployee = new DaoEmployee();

            foreach (DataRow row in daoEmployee.Login(SerialNumber, Password).Rows)
            {
                employee.Name        = Convert.ToString(row["Name"]);
                employee.Departament = Convert.ToString(row["Departament"]);
                employee.SeriaNumber = Convert.ToString(row["SerialNumber"]);
                employee.IsTecnic    = Convert.ToInt32(row["IsTecnic"]);
            }
            return(employee);
        }
Пример #2
0
        public List <ModelEmployee> ListEmployee()
        {
            var lista       = new List <ModelEmployee>();
            var daoEmployee = new DaoEmployee();

            foreach (DataRow row in daoEmployee.List().Rows)
            {
                var employee = new ModelEmployee();
                employee.Name        = Convert.ToString(row["Name"]);
                employee.Departament = Convert.ToString(row["Departament"]);
                employee.SeriaNumber = Convert.ToString(row["SerialNumber"]);
                employee.IsTecnic    = Convert.ToInt32(row["IsTecnic"]);

                lista.Add(employee);
            }
            return(lista);
        }