Esempio n. 1
0
 public JournalPriceFilter ToJournalPriceFilter(FeeType? feeType)
 {
     return new JournalPriceFilter
     {
         JournalId = this.Id,
         PageNumber = this.Page,
         PageSize = this.PageSize,
         FeeType = feeType
     };
 }
Esempio n. 2
0
        public FeeCalc(FeeType feeType, string name, ICurrency feeCurrency, IAssetManager assetManager)
            : this()
        {
            if ((feeType == null || feeType.Key == FeeTypes.None)|| string.IsNullOrEmpty(name) || feeCurrency == null || assetManager == null)
                throw new ApplicationException("Not all parameters are passed in to instantiate a new fee calculation");

            FeeType = feeType;
            Name = name;
            FeeCurrency = feeCurrency;
            this.AssetManager = assetManager;

            checkData();
        }
        public FeeType GetFeeType(int feeTypeId)
        {
            FeeType feeType = new FeeType();

            feeType = db.FeeTypes.SingleOrDefault(c => c.FeeTypeId == feeTypeId);
            if (feeType != null)
            {
                if (feeType.FeeTypeDescription == "Client Fee")
                {
                    feeType.FeeTypeDescription = "Transaction Fee";
                }
            }
            return(feeType);
        }
Esempio n. 4
0
 public static TransactionBuildContext CreateTransactionBuildContext(
     string sendingWalletName,
     string sendingAccountName,
     string sendingPassword,
     ICollection <Recipient> recipients,
     FeeType feeType,
     int minConfirmations)
 {
     return(new TransactionBuildContext(new WalletAccountReference(sendingWalletName, sendingAccountName), recipients.ToList(), sendingPassword)
     {
         MinConfirmations = minConfirmations,
         FeeType = feeType
     });
 }
Esempio n. 5
0
        public AirlineFeeMVVM(FeeType feeType, double value)
        {
            this.FeeType = feeType;
            this.Value   = value;

            if (this.FeeType.MaxValue - this.FeeType.MinValue < 4)
            {
                this.Frequency = 0.05;
            }
            else
            {
                this.Frequency = 0.25;
            }
        }
Esempio n. 6
0
        public bool Save(FeeType feeType, ref StringBuilder sbError)
        {
            if (feeType == null)
            {
                sbError.Append("enter all fields required");
                return(false);
            }



            var dbFlag = false;

            var grades = _uofRepository.FeeTypeRepository.GetListBySchoolId(_user.SchoolID, ref dbFlag) ?? new List <FeeType>();

            if (feeType.FeeTypeID != null)
            {
                if (grades.Count() > 30)
                {
                    sbError.Append("You have reached maximum number of fee type allowed");
                    return(false);
                }
            }

            feeType.SchoolID = _user.SchoolID;
            if (string.IsNullOrEmpty(feeType.Description))
            {
                sbError.Append("Description is required");
                return(false);
            }
            if (feeType.Description.Length <= 1 || feeType.Description.Length >= 50)
            {
                sbError.Append("Description should not be long than 50 characters");
                return(false);
            }
            if (string.IsNullOrEmpty(feeType.Code))
            {
                sbError.Append("Code is required");
                return(false);
            }

            if (feeType.Code.Length <= 1 || feeType.Code.Length >= 10)
            {
                sbError.Append("Code should not be long than 10 characters");
                return(false);
            }
            var save = _uofRepository.FeeTypeRepository.Save(feeType, _user.Username, ref dbFlag);

            return(save);
        }
        public async Task <IActionResult> Create([Bind("FTId,Feetype1,FeeYear,TotalFees")] FeeType feeType)
        {
            if (string.IsNullOrEmpty(HttpContext.Session.GetString("Session1")))
            {
                return(RedirectToAction("UserLogin", "Login"));
            }
            if (ModelState.IsValid)
            {
                _context.Add(feeType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(feeType));
        }
Esempio n. 8
0
        internal static string ToSerializedValue(this FeeType value)
        {
            switch (value)
            {
            case FeeType.Unknown:
                return("Unknown");

            case FeeType.Absolute:
                return("Absolute");

            case FeeType.Relative:
                return("Relative");
            }
            return(null);
        }
Esempio n. 9
0
        /// <summary>
        /// Map a fee type to the number of confirmations
        /// </summary>
        public static int ToConfirmations(this FeeType fee)
        {
            switch (fee)
            {
            case FeeType.Low:
                return(50);

            case FeeType.Medium:
                return(20);

            case FeeType.High:
                return(5);
            }

            throw new Exception("Invalid fee");
        }
        private ReturnSeriesDto[] SaveReturnSeries(
            FeeType feeType,
            CitiMonthlyReturnsDataFileRecord[] citiMonthlyReturns)
        {
            var uniqueEntityNumbers = citiMonthlyReturns
                                      .Select(s => s.GetConvertedExternalId())
                                      .Distinct();

            var returnSeries = ConvertEntityNumbersToReturnSeries(uniqueEntityNumbers, feeType);

            foreach (var series in returnSeries)
            {
                series.ReturnSeriesId = _returnsSeriesDataRepository.InsertReturnSeries(series);
            }

            return(returnSeries);
        }
Esempio n. 11
0
        public static string UpdateFeeType(FeeType feeType)
        {
            AdoHelper objHelper = new AdoHelper(ConfigurationManager.ConnectionStrings["con"].ToString());

            SqlParameter[] sqlParameter =
            {
                new SqlParameter("@SetAction",           feeType.SetAction.ToUpper()),
                new SqlParameter("@FeeTypeId",           feeType.FeeTypeId),
                new SqlParameter("@FeeTypeName",         feeType.FeeTypeName),
                new SqlParameter("@FeeTypeDescription ", feeType.FeeTypeDescription)
            };

            Object obj    = objHelper.ExecScalarProc("GKL_USP_UpdateFeeType", sqlParameter);
            string status = "updated";

            objHelper.Dispose();
            return(status);
        }
Esempio n. 12
0
 public static MeMarketOrderFeeModel Create(
     FeeType type,
     double size,
     string sourceClientId,
     string targetClientid,
     FeeSizeType sizeType,
     string[] assetIds)
 {
     return(new MeMarketOrderFeeModel
     {
         Type = (int)type,
         Size = size,
         SourceClientId = sourceClientId,
         TargetClientId = targetClientid,
         SizeType = (int)sizeType,
         AssetId = assetIds,
     });
 }
Esempio n. 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddTransactionFeeForProductToContractRequest" /> class.
 /// </summary>
 /// <param name="contractId">The contract identifier.</param>
 /// <param name="estateId">The estate identifier.</param>
 /// <param name="productId">The product identifier.</param>
 /// <param name="transactionFeeId">The transaction fee identifier.</param>
 /// <param name="description">The description.</param>
 /// <param name="calculationType">Type of the calculation.</param>
 /// <param name="feeType">Type of the fee.</param>
 /// <param name="value">The value.</param>
 private AddTransactionFeeForProductToContractRequest(Guid contractId,
                                                      Guid estateId,
                                                      Guid productId,
                                                      Guid transactionFeeId,
                                                      String description,
                                                      CalculationType calculationType,
                                                      FeeType feeType,
                                                      Decimal value)
 {
     this.ContractId       = contractId;
     this.EstateId         = estateId;
     this.ProductId        = productId;
     this.TransactionFeeId = transactionFeeId;
     this.Description      = description;
     this.CalculationType  = calculationType;
     this.FeeType          = feeType;
     this.Value            = value;
 }
Esempio n. 14
0
 public static TransactionBuildContext CreateTransactionBuildContext(
     Network network,
     string sendingWalletName,
     string sendingAccountName,
     string sendingPassword,
     ICollection <Recipient> recipients,
     FeeType feeType,
     int minConfirmations)
 {
     return(new TransactionBuildContext(network)
     {
         AccountReference = new WalletAccountReference(sendingWalletName, sendingAccountName),
         MinConfirmations = minConfirmations,
         FeeType = feeType,
         WalletPassword = sendingPassword,
         Recipients = recipients.ToList()
     });
 }
        // This method compares this and previous blocks and finds the non-fungible token being transacted (if any).
        // It actually returns the delta between two blocks, so the direction of the transaction is defined by the block type (send or receive).
        // Since non-fungible token info never changes, it is the same for send and receive blocks, but the finding logic is slightly different
        //public abstract INonFungibleToken GetNonFungibleTransaction(TransactionBlock previousBlock);

        public override string Print()
        {
            string result = base.Print();

            result += $"AccountID: {AccountID}\n";
            result += $"Balances: {JsonConvert.SerializeObject(Balances)}\n";
            result += $"Fee: {JsonConvert.SerializeObject(Fee)}\n";
            result += $"FeeCode: {FeeCode}\n";
            result += $"FeeType: {FeeType.ToString()}\n";
            if (NonFungibleToken != null)
            {
                result += $"NonFungibleToken: {NonFungibleToken.Print()}\n";
            }
            else
            {
                result += $"NonFungibleToken: {NonFungibleToken}\n";
            }
            return(result);
        }
        public ActionResult Delete(int id)
        {
            //Get Item From Database
            ClientFeeItem clientFeeItem = new ClientFeeItem();

            clientFeeItem = clientFeeItemRepository.GetItem(id);

            //Check Exists
            if (clientFeeItem == null)
            {
                ViewData["ActionMethod"] = "EditGet";
                return(View("RecordDoesNotExistError"));
            }

            //Check Access
            RolesRepository rolesRepository = new RolesRepository();

            if (!rolesRepository.HasWriteAccessToClientFeeGroup(clientFeeItem.ClientFeeGroupId))
            {
                ViewData["Message"] = "You do not have access to this item";
                return(View("Error"));
            }

            ClientFeeItemVM clientFeeItemVM = new ClientFeeItemVM();

            clientFeeItemVM.ClientFeeItem = clientFeeItem;

            FeeTypeRepository feeTypeRepository = new FeeTypeRepository();
            FeeType           feeType           = new FeeType();

            feeType = feeTypeRepository.GetFeeType(clientFeeItem.ClientFee.FeeTypeId);
            if (feeType.FeeTypeDescription == "Client Fee")
            {
                feeType.FeeTypeDescription = "Transaction Fee";
            }
            clientFeeItemVM.FeeType = feeType;

            SelectList clientFees = new SelectList(clientFeeRepository.GetClientFeesByType(clientFeeItem.ClientFee.FeeTypeId).ToList(), "ClientFeeId", "ClientFeeDescription");

            clientFeeItemVM.ClientFees = clientFees;

            return(View(clientFeeItemVM));
        }
Esempio n. 17
0
    private void InitializeControl()
    {
        FeeInfo feeInfo = null;////Tools.DropDownListDataBindByEnum(this.ddlFeeType, typeof(FeeType), string.Empty, true, true);

        Tools.DropDownListDataBindByEnum(this.ddlCalculateSign, typeof(CalculateSign), string.Empty, true, true);
        this.InitializeFeeDropDownList();
        this.InitializeTaxTargetFeeDropDownList();
        if (action != ActionType.Add)
        {
            feeInfo                             = FeeInfoAdapter.Instance.LoadFeeInfo(yearMonth, feeID);
            this.parentID                       = feeInfo.ParentID;
            this.enumFeeType                    = feeInfo.FeeType;
            this.tbFeeCode.Text                 = feeInfo.FeeCode;
            this.tbFeeName.Text                 = feeInfo.FeeName;
            this.tbDefaultValue.Text            = feeInfo.DefaultValue.ToString("#.00");
            this.tbStartDate.Text               = base.ShowCorrectDateTime(feeInfo.StartDate.ToString());
            this.tbTaxBaseValue.Text            = feeInfo.TaxBaseValue.ToString();
            this.tbCalculateExp.Text            = FeeInfoAdapter.Instance.ConvertFeeCodeWithFeeNameInExp(yearMonth, feeInfo.CalculateExp);
            this.ddlFee.SelectedValue           = String.IsNullOrEmpty(feeInfo.ParentID) ? "" : FeeInfoAdapter.Instance.LoadFeeInfo(this.yearMonth, feeInfo.ParentID).FeeCode;
            this.ddlCalculateSign.SelectedValue = feeInfo.CalculateSign;////this.ddlFeeType.SelectedValue = ((Int32)feeInfo.FeeType).ToString();
            switch (feeInfo.FeeType)
            {
            case FeeType.Tax:
                //this.ddlTaxTargetFee.SelectedValue = FeeInfoAdapter.Instance.LoadFeeInfo(this.yearMonth, feeInfo.TaxTargetFeeID).FeeCode;
                this.TaxGridViewDataBind(false);
                break;

            case FeeType.Sum:
                this.InitializeCalculateExpFeeListBox();
                break;
            }
        }
        else
        {
            if ((this.enumFeeType.Equals(FeeType.Parameter) || this.enumFeeType.Equals(FeeType.Tax)) && !String.IsNullOrEmpty(this.parentID))
            {
                this.tbFeeName.Text = FeeInfoAdapter.Instance.LoadFeeInfo(this.yearMonth, this.parentID).FeeName;
            }////this.ddlFeeType.SelectedValue = this.enumFeeType.Equals(0) ? "" : this.enumFeeType.ToString("D");
            this.ddlFee.SelectedValue = String.IsNullOrEmpty(parentID) ? "" : FeeInfoAdapter.Instance.LoadFeeInfo(this.yearMonth, this.parentID).FeeCode;
            this.tbFeeCode.Text       = FeeInfoAdapter.Instance.CreateFeeCode(this.enumFeeType.ToString("D"), parentID);
        }
        this.ddlFeeType_SelectedIndexChanged(null, null);
    }
Esempio n. 18
0
        public TransactionInfo BuildSpendAllTransaction(List <string> fromPrivateKeys, string toAddress,
                                                        FeeType feeType = FeeType.Fastest, string message = "")
        {
            var addressAmountPair = new AddressAmountPair
            {
                Address = toAddress,
                Amount  = 0 // doesn't matter, we send all
            };

            return(BuildTransaction(
                       fromPrivateKeys,
                       new List <AddressAmountPair> {
                addressAmountPair
            },
                       feeType,
                       message: message,
                       spendAll: true
                       ));
        }
        // GET: View A Single ClientFee
        public ActionResult View(int id)
        {
            ClientFee clientFee = new ClientFee();

            clientFee = clientFeeRepository.GetItem(id);

            //Check Exists
            if (clientFee == null)
            {
                ViewData["ActionMethod"] = "ViewGet";
                return(View("RecordDoesNotExistError"));
            }

            //Check for missing GDS
            if (clientFee.GDS == null)
            {
                GDS gds = new GDS();
                clientFee.GDS = gds;
            }

            //Change DisplayText for Transaction Fees
            FeeType feeType = new FeeType();

            feeType = clientFee.FeeType;
            if (feeType.FeeTypeDescription == "Client Fee")
            {
                feeType.FeeTypeDescription = "Transaction Fee";
            }

            ClientFeeVM clientFeeVM = new ClientFeeVM();

            clientFeeVM.ClientFee = clientFee;

            ClientFeeOutput clientFeeOutput = new ClientFeeOutput();

            if (clientFee.ClientFeeOutputs.Count > 0)
            {
                clientFeeOutput = clientFeeOutputRepository.GetItem(clientFee.ClientFeeOutputs[0].ClientFeeOutputId);
            }
            clientFeeVM.ClientFeeOutput = clientFeeOutput;

            return(View(clientFeeVM));
        }
Esempio n. 20
0
        protected override string GetExtraData()
        {
            string extraData = base.GetExtraData();

            extraData += AccountID + "|";
            extraData += BalanceToString() + "|";

            extraData += JsonConvert.SerializeObject(Fee) + "|";//Fee.ToString("0.############");

            extraData += FeeCode + "|";

            if (Version < 3)
            {
                extraData += ServiceHash + "|";
            }
            extraData += FeeType.ToString() + "|";
            extraData += GetHashInputFromNonFungibleToken() + "|";
            extraData += VoteFor + "|";
            return(extraData);
        }
Esempio n. 21
0
        public async Task <Money> GetFeePerBytesAsync(FeeType feeType, CancellationToken ctsToken)
        {
            while (_firstRun)
            {
                ctsToken.ThrowIfCancellationRequested();
                await Task.Delay(100, ctsToken).ContinueWith(t => { }).ConfigureAwait(false);
            }
            ctsToken.ThrowIfCancellationRequested();

            switch (feeType)
            {
            case FeeType.Low: return(_lowFeePerBytes);

            case FeeType.Medium: return(_mediumFeePerBytes);

            case FeeType.High: return(_highFeePerBytes);

            default: throw new ArgumentException(nameof(feeType));
            }
        }
        private InvestmentVehicleBuilderForTests AddReturn(
            MonthYear monthYear,
            decimal returnValue,
            FeeType feeType)
        {
            var netSeries = _investmentVehicle.GetAllReturnSeries().FirstOrDefault(s => { return(s.FeeType == feeType); });

            if (netSeries == null)
            {
                netSeries = new MonthlyReturnSeries()
                {
                    FeeType = feeType
                };
                _investmentVehicle.AddReturnSeries(netSeries);
            }

            netSeries.AddReturn(monthYear, returnValue);

            return(this);
        }
Esempio n. 23
0
 public FeePayment(int managementContractId, decimal scheduledPaymentAmt, decimal actualPaymentAmt,
                   PaymentMethod payMethod, FeeType mangementFeeType, DateTime paymentDueDate, DateTime paymentReceivedDate,
                   /*decimal? balance,*/ bool isOnTime, int inChargeOwnerId, string note, string feeForMonth, string feeForYear,
                   DateTime created, DateTime updated)
 {
     ManagementContractId = managementContractId;
     ScheduledPaymentAmt  = scheduledPaymentAmt;
     ActualPaymentAmt     = actualPaymentAmt;
     PayMethod            = payMethod;
     MangementFeeType     = mangementFeeType;
     PaymentDueDate       = paymentDueDate;
     PaymentReceivedDate  = paymentReceivedDate;
     //Balance = balance;
     IsOnTime        = isOnTime;
     InChargeOwnerId = inChargeOwnerId;
     Note            = note;
     FeeForMonth     = feeForMonth;
     FeeForYear      = feeForYear;
     Created         = created;
     Modified        = updated;
 }
        public void AddTransactionFee(Guid transactionFeeId,
                                      CalculationType calculationType,
                                      FeeType feeType,
                                      String description,
                                      Decimal value)
        {
            TransactionFee transactionFee = new TransactionFee
            {
                TransactionFeeId = transactionFeeId,
                CalculationType  = calculationType,
                FeeType          = feeType,
                Description      = description,
                Value            = value
            };

            if (this.TransactionFees == null)
            {
                this.TransactionFees = new List <TransactionFee>();
            }
            this.TransactionFees.Add(transactionFee);
        }
Esempio n. 25
0
        private decimal CalculateHelper(FeeType feeType)
        {
            decimal result = 0m;

            foreach (var eachOrderRelation in _order.OrderRelations)
            {
                if (feeType == FeeType.Commission)
                {
                    result += eachOrderRelation.Commission;
                }
                else if (feeType == FeeType.Levy)
                {
                    result += eachOrderRelation.Levy;
                }
                else if (feeType == FeeType.OtherFee)
                {
                    result += eachOrderRelation.OtherFee;
                }
            }
            return(result);
        }
        public IEnumerable <OmniDataFileLineModel> CreateQuarterLineModels(FeeType feeType)
        {
            var models = new List <OmniDataFileLineModel>();

            _januaryToGivenMonth.ForEachMonthInRange(
                m =>
            {
                if (m.IsLastMonthOfQuarter)
                {
                    var calculateQuarterRequest = CalculateReturnRequestFactory.ThreeMonth(m);

                    var netQuarterResult = _portfolio.CalculateReturn(calculateQuarterRequest, feeType);

                    if (!netQuarterResult.HasError)
                    {
                        models.Add(CreateQuarterModel(m, netQuarterResult, feeType));
                    }
                }
            });

            return(models);
        }
Esempio n. 27
0
        public static string EnumToString(this FeeType type)
        {
            switch (type)
            {
            case FeeType.CanadianGoodsAndServicesTax: return("CA_GST");

            case FeeType.CaliforniaHarmonizedSalesTax: return("CA_HST");

            case FeeType.PrinceEdwardIslandProvincialSalesTax: return("CA_PEI_PST");

            case FeeType.ProvincialSaleTax: return("CA_PST");

            case FeeType.QuebecSalesTax: return("CA_QST");

            case FeeType.JapaneseConsumptionTax: return("JP_CONSUMPTION_TAX");

            case FeeType.UsSalesTax: return("US_SALES_TAX");

            case FeeType.Other: return("OTHER");

            default: throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 28
0
        public void GetFeeType()
        {
            _feeType = new FeeType();
            List <FeeTypeModel> _listFeeType = _feeType.GetLostableFeeType();

            if (_listFeeType != null && _listFeeType.Count > 0)
            {
                _listFeeType.Add(new FeeTypeModel {
                    FeeTypeID = 0, FeeType = "Select"
                });
                ddlFeeType.DataSource = _listFeeType.OrderBy(x => x.FeeTypeID).ThenBy(x => x.FixedName).ToList();

                ddlFeeType.ValueMember   = "FeeTypeID";
                ddlFeeType.DisplayMember = "FeeType";
            }
            else
            {
                _listFeeType = new List <FeeTypeModel>();
                _listFeeType.Add(new FeeTypeModel {
                    FeeTypeID = 0, FeeType = "Select"
                });
            }
        }
Esempio n. 29
0
 public bool AddTypes(FeeType feetype)
 {
     try
     {
         var feeType = new DataModel.FeeType
         {
             Id          = Guid.NewGuid(),
             Name        = feetype.Name,
             Description = feetype.Description,
             FeePeriodId = feetype.FeePeriodId,
             StatusId    = feetype.StatusId,
             CreatedBy   = _username,
             CreatedDate = DateTime.UtcNow
         };
         var result      = _feeDataAccess.AddType(feeType);
         var returnValue = result > 0 ? true : false;
         return(returnValue);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 30
0
    protected void Page_Load(object sender, EventArgs e)
    {//action = EnumHelper.Parse<ActionType>(DecodedQueryString[SalaryConst.QueryAction]);
        yearMonth = DecodedQueryString[FeeMonthInfoConst.YearMonth];
        String feeType = DecodedQueryString[FeeInfoConst.FeeType];

        CommonFeeType = DecodedQueryString[FeeInfoConst.CommonFeeType];
        if (!String.IsNullOrEmpty(feeType))
        {
            this.enumFeeType = EnumHelper.Parse <FeeType>(feeType);
        }
        //if (!String.IsNullOrEmpty(commonFeeType))
        //{
        //    this.enumCommonFeeType = EnumHelper.Parse<CommonFeeType>(commonFeeType);
        //}
        if (!IsPostBack)
        {
            this.InitializeControl();
        }
        else
        {
            GridViewControl.ResetGridView(this.gvList);
        }
    }
Esempio n. 31
0
        private void BindFeeTypeDropDownList()
        {
            _feetype = new FeeType();
            List <FeeTypeModel> _listFeeList = _feetype.GetFeeType();

            if (_listFeeList != null)
            {
                _listFeeList.Add(new FeeTypeModel {
                    FeeTypeID = 0, FeeType = "Select"
                });
                colFeeType.DataSource    = _listFeeList.OrderBy(x => x.FeeTypeID).ToList();
                colFeeType.DisplayMember = "FeeType";
                colFeeType.ValueMember   = "FeeTypeID";
            }
            //foreach (DataGridViewRow row in gridFeeSetting.Rows)
            //{
            //    DataGridViewComboBoxCell ddlFeeType = (DataGridViewComboBoxCell)(row.Cells["colFeeType"]);
            //    ddlFeeType.DataSource = dicFeeType.ToList();
            //    ddlFeeType.DisplayMember = "Value";
            //    ddlFeeType.ValueMember = "Key";
            //    ddlFeeType.Value = 0;
            //}
        }
Esempio n. 32
0
 public static MeLimitOrderFeeModel Create(
     FeeType type,
     double makerSize,
     double takerSize,
     string sourceClientId,
     string targetClientId,
     FeeSizeType makerSizeType,
     FeeSizeType takerSizeType,
     string[] assetId,
     double makerFeeModificator)
 {
     return(new MeLimitOrderFeeModel
     {
         Type = (int)type,
         MakerSize = makerSize,
         TakerSize = takerSize,
         SourceClientId = sourceClientId,
         TargetClientId = targetClientId,
         MakerSizeType = (int)makerSizeType,
         TakerSizeType = (int)takerSizeType,
         AssetId = assetId,
         MakerFeeModificator = makerFeeModificator
     });
 }
Esempio n. 33
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.yearMonth = DecodedQueryString[FeeMonthInfoConst.YearMonth];
     this.feeID = DecodedQueryString[FeeInfoConst.FeeID];
     this.parentID = DecodedQueryString[FeeInfoConst.ParentID];
     this.action = EnumHelper.Parse<ActionType>(DecodedQueryString[SalaryConst.QueryAction]);
     String feeType = DecodedQueryString[FeeInfoConst.FeeType], commonFeeType = DecodedQueryString[FeeInfoConst.CommonFeeType];
     if (!String.IsNullOrEmpty(feeType))
     {
         this.enumFeeType = EnumHelper.Parse<FeeType>(feeType);
         this.name = this.enumFeeType.Equals(FeeType.Common) ? "工资组成" : this.enumFeeType.Equals(FeeType.Sum)
             ? "工资计算" : this.enumFeeType.Equals(FeeType.Parameter) ? "参数" : this.enumFeeType.Equals(FeeType.Tax) ? "个税" : this.name;
     }
     if (!String.IsNullOrEmpty(commonFeeType))
     {
         this.enumCommonFeeType = EnumHelper.Parse<CommonFeeType>(commonFeeType);
     }
     if (!IsPostBack)
     {
         this.InitializeControl();
     }
     else
     {
         GridViewControl.ResetGridView(this.gvTaxList);
     }
 }
 public void SetMembershipFeeType(FeeType feeType)
 {
     switch (feeType)
     {
         case FeeType.OneTimeFee:
             UIUtil.DefaultProvider.WaitForDisplayAndClick(Locator.FeeTypeLocator + "0", LocateBy.Id);
             break;
         case FeeType.ReccuringMembershipFee:
             UIUtil.DefaultProvider.WaitForDisplayAndClick(Locator.FeeTypeLocator + "1", LocateBy.Id);
             break;
     }
 }
Esempio n. 35
0
 private void InitializeControl()
 {
     FeeInfo feeInfo = null;////Tools.DropDownListDataBindByEnum(this.ddlFeeType, typeof(FeeType), string.Empty, true, true);
     Tools.DropDownListDataBindByEnum(this.ddlCalculateSign, typeof(CalculateSign), string.Empty, true, true);
     this.InitializeFeeDropDownList();
     this.InitializeTaxTargetFeeDropDownList();
     if (action != ActionType.Add)
     {
         feeInfo = FeeInfoAdapter.Instance.LoadFeeInfo(yearMonth, feeID);
         this.parentID = feeInfo.ParentID;
         this.enumFeeType = feeInfo.FeeType;
         this.tbFeeCode.Text = feeInfo.FeeCode;
         this.tbFeeName.Text = feeInfo.FeeName;
         this.tbDefaultValue.Text = feeInfo.DefaultValue.ToString("#.00");
         this.tbStartDate.Text = base.ShowCorrectDateTime(feeInfo.StartDate.ToString());
         this.tbTaxBaseValue.Text = feeInfo.TaxBaseValue.ToString();
         this.tbCalculateExp.Text = FeeInfoAdapter.Instance.ConvertFeeCodeWithFeeNameInExp(yearMonth, feeInfo.CalculateExp);
         this.ddlFee.SelectedValue = String.IsNullOrEmpty(feeInfo.ParentID) ? "" : FeeInfoAdapter.Instance.LoadFeeInfo(this.yearMonth, feeInfo.ParentID).FeeCode;
         this.ddlCalculateSign.SelectedValue = feeInfo.CalculateSign;////this.ddlFeeType.SelectedValue = ((Int32)feeInfo.FeeType).ToString();
         switch (feeInfo.FeeType)
         {
             case FeeType.Tax:
                 //this.ddlTaxTargetFee.SelectedValue = FeeInfoAdapter.Instance.LoadFeeInfo(this.yearMonth, feeInfo.TaxTargetFeeID).FeeCode;
                 this.TaxGridViewDataBind(false);
                 break;
             case FeeType.Sum:
                 this.InitializeCalculateExpFeeListBox();
                 break;
         }
     }
     else
     {
         if ((this.enumFeeType.Equals(FeeType.Parameter) || this.enumFeeType.Equals(FeeType.Tax)) && !String.IsNullOrEmpty(this.parentID))
         {
             this.tbFeeName.Text = FeeInfoAdapter.Instance.LoadFeeInfo(this.yearMonth, this.parentID).FeeName;
         }////this.ddlFeeType.SelectedValue = this.enumFeeType.Equals(0) ? "" : this.enumFeeType.ToString("D");
         this.ddlFee.SelectedValue = String.IsNullOrEmpty(parentID) ? "" : FeeInfoAdapter.Instance.LoadFeeInfo(this.yearMonth, this.parentID).FeeCode;
         this.tbFeeCode.Text = FeeInfoAdapter.Instance.CreateFeeCode(this.enumFeeType.ToString("D"), parentID);
     }
     this.ddlFeeType_SelectedIndexChanged(null, null);
 }
Esempio n. 36
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //action = EnumHelper.Parse<ActionType>(DecodedQueryString[SalaryConst.QueryAction]);
     yearMonth = DecodedQueryString[FeeMonthInfoConst.YearMonth];
     String feeType = DecodedQueryString[FeeInfoConst.FeeType];
     CommonFeeType = DecodedQueryString[FeeInfoConst.CommonFeeType];
     if (!String.IsNullOrEmpty(feeType))
     {
         this.enumFeeType = EnumHelper.Parse<FeeType>(feeType);
     }
     //if (!String.IsNullOrEmpty(commonFeeType))
     //{
     //    this.enumCommonFeeType = EnumHelper.Parse<CommonFeeType>(commonFeeType);
     //}
     if (!IsPostBack)
     {
         this.InitializeControl();
     }
     else
     {
         GridViewControl.ResetGridView(this.gvList);
     }
 }