Ejemplo n.º 1
0
        public DepartmentInfo GetDepartmentInfoByDepartmentCode(string departmentCode)
        {
            DepartmentInfo departmentInfo = new DepartmentInfo();

            DepartmentDal dal = new DepartmentDal();

            DataSet ds = dal.GetDepartmentInfoByDepartmentCode(departmentCode);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                departmentInfo = ConvertToModel(ds.Tables[0].Rows[0]);
            }

            return departmentInfo;
        }
Ejemplo n.º 2
0
        public DepartmentInfo GetDepartmentById(int departmentId)
        {
            DepartmentInfo departmentInfo = new DepartmentInfo();

            DepartmentDal dal = new DepartmentDal();

            DataSet ds = dal.GetDepartmentById(departmentId);

            if(ds!=null &&ds.Tables.Count>0&&ds.Tables[0].Rows.Count>0)
            {
                departmentInfo = ConvertToModel(ds.Tables[0].Rows[0]);
            }

            return departmentInfo;
        }
Ejemplo n.º 3
0
 public DataSet GetDepartmentList(string departmentCodeOrName, int parentDepartmentId)
 {
     DepartmentDal dal = new DepartmentDal();
     return dal.GetDepartmentList(departmentCodeOrName, parentDepartmentId);
 }
Ejemplo n.º 4
0
 public DataSet GetAllDepartment()
 {
     DepartmentDal dal = new DepartmentDal();
     return dal.GetAllDepartment();
 }
Ejemplo n.º 5
0
 public void DeleteById(int departmentId)
 {
     DepartmentDal dal = new DepartmentDal();
     dal.DeleteById(departmentId);
 }
Ejemplo n.º 6
0
        public void AddDepartment(DepartmentInfo departmentInfo)
        {
            DepartmentDal dal = new DepartmentDal();

            dal.AddDepartment(departmentInfo);
        }
Ejemplo n.º 7
0
        public void Update(DepartmentInfo departmentInfo)
        {
            DepartmentDal dal = new DepartmentDal();

            dal.Update(departmentInfo);
        }