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); }
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); } }