private void LoadEmptyCassette(GetUndeclaredVaultDrops vd_select)
        {
            try
            {
                var redcolor = new System.Windows.Media.SolidColorBrush(Colors.DarkRed);
                var blackcolor = new System.Windows.Media.SolidColorBrush(Colors.Black);

                var BoldFont = new System.Windows.FontWeight();
                BoldFont = System.Windows.FontWeights.Bold;

                var NormalFont = new System.Windows.FontWeight();
                NormalFont = System.Windows.FontWeights.Normal;
                List<CassetteDropsResult> lst_emptycassette = new List<CassetteDropsResult>();
                int temp_cassetteid = 1;
                foreach (string strdenom in sCassetteDenom)
                {

                    int idenom = dic_denoms[strdenom];

                    lst_emptycassette.Add(new CassetteDropsResult
                    {
                        Cassette_ID = temp_cassetteid++,
                        CassetteType_ID = (int)CassetteTypes.Cassette,
                        Cassette_Name = "Cassette :" + idenom,
                        DeclaredBalance = 0,
                        Denom = idenom,
                        IsChecked = true,
                        Drop_ID = vd_select.Drop_ID,
                        VaultBalance = 0,
                        EnableControls = true,
                        FontColor = blackcolor,
                        CustomFontWeight = NormalFont,
                        IsBillCounterAmountEditable = Settings.IsBillCounterAmountEditable,
                        IsBillCounterQuantityEditable = !Settings.IsBillCounterAmountEditable
                    });
                }
                if (lst_emptycassette.Count > 0)
                {
                    p_cassette = new CassetteDropsResult
                    {
                        Cassette_ID = 0,
                        CassetteType_ID = (int)CassetteTypes.Cassette,
                        Cassette_Name = "Total Cassettes (" + lst_emptycassette.Count + ")",
                        DeclaredBalance = 0,
                        Denom = 0,
                        Drop_ID = vd_select.Drop_ID,
                        VaultBalance = 0,
                        EnableControls = false,
                        FontColor = redcolor,
                        CustomFontWeight = BoldFont,
                        IsBillCounterAmountEditable = false,
                        IsBillCounterQuantityEditable = false
                    };
                    lst_emptycassette.Add(p_cassette);
                }

                if (sHopperDenom != null && sHopperDenom.Length > 0)
                {
                    foreach (string str in sHopperDenom)
                    {
                        float val = 0f;
                        if (float.TryParse(str, out val))
                        {
                            lst_emptycassette.Add(new CassetteDropsResult
                            {
                                Cassette_ID = temp_cassetteid++,
                                CassetteType_ID = (int)CassetteTypes.Hopper,
                                Cassette_Name = "Hopper :" + val,
                                DeclaredBalance = 0,
                                Denom = val,
                                IsChecked = true,
                                Drop_ID = vd_select.Drop_ID,
                                VaultBalance = 0,
                                EnableControls = true,
                                FontColor = blackcolor,
                                CustomFontWeight = NormalFont,
                                IsBillCounterAmountEditable = Settings.IsBillCounterAmountEditable,
                                IsBillCounterQuantityEditable = !Settings.IsBillCounterAmountEditable
                            });
                        }

                    }
                    if (lst_emptycassette.Count > 0)
                    {
                        p_hopper = new CassetteDropsResult
                        {
                            Cassette_ID = 0,
                            CassetteType_ID = (int)CassetteTypes.Hopper,
                            Cassette_Name = "Total Hoppers (" + sHopperDenom.Length + ")",
                            DeclaredBalance = 0,
                            Denom = 0,
                            Drop_ID = vd_select.Drop_ID,
                            VaultBalance = 0,
                            EnableControls = false,
                            FontColor = redcolor,
                            CustomFontWeight = BoldFont,
                            IsBillCounterAmountEditable = false,
                            IsBillCounterQuantityEditable = false
                        };
                        lst_emptycassette.Add(p_hopper);
                    }
                }
                vd_select.Cassettes = lst_emptycassette;
                lst_cassettes = lst_emptycassette;
                lv_CassetteDetails.ItemsSource = lst_emptycassette;

            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }
        }
        bool ValidateAmount(GetUndeclaredVaultDrops v_drops)
        {
            bool retval = true;
            try
            {
                foreach (CassetteDropsResult cassette in v_drops.Cassettes)
                {
                    if (cassette.EnableControls)
                    {

                        if (cassette.DeclaredBalance > cassette.MaxFillAmount && (!v_drops.IsEmptyCassette))
                        {
                            string strType = "";
                            strType = (cassette.CassetteType_ID == (int)CassetteTypes.Cassette) ? " cassette " : " hopper ";
                            strType += cassette.Cassette_Name;
                            lblcounterWarning.Text = (Application.Current.FindResource("Vault_MessageID24").ToString() + strType).Replace("@@@@@", cassette.MaxFillAmount.GetUniversalCurrencyFormatWithSymbol());
                            lv_CassetteDetails.SelectedItem = cassette;
                            retval = false;
                            break;
                        }
                        if (IsAmountEditable)
                        {
                            if (cassette.DeclaredBalance % Convert.ToDecimal(cassette.Denom.Value) != 0)
                            {
                                string strMsg = Application.Current.FindResource("VaultCassette_MessageID7").ToString().Replace("@@@@@", cassette.Cassette_Name);
                                //MessageBox.ShowBox(strMsg, BMC_Icon.Warning, true);           
                                lblcounterWarning.Text = strMsg;
                                lv_CassetteDetails.SelectedItem = cassette;
                                retval = false;
                                break;
                            }
                            else
                            {

                                cassette.Quantity = Convert.ToInt32(Math.Truncate(cassette.DeclaredBalance / Convert.ToDecimal(cassette.Denom.Value)));
                                CalculateTotal(cassette.CassetteType_ID);
                            }
                        }

                    }

                }
                if (v_drops.IsEmptyCassette && retval)
                {
                    decimal tot_val = (p_cassette != null ? p_cassette.DeclaredBalance : 0) + (p_hopper != null ? p_hopper.DeclaredBalance : 0);
                    if (tot_val > v_drops.VaultCapacity)
                    {
                        lblcounterWarning.Text = Application.Current.FindResource("Vault_MessageID24").ToString().Replace("@@@@@", v_drops.VaultCapacity.GetUniversalCurrencyFormatWithSymbol());
                        retval = false;

                    }
                }
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
                retval = false;
            }
            return retval;
        }