Ejemplo n.º 1
0
        public static DepartmentBO GetDepartmentBO(DepartmentBO departmentBO)
        {
            DeptDesigAndFinInstitutionDAS deptDesigAndFinInstitutionDAS = new DeptDesigAndFinInstitutionDAS();
            string jsondata = deptDesigAndFinInstitutionDAS.GetDepartment(departmentBO);
            List <DepartmentBO> departmentBOs;

            if (!jsondata.StartsWith("DB_ERROR"))
            {
                departmentBOs = StringUtil.DeserializeObjectFromJSON <List <DepartmentBO> >(jsondata);
                departmentBO  = departmentBOs.ElementAt(0);
            }
            return(departmentBO);
        }
Ejemplo n.º 2
0
        public static bool IsDepartmentPresent(DepartmentBO department)
        {
            DeptDesigAndFinInstitutionDAS deptDesigAndFinInstitutionDAS = new DeptDesigAndFinInstitutionDAS();
            string jsondata = deptDesigAndFinInstitutionDAS.GetDepartment(department);

            if (!jsondata.StartsWith("DB_ERROR"))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }