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

                    scope.Complete();
                }

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

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

            return(objClsFleetColors);
        }