Ejemplo n.º 1
0
 protected void AddBudget(System.Collections.Generic.IDictionary <string, decimal> dicBudAmount, string prjId)
 {
     if (dicBudAmount.Count > 0)
     {
         foreach (string current in dicBudAmount.Keys)
         {
             string         id             = System.Guid.NewGuid().ToString();
             string         empty          = string.Empty;
             string         code           = current;
             decimal        num            = dicBudAmount[current];
             IndirectBudget indirectBudget = IndirectBudget.Create(id, prjId, code, num, num, BudgetManage_Cost_IndirectBudget.inputUser, System.DateTime.Now, empty);
             indirectBudget.Add(indirectBudget);
         }
     }
 }
Ejemplo n.º 2
0
 protected void UpdateBudget(System.Collections.Generic.IDictionary <string, decimal> dicBudAmount, string prjId)
 {
     if (dicBudAmount.Count > 0)
     {
         foreach (string current in dicBudAmount.Keys)
         {
             string         text = current;
             decimal        num  = dicBudAmount[current];
             IndirectBudget byPrjIdAndCBSCode = IndirectBudget.GetByPrjIdAndCBSCode(prjId, text);
             if (byPrjIdAndCBSCode != null)
             {
                 byPrjIdAndCBSCode.AccountAmount = num;
                 byPrjIdAndCBSCode.Update(byPrjIdAndCBSCode);
             }
             else
             {
                 IndirectBudget indirectBudget = IndirectBudget.Create(System.Guid.NewGuid().ToString(), prjId, text, num, num, BudgetManage_Cost_IndirectBudget.inputUser, System.DateTime.Now, string.Empty);
                 indirectBudget.Add(indirectBudget);
             }
         }
     }
 }