Пример #1
0
 public void DeletePhase(FundingPhase phase)
 {
     using (SqlCommand command = new SqlCommand("[dbo].[DeleteProjectFinancialRecordDetailPhase]") { CommandType = CommandType.StoredProcedure })
     {
         command.Parameters.AddWithValue("@ProjectFinancialRecordId", phase.ProjectFinancialRecordId);
         command.Parameters.AddWithValue("@FundingIncrementId", phase.FundingIncrementId);
         command.Parameters.AddWithValue("@FundingResourceId", phase.FundingResourceId);
         command.Parameters.AddWithValue("@PhaseId", phase.PhaseId);
         this.ExecuteNonQuery(command);
     }
 }
Пример #2
0
 public JsonResult AddPhase(FundingPhase phase)
 {
     try
     {
         _projectRepository.AddPhase(phase);
     }
     catch (Exception ex)
     {
         return Json(new
         {
             message = "Changes could not be stored. An error has been logged."
             ,
             error = "true"
             ,
             exceptionMessage = ex.Message
         });
     }
     return Json(new
     {
         message = "Project Phase successfully added."
         ,
         error = "false"
     });
 }