public long SaveFleetColors(ClsFleetColors objSave)
        {
            try
            {
                using (TransactionScope scope = new TransactionScope())
                {
                    using (this.objDataContext = GetDataContext())
                    {
                        var result = this.objDataContext.InsertOrUpdateFleetColors(objSave.lgId, objSave.strFleetColorsName, _mySession.UserId, PageMaster.FleetColors).FirstOrDefault();
                        if (result != null)
                        {
                            objSave.lgId = result.InsertedId;
                        }
                    }

                    objDataContext.SubmitChanges();
                    scope.Complete();
                }

                return(objSave.lgId);
            }
            catch (Exception ex)
            {
                _logger.Write(ex, System.Reflection.MethodBase.GetCurrentMethod().Name, PageMaster.FleetColors, _mySession.UserId);
                return(0);
            }
        }
        public ClsFleetColors GetFleetColorsByFleetColorsId(long lgFleetColorsId)
        {
            ClsFleetColors objClsFleetColors = new ClsFleetColors();

            try
            {
                using (this.objDataContext = GetDataContext())
                {
                    GetFleetColorsByIdResult item = this.objDataContext.GetFleetColorsById(lgFleetColorsId).ToList().FirstOrDefault();
                    if (item != null)
                    {
                        objClsFleetColors.lgId = item.Id;
                        objClsFleetColors.strFleetColorsName = item.FleetColorsName;
                    }
                }
            }
            catch (Exception ex)
            {
                _logger.Write(ex, System.Reflection.MethodBase.GetCurrentMethod().Name, PageMaster.FleetColors, _mySession.UserId);
            }

            return(objClsFleetColors);
        }