Example #1
0
 public static void SaveSalBudgetOneDtl(string ProjectCode, string BudgetCode, EntityData entityDtl, int y, int m, string PBSTypeCode, string FieldName, string val)
 {
     try
     {
         DataRow   row;
         DataRow[] rowArray = entityDtl.CurrentTable.Select("IYear=" + y.ToString() + " and IMonth=" + m.ToString() + " and PBSTypeCode='" + PBSTypeCode + "'");
         if (rowArray.Length == 0)
         {
             row = entityDtl.CurrentTable.NewRow();
             row["BudgetCode"]  = BudgetCode;
             row["SystemID"]    = SystemManageDAO.GetNewSysCode("SalBudgetSystemID");
             row["ProjectCode"] = ProjectCode;
             row["IYear"]       = y;
             row["IMonth"]      = m;
             row["PBSTypeCode"] = PBSTypeCode;
             entityDtl.CurrentTable.Rows.Add(row);
         }
         else
         {
             row = rowArray[0];
         }
         row[FieldName] = ConvertRule.ToDecimalObj(val);
     }
     catch (Exception exception)
     {
         throw exception;
     }
 }