public IHttpActionResult getCurrentFee(FeeCollectViewModel fcCVm) { ObjectParameter FEE1 = new System.Data.Entity.Core.Objects.ObjectParameter("FEE1", typeof(double)); if (!ModelState.IsValid) { return(BadRequest("Invalid data.")); } using (var ctx = new EMSEntities()) { ctx.spStudentCurrentFee(fcCVm.EM_TRNNO, FEE1, fcCVm.CLASS_TRNNO); var res = FEE1.Value; if (res == null) { return(NotFound()); } return(Ok(res)); } }
public IHttpActionResult PostNewSpFee(SpFeeViewModel spfee) { ObjectParameter FEE1 = new System.Data.Entity.Core.Objects.ObjectParameter("FEE1", typeof(double)); if (!ModelState.IsValid) { return(BadRequest("Invalid data.")); } using (var ctx = new EMSEntities()) { ctx.spStudentCurrentFee(spfee.SPFEEDTLs[0].TRNNO, FEE1, spfee.CLASS_TRNNO); var res = FEE1.Value; if (res == null) { return(NotFound()); } return(Ok(res)); } }