public int BusinessGetLastDeptId()
        {
            SqlParameter deptId = new SqlParameter("@DeptId", SqlDbType.Int)
            {
                Direction = ParameterDirection.Output
            };
            DataAddDepartment objDataAddDepartment = new DataAddDepartment();

            try
            {
                deptId = objDataAddDepartment.DataGetLastDeptId(deptId);
            }
            catch (SqlException)
            {
                throw new InvalidOperationException();
            }
            int DeptId = (int)deptId.Value;

            return(DeptId);
        }
 public BusinessAddDepartment()
 {
     objDatatable   = new DataTable();
     objDataAddDept = new DataAddDepartment();
 }