public static List<CabCapacity> GetCabCapacity()
        {
            List<CabCapacity> lstcabcapacity = null;
            CabManagementBLL objCabManagementBLL = null;
            try
            {
                objCabManagementBLL = new CabManagementBLL();
                lstcabcapacity = objCabManagementBLL.GetCABCAPCITY();
            }
            catch(Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
            }
            finally { objCabManagementBLL = null; }

            return lstcabcapacity;
        }
        public static List<CabManagementt> GetAllCabListByDC(string DCID)
        {
            List<CabManagementt> lstRoute = null;
            CabManagementBLL objCabManagementBLL = null;
            CabManagementt cabManagement = new CabManagementt();
            try
            {
                objCabManagementBLL = new CabManagementBLL();
                lstRoute = objCabManagementBLL.GetAllCabListByDC(DCID);
            }
            catch (Exception ex)
            {

            }
            finally
            {
                objCabManagementBLL = null;
            }
            return lstRoute;
        }
        public static List<CabManagementt> GetActiveCabDetail()
        {
            List<CabManagementt> lstcabdetail = null;
            CabManagementBLL objcabmanagement = null;
            try
            {
                objcabmanagement = new CabManagementBLL();
                lstcabdetail = objcabmanagement.GetCabDetail(null,true);
            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);

            }
            finally
            {
                objcabmanagement = null;
            }
            return lstcabdetail;
        }
        public static bool PenaltyOnCab(Penalty PenaltyImpose)
        {
            bool flag = false;
            Common objCommon = new Common();
            CabManagementBLL objCabManagementBLL = new CabManagementBLL();
            try
            {
                flag = objCabManagementBLL.PenaltyOnCab(PenaltyImpose);

            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
            }
            finally
            {
                objCabManagementBLL = null;
            }
            return flag;
        }
        public static bool DeleteSelectedCab(string CabId, string Comment,bool IsActive)
        {
            bool isFlag = false;
            CabManagementBLL objCabManagementBLL = null;
            try
            {
                Common objCommon = new Common();
                objCabManagementBLL = new CabManagementBLL();
                string ModifiedBy = objCommon.GetCurrentUserName();
                isFlag = objCabManagementBLL.ActiveInactiveCabDetail(CabId, IsActive, Comment, ModifiedBy);

            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
            }
            finally
            {
                objCabManagementBLL = null;

            }
            return isFlag;
        }
        public static bool UpdateCabDetail(CabManagementt cabManagement)
        {
            bool isFlag = false;
            CabManagementBLL objCabManagementBLL = null;

            try
            {
                Common objCommon = new Common();
                objCabManagementBLL = new CabManagementBLL();
                cabManagement.ModifiedBy = objCommon.GetCurrentUserName();
                isFlag = objCabManagementBLL.UpdateCabDetail(cabManagement);

            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
             }
            finally
            {
                objCabManagementBLL = null;
            }
            return isFlag;
        }
        public static Int32 InsertCabDetail(CabManagementt  cabManagement)
        {
            CabManagementBLL objCabManagementBLL = null;
            Int32 Result=0;

            try
            {
                Common objCommon = new Common();
                objCabManagementBLL = new CabManagementBLL();
                cabManagement.CreatedBy = objCommon.GetCurrentUserName();

                Result = objCabManagementBLL.InsertCabDetail(cabManagement);
            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
            }
            finally
            {
                objCabManagementBLL = null;
            }
            return Result;
        }
        public static List<CabProperty> GetCabVerificationDetail(string CabId, string Comment)
        {
            List<CabProperty> lstCabVerificationDetail = null;
            CabManagementBLL objCabManagementBLL = null;
            try
            {
                objCabManagementBLL = new CabManagementBLL();
                lstCabVerificationDetail = objCabManagementBLL.GetCabVerificationDetail(CabId);

            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
            }
            finally
            {
                objCabManagementBLL = null;

            }
            return lstCabVerificationDetail;
        }
        public static List<CabType> GetCabType()
        {
            List<CabType> lstcabtype = null;
            CabManagementBLL objCabManagementBLL = null;
            try
            {
                objCabManagementBLL = new CabManagementBLL();
                lstcabtype = objCabManagementBLL.GetCABTYPE(true);
            }
            catch (Exception ex)
            {
                // Log the error to a text file in the Error folder
                Common.WriteError(ex);
            }
            finally
            {
                objCabManagementBLL = null;
            }

            return lstcabtype;
        }