Exemplo n.º 1
0
        public int editEmployees(IEmployeeBO objBo)
        {
            IEmployeeDAL objDAL = EmployeeDALFactory.createEmployeeDAL();
            int          obj1   = objDAL.editEmployeeDB(objBo);

            return(obj1);
        }
Exemplo n.º 2
0
        public List <int> getUnitHeadID()
        {
            IEmployeeDAL objDAL = EmployeeDALFactory.createEmployeeDAL();
            List <int>   list   = objDAL.getUnitHeadIDDB();

            return(list);
        }
Exemplo n.º 3
0
        //CRUD3
        public int addEmployee(IEmployeeBO obj)
        {
            IEmployeeDAL objDAL = EmployeeDALFactory.createEmployeeDAL();
            int          result = objDAL.addEmployeeDB(obj);

            return(result);
        }
Exemplo n.º 4
0
        public List <IEmployeeBO> ViewEmployee()
        {
            IEmployeeDAL       objDAL  = EmployeeDALFactory.createEmployeeDAL();
            List <IEmployeeBO> objList = objDAL.viewEmployeeDB();

            return(objList);
        }
Exemplo n.º 5
0
        public int  getctc(int id)
        {
            IEmployeeDAL objDAL = EmployeeDALFactory.createEmployeeDAL();
            int          obj1   = objDAL.getCTCDB(id);

            return(obj1);
        }
Exemplo n.º 6
0
        public string getDesignation(int id)
        {
            IEmployeeDAL objDAL = EmployeeDALFactory.createEmployeeDAL();
            string       obj1   = objDAL.getDesignationDB(id);

            return(obj1);
        }
Exemplo n.º 7
0
        public int getUnitHeadId(int id)
        {
            IEmployeeDAL objDAL = EmployeeDALFactory.createEmployeeDAL();
            int          obj1   = objDAL.getUnitIDDB(id);

            return(obj1);
        }
Exemplo n.º 8
0
        public string getEmpName(int id)
        {
            IEmployeeDAL objDAL = EmployeeDALFactory.createEmployeeDAL();
            string       obj1   = objDAL.getEmpNameDB(id);

            return(obj1);
        }
Exemplo n.º 9
0
        //crud1
        public List <int> displaydropdown()
        {
            IEmployeeDAL       obj1    = EmployeeDALFactory.createDAL();
            List <IEmployeeBO> newlist = new List <IEmployeeBO>();

            return(obj1.displayDropdownDB());
        }
Exemplo n.º 10
0
        public List <string> getEmployeeName()
        {
            IEmployeeDAL  objDAL = EmployeeDALFactory.createEmployeeDAL();
            List <string> list   = objDAL.getEmployeeNameDB();

            return(list);
        }
Exemplo n.º 11
0
        public UserValidation(IEmployeeDAL employeeDAL)
        {
            _employeeDAL = employeeDAL;

            RuleFor(d => d.EmployeeId)
            .Cascade(CascadeMode.Stop)
            .NotNull()
            .WithMessage("Favor selecionar um funcionário")
            .NotEmpty()
            .WithMessage("Favor selecionar um funcionário")
            .Must(ExistEmployee)
            .WithMessage("Funcionário não encontrado");

            RuleFor(d => d.Login)
            .Cascade(CascadeMode.Stop)
            .NotEmpty()
            .WithMessage("Usuário deve ser informado")
            .NotNull()
            .WithMessage("Usuário deve ser informado")
            .Length(8, 20)
            .WithMessage("Usuário deve conter entre 8 a 20 caracteres")
            .Must(LoginIsValid)
            .WithMessage("Usuário inválido");

            RuleFor(d => d.Password)
            .Cascade(CascadeMode.Stop)
            .NotNull()
            .WithMessage("Senha deve ser informada")
            .NotEmpty()
            .WithMessage("Senha deve ser informada")
            .Length(8, 20)
            .WithMessage("Senha deve conter entre 8 a 20 caracteres");
        }
Exemplo n.º 12
0
 public EmployeeBLL(IEmployeeDAL employeeDAL, EmployeeValidation employeeValidation,
                    IMapper mapper, IAddressBLL addressBLL) : base(employeeDAL)
 {
     _employeeDAL        = employeeDAL;
     _employeeValidation = employeeValidation;
     _mapper             = mapper;
     _addressBLL         = addressBLL;
 }
Exemplo n.º 13
0
        static void Main(string[] args)
        {
            IEmployeeDAL    empDal       = Factory.GetObjectOfEmployeeDAL();
            EmployeeBL      employeeBL   = new EmployeeBL(empDal);
            List <Employee> ListEmployee = employeeBL.GetAllEmployees();

            foreach (Employee emp in ListEmployee)
            {
                Console.WriteLine("ID = {0}, Naam = {1}, Afdeling = {2}", emp.ID, emp.Name, emp.Department);
            }
            Console.ReadKey();
        }
Exemplo n.º 14
0
        /// <summary>
        /// khởi tạp tầng nghiệp vụ
        /// hàm này phải được gọi trước khi sử dụng các chức năng khác trong lớp
        /// </summary>
        /// <param name="dbType">Loại CSDL</param>
        /// <param name="connectionString">chuỗi tham số kết nối</param>
        public static void Init(DatabaseTypes dbType, string connectionString)
        {
            switch (dbType)
            {
            case DatabaseTypes.SQLServer:
                EmployeeDB = new LiteCommerce.DataLayers.SQLServer.EmployeeDAL(connectionString);
                break;

            case DatabaseTypes.FakeDB:
                break;

            default:
                throw new Exception("Database type is not supported");
            }
        }
Exemplo n.º 15
0
 /// <summary>
 /// Khởi tạo tính năng tác nghiệp (Hàm này phải được gọi nếu muốn sử dụng các tính năng của lớp)
 /// </summary>
 /// <param name="dbType"></param>
 /// <param name="connectionString"></param>
 public static void Init(DatabaseTypes dbType, string connectionString)
 {
     switch (dbType)
     {
         case DatabaseTypes.SQLServer:
             CountryDB = new DataLayers.SQLServer.CountryDAL(connectionString);
             CityDB = new DataLayers.SQLServer.CityDAL(connectionString);
             SupplierDB = new DataLayers.SQLServer.SupplierDAL(connectionString);
             CategoryDB = new DataLayers.SQLServer.CategoryDAL(connectionString);
             CustomerDB = new DataLayers.SQLServer.CustomerDAL(connectionString);
             EmployeeDB = new DataLayers.SQLServer.EmployeeDAL(connectionString);
             ShipperDB = new DataLayers.SQLServer.ShipperDAL(connectionString);
             break;
         default:
             throw new Exception("Database Type is not Supported");
     }
 }
Exemplo n.º 16
0
 public EmployeeProcess(IMapper mapper, IEmployeeDAL employeeDAL)
 {
     _employeeDAL = employeeDAL;
     _mapper      = mapper;
 }
Exemplo n.º 17
0
 public EmployeeProcess(IEmployeeDAL employeeDAL)
 {
 }
Exemplo n.º 18
0
 public OrderService(IOrderDAL orderDAL, ICustomerDAL customerDAL, IEmployeeDAL employeeDAL)
 {
     _orderDAL    = orderDAL;
     _customerDAL = customerDAL;
     _employeeDAL = employeeDAL;
 }
Exemplo n.º 19
0
 public EmployeeService(IEmployeeDAL _db)
 {
     db = _db;
 }
Exemplo n.º 20
0
        public int CheckEmp(IEmployeeBO obj)
        {
            IEmployeeDAL obj1 = EmployeeFaDAL.CreateDAL();

            return(obj1.CheckEmployee(obj));
        }
Exemplo n.º 21
0
        public void RegisterEmp(IEmployeeBO obj)
        {
            IEmployeeDAL obj1 = EmployeeFaDAL.CreateDAL();

            obj1.Register(obj);
        }
Exemplo n.º 22
0
 public EmployeeBLL(IEmployeeDAL iEmployeeDAL)
 {
     _employeeDAL = iEmployeeDAL;
 }
Exemplo n.º 23
0
 public EmployeeBL(IEmployeeDAL employeeDal)
 {
     this.employeeDal = employeeDal;
 }
Exemplo n.º 24
0
 /// <summary>
 /// Hàm này phải được gọi để khởi tạo các chức năng tác nghiệp
 /// </summary>
 /// <param name="connectionString"></param>
 public static void Initialize(string connectionString)
 {
     EmployeeDB = new DataLayers.SqlServer.EmployeeDAL(connectionString);
 }
 public EmployeeBAL(IEmployeeDAL employeeDAL)
 {
     DALObject = employeeDAL;
 }
Exemplo n.º 26
0
 public EmployeeBLL()
 {
     _employeeDAL = new EmployeeDAL();
 }
Exemplo n.º 27
0
 public EmployeeBL(IEmployeeDAL employeeDAL)
 {
     this.employeeDAL = employeeDAL;
 }
Exemplo n.º 28
0
 public EmployeeService()
 {
     employeeDAL = new EmployeeDAL();
 }
Exemplo n.º 29
0
 public EmployeeBLL()
 {
     objDal = new EmployeeDAL();
 }
Exemplo n.º 30
0
 public EmployeeService(IEmployeeDAL employeeDAL)
 {
     this.employeeDAL = employeeDAL;
 }
Exemplo n.º 31
0
 public EmployeeBL(IEmployeeDAL employeeDAL)
 {
     _employeeDAL = employeeDAL;
 }
Exemplo n.º 32
0
 public employeeServices()
 {
     _employeeDal = new EmployeeDAL();
 }
Exemplo n.º 33
0
 // public EmployeeBL(IEmployeeDAL employeeDAL)
 // {
 //     this.employeeDAL=employeeDAL;
 // }
 public List <IEmployee> GetAllEmployee(IEmployeeDAL employeeDAL)
 {
     this.employeeDAL = employeeDAL;
     return(employeeDAL.SelectAllEmployee());  //emp objects tinne mekene
 }
Exemplo n.º 34
0
 public EmployeeBL(IUnitOfWorkFactory unitOfWorkFactory, IEmployeeDAL employeeDal, IDependentDAL dependentDal)
 {
     _employeeDal       = employeeDal;
     _dependentDal      = dependentDal;
     _unitOfWorkFactory = unitOfWorkFactory;
 }