// // GET: /BeneficiaryAtProjectLocation/ // public BeneficiaryProjLocInfo Get(int id) // { // BeneficiaryProjLocInfo beneficiary = new BeneficiaryProjLocInfo(); // beneficiary = BeneficiaryProjLocBl.GetBeneficiaryAtProjectLocation(id); // return beneficiary; // } public JsonResult <IEnumerable <BeneficiaryProjLocInfo> > Get(int id) { BeneficiaryProjLocInfo[] beneficiaries = BeneficiaryProjLocBl.GetBeneficiaryAtProjectLocation(id); var bene = from c in beneficiaries select c; return(Json(bene)); }
public JsonResult <IEnumerable <BeneficiaryProjLocInfo> > Get() { BeneficiaryProjLocInfo[] ListOfBeneficiaries = BeneficiaryProjLocBl.GetAllBeneficiaries(); //testing push var benes = from c in ListOfBeneficiaries select c; return(Json(benes)); }
public HttpResponseMessage Post(BeneficiaryProjLocInfo bene) { try { BeneficiaryProjLocBl.AddNewBeneficiary(bene); return(new HttpResponseMessage(HttpStatusCode.OK)); } catch (Exception ex) { return(new HttpResponseMessage(HttpStatusCode.BadRequest)); } }
public HttpResponseMessage Delete(int id, bool isOpen) { return(BeneficiaryProjLocBl.SoftDeleteBeneficiary (id, isOpen)); }
public HttpResponseMessage Post(BeneficiaryProjLocInfo bene) { return(BeneficiaryProjLocBl.UpdateBeneficiary(bene)); }