internal ApiResult AttachRollBackPlanToChangeRequest(RollBackPlan req) { ApiResult apiResult = new ApiResult(); try { if (!req.IsValid()) { apiResult.SetFailuresAsStatusInResponseFields(req.StatusDesc); return(apiResult); } req.Save(); apiResult.PegPayID = "" + req.Id; apiResult.SetSuccessAsStatusInResponseFields(); return(apiResult); } catch (Exception ex) { HandleError(nameof(SaveCompany), "EXCEPTION", ex.Message); apiResult.SetFailuresAsStatusInResponseFields(ex.Message); } return(apiResult); }
public void AttachRollBackPlanToChangeRequestTest() { ChangeRequestInterface api = new CRSubSystemAPI(); RollBackPlan systemAffected = new RollBackPlan(); systemAffected.ChangeRequestId = "Test"; systemAffected.RollBackPlanDetails = "Test"; ApiResult result = api.AttachRollBackPlanToChangeRequest(systemAffected); Assert.AreEqual(Globals.SUCCESS_STATUS_TEXT, result.StatusDesc); }
public ApiResult AttachRollBackPlanToChangeRequest(RollBackPlan plan) => cRSubSystemAPI.AttachRollBackPlanToChangeRequest(plan);
public ApiResult AttachRollBackPlanToChangeRequest(RollBackPlan plan) => bll.AttachRollBackPlanToChangeRequest(plan);