public openingCountShow ServiceEntryshowopening() { openingCountShow op = new openingCountShow(); try { ObjectResult <Nullable <int> > obj = db.VSR_Trn_ServiceEntry_IsShowOpening(); foreach (var result in obj) { op.showopen = result.Value; } op.status = 1; return(op); } catch { op.status = 0; return(op); } }
public openingCountShow SaveopeningCount([FromBody] PostOpening opn) { openingCountShow op = new openingCountShow(); try { db.VSR_STN_OpeningCount_Save(opn.actualCount); ObjectResult <Nullable <int> > obj = db.VSR_Trn_ServiceEntry_IsShowOpening(); foreach (var result in obj) { op.showopen = result.Value; } op.status = 1; return(op); } catch { op.status = 0; return(op); } }