Ejemplo n.º 1
0
    private void LoadFromUsableBudget()
    {
        int city  = int.Parse(tr_FromOrganizeCity.SelectValue);
        int month = int.Parse(ddl_FromMonth.SelectedValue);

        if (city > 0)
        {
            IList <FNA_BudgetBalance> balances = FNA_BudgetBalanceBLL.GetModelList("OrganizeCity=" + city.ToString() +
                                                                                   " AND AccountMonth=" + month.ToString() + " ORDER BY FeeType");

            #region 根据费用类型加上余额中没有的类型,以便支持从下级向上调回该费用类型的预算额度
            Dictionary <string, Dictionary_Data> dicFeetype = DictionaryBLL.GetDicCollections("FNA_FeeType");
            foreach (Dictionary_Data dic in dicFeetype.Values)
            {
                if (balances.FirstOrDefault(p => p.FeeType == int.Parse(dic.Code)) == null)
                {
                    FNA_BudgetBalance balance = new FNA_BudgetBalance();
                    balance.AccountMonth      = month;
                    balance.OrganizeCity      = city;
                    balance.FeeType           = int.Parse(dic.Code);
                    balance.CostBalance       = 0;
                    balance.DDFInitialBalance = 0;
                    balances.Add(balance);
                }
            }
            #endregion

            gv_FromBalance.BindGrid(balances);
        }
    }
Ejemplo n.º 2
0
    private void LoadToUsableBudget()
    {
        int city  = int.Parse(tr_ToOrganizeCity.SelectValue);
        int month = int.Parse(ddl_ToMonth.SelectedValue);

        if (city > 0)
        {
            gv_ToBalance.BindGrid(FNA_BudgetBalanceBLL.GetModelList("OrganizeCity=" + city.ToString() +
                                                                    " AND AccountMonth=" + month.ToString() + " ORDER BY FeeType"));
        }
    }