Example #1
0
        public Boat(SerializationInfo info, StreamingContext ctxt)
        {
            date = info.GetDateTime("date");
            boatName = (boatType)info.GetValue("boatName",typeof(boatType));
            sailTime = info.GetString("sailTime");
            bankOut = info.GetDecimal("bankOut");

            pkgsOut = info.GetInt32("pkgsOut");
            pkgsNotViewed = info.GetInt32("pkgsNotViewed");
            pkgsViewedNS = info.GetInt32("pkgsViewedNS");

            clicker = info.GetInt32("clicker");
            headcount = info.GetInt32("headcount");
            paxCount = info.GetInt32("paxCount");

            AllInVal = info.GetDecimal("AllInVal");
            BaseVal = info.GetDecimal("BaseVal");
            AcrylOnlyVal = info.GetDecimal("AcrylOnlyVal");

            sold_allIn = info.GetInt32("sold_allIn");
            sold_baseOnly = info.GetInt32("sold_baseOnly");
            sold_acrylicOnly = info.GetInt32("sold_acrylicOnly");
            sold_reprint_allIn = info.GetInt32("sold_reprint_allIn");
            sold_reprint_Base = info.GetInt32("sold_reprint_Base");
            sold_acrylicAddOn = info.GetInt32("sold_acrylicAddOn");
            missingPackages = info.GetInt32("missingPackages");

            pkgsSold = info.GetInt32("pkgsSold");
            pkgsNotSold = info.GetInt32("pkgsNotSold");

            otherPrints = info.GetInt32("otherPrints");
            otherValue = info.GetDecimal("otherValue");

            override_AllInCount = info.GetBoolean("override_AllInCount");
            override_CashAmt = info.GetBoolean("override_AllInCount");

            inBank = (Bank)info.GetValue("inBank",typeof(Bank));
            depositBank = (Bank)info.GetValue("depositBank", typeof(Bank));

            expectedTotal = info.GetDecimal("expectedTotal");
            actualTotal = info.GetDecimal("actualTotal");
            grossTotal = info.GetDecimal("grossTotal");
            netProfit = info.GetDecimal("netProfit");
            perCap = info.GetDecimal("perCap");

            amEx = (NonCashAsset)info.GetValue("amEx",typeof(NonCashAsset));
            visa = (NonCashAsset)info.GetValue("visa", typeof(NonCashAsset));
            mastercard = (NonCashAsset)info.GetValue("mastercard", typeof(NonCashAsset));
            discover = (NonCashAsset)info.GetValue("discover", typeof(NonCashAsset));
            directBill = (NonCashAsset)info.GetValue("directBill", typeof(NonCashAsset));
            personalCheck = (NonCashAsset)info.GetValue("personalCheck", typeof(NonCashAsset));

            notes = info.GetString("notes");
            employeeInitials = info.GetString("employeeInitials");

            isLocked = info.GetBoolean("isLocked");
        }
Example #2
0
        private decimal calcCCTotal(NonCashAsset CC)
        {
            decimal tempTotal = 0.0m;
            tempTotal += CC.numAllins*AllInVal;
            tempTotal += CC.numBaseOnly*BaseVal;
            tempTotal += CC.numAcrylicOnly*AcrylOnlyVal;
            tempTotal += CC.numAcrylicAddOn * Settings.GlobalSettings.addOnAcrylVal;
            tempTotal += CC.otherValue;

            return tempTotal;
        }
Example #3
0
        /// <summary>
        /// Set all values in the Boat to 0, or their default value.
        /// Also used for initialization.
        /// </summary>
        public void clearBoat()
        {
            date = DateTime.Today;
            boatName = boatType.Minne;
            sailTime = "notime";
            bankOut = 0.0m;

            pkgsOut = 0;
            pkgsNotViewed = 0;
            pkgsViewedNS = 0;

            clicker = 0;
            headcount = 0;
            paxCount = 0;

            AllInVal = 0.0m;
            BaseVal = 0.0m;
            AcrylOnlyVal = 0.0m;

            sold_allIn = 0;
            sold_baseOnly = 0;
            sold_acrylicOnly = 0;
            sold_reprint_allIn = 0;
            sold_reprint_Base = 0;
            sold_acrylicAddOn = 0;
            missingPackages = 0;

            otherPrints = 0;
            otherValue = 0.0m;

            override_AllInCount = false;
            override_CashAmt = false;

            inBank = new Bank();

            expectedTotal = 0.0m;
            actualTotal = 0.0m;
            grossTotal = 0.0m;
            netProfit = 0.0m;
            perCap = 0.0m;

            amEx = new NonCashAsset();
            visa = new NonCashAsset();
            mastercard = new NonCashAsset();
            discover = new NonCashAsset();
            directBill = new NonCashAsset();
            personalCheck = new NonCashAsset();

            notes = String.Empty;
            isLocked = false;
        }