Example #1
0
 public Stream AddChargeProject(ChargeProject chargeProject)
 {
     try
     {
         if (EFHelper.Add(chargeProject))
         {
             return(ResponseHelper.Success(null));
         }
         else
         {
             return(ResponseHelper.Failure("添加失败!"));
         }
     }
     catch (Exception ex)
     {
         while (ex.InnerException != null)
         {
             ex = ex.InnerException;
         }
         return(ResponseHelper.Failure(ex.Message));
     }
 }
Example #2
0
 public Stream UpdateChargeProjects(string ProjectID, ChargeProject chargeProject)
 {
     try
     {
         chargeProject.ProjectID = ProjectID;
         if (EFHelper.Update(chargeProject))
         {
             return(ResponseHelper.Success(null));
         }
         else
         {
             return(ResponseHelper.Failure("修改失败!"));
         }
     }
     catch (Exception ex)
     {
         while (ex.InnerException != null)
         {
             ex = ex.InnerException;
         }
         return(ResponseHelper.Failure(ex.Message));
     }
 }