Ejemplo n.º 1
0
 protected void AddOrganBudget(System.Collections.Generic.IDictionary <string, decimal> dicBudAmount, string organizationBudgetId)
 {
     if (dicBudAmount.Count > 0)
     {
         foreach (string current in dicBudAmount.Keys)
         {
             System.Guid.NewGuid().ToString();
             string             empty = string.Empty;
             string             code  = current;
             decimal            num   = dicBudAmount[current];
             OrganizationBudget organizationBudget = OrganizationBudget.Create(System.Guid.NewGuid().ToString(), organizationBudgetId, code, num, num, BudgetManage_Cost_IndirectBudget.inputUser, System.DateTime.Now, empty);
             organizationBudget.Add(organizationBudget);
         }
     }
 }
Ejemplo n.º 2
0
 protected void UpdateOrganBudget(System.Collections.Generic.IDictionary <string, decimal> dicBudAmount, string organizationBudgetId)
 {
     if (dicBudAmount.Count > 0)
     {
         foreach (string current in dicBudAmount.Keys)
         {
             string             text = current;
             decimal            num  = dicBudAmount[current];
             OrganizationBudget byOrganAndCBSCode = OrganizationBudget.GetByOrganAndCBSCode(organizationBudgetId, text);
             if (byOrganAndCBSCode != null)
             {
                 byOrganAndCBSCode.AccountAmount = num;
                 byOrganAndCBSCode.Update(byOrganAndCBSCode);
             }
             else
             {
                 OrganizationBudget organizationBudget = OrganizationBudget.Create(System.Guid.NewGuid().ToString(), organizationBudgetId, text, num, num, BudgetManage_Cost_IndirectBudget.inputUser, System.DateTime.Now, string.Empty);
                 organizationBudget.Add(organizationBudget);
             }
         }
     }
 }