public OfficeType GetOfficeTypesAbbreviation(string OfficeTypeAbbreviation)
 {
     try
     {
         return(OfficeTypeIntegration.GetOfficeTypeByOfficeTypeAbbreviation(OfficeTypeAbbreviation));
     }
     catch (Exception ex)
     {
         throw (new Exception(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + (new System.Diagnostics.StackFrame()).GetMethod().Name, ex));
     }
 }
 public int DeleteOfficeType(int OfficeTypeId)
 {
     try
     {
         return(OfficeTypeIntegration.DeleteOfficeType(OfficeTypeId));
     }
     catch (Exception ex)
     {
         throw (new Exception(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + (new System.Diagnostics.StackFrame()).GetMethod().Name, ex));
     }
 }
 public List <OfficeType> GetOfficeTypesByCompanyID(int ComapnyID = -1)
 {
     try
     {
         return(OfficeTypeIntegration.GetOfficeTypesByCompanyID(ComapnyID));
     }
     catch (Exception ex)
     {
         throw (new Exception(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + (new System.Diagnostics.StackFrame()).GetMethod().Name, ex));
     }
 }
 public List <OfficeType> GetOfficeTypesParentOfficeTypeID(int ParentOfficeTypeID)
 {
     try
     {
         return(OfficeTypeIntegration.GetOfficeTypesByHierarchyIndex(ParentOfficeTypeID));
     }
     catch (Exception ex)
     {
         throw (new Exception(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + (new System.Diagnostics.StackFrame()).GetMethod().Name, ex));
     }
 }
 public List <OfficeType> GetOfficeTypesAll(bool showDeleted = false)
 {
     try
     {
         return(OfficeTypeIntegration.GetOfficeTypesAll(showDeleted));
     }
     catch (Exception ex)
     {
         throw (new Exception(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + (new System.Diagnostics.StackFrame()).GetMethod().Name, ex));
     }
 }
        public List <OfficeType> GetOfficeTypeListByUserID(int userID)
        {
            //return OfficeTypeIntegration.GetOfficeTypeListByUserID(userID);

            string UniqueKey = "OfficeTypeListByUserID_" + userID.ToString();

            if (HttpRuntime.Cache[UniqueKey] == null)
            {
                List <OfficeType> OfficeTypeList = OfficeTypeIntegration.GetOfficeTypeListByUserID(userID);
                HttpRuntime.Cache[UniqueKey] = OfficeTypeList;
            }
            return((List <OfficeType>)(HttpRuntime.Cache[UniqueKey]));
        }