public static List<CabProperty> GetActiveCabPropertyList()
 {
     List<CabProperty> lstCabProperty = null;
     PropertyManagementBLL objCabPropertyManagementBLL = null;
     try
     {
         objCabPropertyManagementBLL = new PropertyManagementBLL();
         lstCabProperty = objCabPropertyManagementBLL.GetCabPropertyList(null, true);
     }
     catch (Exception ex)
     {
         // Log the error to a text file in the Error folder
         Common.WriteError(ex);
     }
     finally
     {
         objCabPropertyManagementBLL = null;
     }
     return lstCabProperty;
 }
 public static Int32 AddNewCabProperty(CabProperty CabProperty)
 {
     int isFlag = 0;
     Common objCommon = new Common();
     PropertyManagementBLL objCabPropertyManagementBLL = null;
     try
     {
         objCabPropertyManagementBLL = new PropertyManagementBLL();
         CabProperty.CreatedBy = objCommon.GetCurrentUserName();
         isFlag = objCabPropertyManagementBLL.InsertCabProperty(CabProperty);
     }
     catch (Exception ex)
     {
         // Log the error to a text file in the Error folder
         Common.WriteError(ex);
     }
     finally
     {
         objCabPropertyManagementBLL = null;
     }
     return isFlag;
 }
 public static bool DeleteSelectedCabProperty(string CabPropertyIds, bool IsActive)
 {
     bool isFlag = false;
     PropertyManagementBLL objCabPropertyManagementBLL = null;
     try
     {
         Common objCommon = new Common();
         objCabPropertyManagementBLL = new PropertyManagementBLL();
         string ModifiedBy = objCommon.GetCurrentUserName();
         isFlag = objCabPropertyManagementBLL.Active_InactiveCabProperty(CabPropertyIds, IsActive, ModifiedBy);
     }
     catch (Exception ex)
     {
         // Log the error to a text file in the Error folder
         Common.WriteError(ex);
     }
     finally
     {
         objCabPropertyManagementBLL = null;
     }
     return isFlag;
 }
 public static bool UpdateCabProperty(CabProperty CabProperty)
 {
     bool isFlag = false;
     PropertyManagementBLL objCabPropertyManagementBLL = null;
     try
     {
         Common objCommon = new Common();
         objCabPropertyManagementBLL = new PropertyManagementBLL();
         CabProperty.ModifiedBy = objCommon.GetCurrentUserName();
         isFlag = objCabPropertyManagementBLL.UpdateCabProperty(CabProperty);
     }
     catch (Exception ex)
     {
         // Log the error to a text file in the Error folder
         Common.WriteError(ex);
     }
     finally
     {
         objCabPropertyManagementBLL = null;
     }
     return isFlag;
 }