예제 #1
0
파일: Boat.cs 프로젝트: JDiPierro/BoatSheet
        public Boat(boatType inBoat)
        {
            clearBoat();
            inBank = new Bank();
            depositBank = new Bank();

            determinePrices(inBoat);
            date = DateTime.Today;
        }
예제 #2
0
파일: Boat.cs 프로젝트: JDiPierro/BoatSheet
 public Boat()
 {
     clearBoat();
     inBank = new Bank();
     depositBank = new Bank();
     boatName = boatType.Minne;
     determinePrices(boatName);
     date = DateTime.Today;
 }
예제 #3
0
파일: Boat.cs 프로젝트: JDiPierro/BoatSheet
        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");
        }
예제 #4
0
파일: Boat.cs 프로젝트: JDiPierro/BoatSheet
        /// <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;
        }
예제 #5
0
        /// <summary>
        /// Updates the value of the given denomination in the depBank Bank object.
        /// Also updates the text display of the corresponding NumericUpDown.
        /// </summary>
        /// <param name="denom">The denomination to be updated.</param>
        /// <param name="value">The value to save.</param>
        /// <param name="toUpdate">The corresponding display.</param>
        private void updateNextBank(Bank.Denomination denom, int value, NumericUpDown toUpdate)
        {
            depBank.setValue(denom, value);
            toUpdate.Value = currBoat.inBank.getValue(denom) - value;

            dep_Total.Text = String.Format("{0:C}", depBank.getTotal());
            next_Total.Text = String.Format("{0:C}", currBoat.inBank.getTotal() - depBank.getTotal());
        }
예제 #6
0
 private void loadDisplay(Bank.Denomination denom, NumericUpDown nextUpdate, NumericUpDown depUpdate)
 {
     nextUpdate.Value = currBoat.inBank.getValue(denom) - depBank.getValue(denom);
     depUpdate.Value = depBank.getValue(denom);
 }
예제 #7
0
        public Deposit(Boat in_currBoat)
        {
            this.InitializeComponent();
            currBoat = in_currBoat;
            depBank = currBoat.depositBank;

            disp_cashToPull.Text = String.Format("{0:C}", currBoat.getCashProfit());
            dep_Total.Text = String.Format("{0:C}", depBank.getTotal());

            next_Total.Text = String.Format("{0:C}", currBoat.inBank.getTotal() - depBank.getTotal());

            for(int i = 0; i < 15; i++)
            {
                switch((Bank.Denomination)i)
                {
                    case Bank.Denomination.QUARTERS_LOOSE:
                        loadDisplay((Bank.Denomination)i, next_Ls_Quarters, dep_Ls_Quarters);
                        break;
                    case Bank.Denomination.QUARTER_ROLLS:
                        loadDisplay((Bank.Denomination)i, next_Rl_Quarters, dep_Rl_Quarters);
                        break;
                    case Bank.Denomination.NICKELS_LOOSE:
                        loadDisplay((Bank.Denomination)i, next_Ls_Nickels, dep_Ls_Nickels);
                        break;
                    case Bank.Denomination.NICKEL_ROLLS:
                        loadDisplay((Bank.Denomination)i, next_Rl_Nickels, dep_Rl_Nickels);
                        break;
                    case Bank.Denomination.DIMES_LOOSE:
                        loadDisplay((Bank.Denomination)i, next_Ls_Dimes, dep_Ls_Dimes);
                        break;
                    case Bank.Denomination.DIME_ROLLS:
                        loadDisplay((Bank.Denomination)i, next_Rl_Dimes, dep_Rl_Dimes);
                        break;
                    case Bank.Denomination.PENNIES_LOOSE:
                        loadDisplay((Bank.Denomination)i, next_Ls_Pennies, dep_Ls_Pennies);
                        break;
                    case Bank.Denomination.PENNY_ROLLS:
                        loadDisplay((Bank.Denomination)i, next_Rl_Pennies, dep_Rl_Pennies);
                        break;
                    case Bank.Denomination.ONES:
                        loadDisplay((Bank.Denomination)i, next_Ones, dep_Ones);
                        break;
                    case Bank.Denomination.FIVES:
                        loadDisplay((Bank.Denomination)i, next_Fives, dep_Fives);
                        break;
                    case Bank.Denomination.TENS:
                        loadDisplay((Bank.Denomination)i, next_Tens, dep_Tens);
                        break;
                    case Bank.Denomination.TWENTIES:
                        loadDisplay((Bank.Denomination)i, next_Twenties, dep_Twenties);
                        break;
                    case Bank.Denomination.FIFTIES:
                        loadDisplay((Bank.Denomination)i, next_Fifties, dep_Fifties);
                        break;
                    case Bank.Denomination.HUNDREDS:
                        loadDisplay((Bank.Denomination)i, next_Hundreds, dep_Hundreds);
                        break;
                }//End DEnom Switch

                if(currBoat.isLocked)
                {
                    toggleLock();
                }
            }//End For loop
        }