public List <spCommodityHistory_Result> GetAll() { using (var db = new PDPEntities()) { return(db.spCommodityHistory().ToList()); } }
public List <Extract_LU> GetAll() { using (var db = new PDPEntities()) { return(db.Extract_LU.ToList()); } }
public List<ConUnit_LU> GetAll() { using (var db = new PDPEntities()) { return db.ConUnit_LU.ToList(); } }
public List <State_LU> GetAll() { using (var db = new PDPEntities()) { return(db.State_LU.ToList()); } }
public List <spPesticideHistory_Result> GetAll() { using (var db = new PDPEntities()) { return(db.spPesticideHistory().ToList()); } }
public List <Commod_LU> GetAll() { using (var db = new PDPEntities()) { return(db.Commod_LU.ToList()); } }
public List <PestCode_LU> GetAll() { using (var db = new PDPEntities()) { return(db.PestCode_LU.ToList()); } }
public List <TestClass_LU> GetAll() { using (var db = new PDPEntities()) { return(db.TestClass_LU.ToList()); } }
public List <Determin_LU> GetAll() { using (var db = new PDPEntities()) { return(db.Determin_LU.ToList()); } }
public List <spToleranceLevel_Result> GetAll() { using (var db = new PDPEntities()) { return(db.spToleranceLevel().ToList()); } }
public List <DistType_LU> GetAll() { using (var db = new PDPEntities()) { return(db.DistType_LU.ToList()); } }
//public CountryController() //{ //} public List <Country_LU> GetAll() { using (var db = new PDPEntities()) { db.Configuration.ProxyCreationEnabled = false; return(db.Country_LU.ToList()); } }
public List <telecom_order> GetAll() { using (var db = new PDPEntities()) { return(db.telecom_order.ToList()); } }
public IHttpActionResult PutCellEdit([FromBody] EditCellReq req) { if (string.IsNullOrEmpty(req.rowkey)) { return(BadRequest("req.rowkey is empty")); } using (var db = new PDPEntities()) { short iPdpYear; int iSamplePk; double dVal; var asRowId = req.rowkey.Split('|'); if (asRowId.Length != 4) { return(BadRequest("Invalid number of columns in the key: " + asRowId.Length)); } //SAMPLE_PK int, PESTCODE string, PDP_YEAR short, COMMOD string if (!int.TryParse(asRowId[0], out iSamplePk)) { return(BadRequest("Invalid value for SamplePK:" + asRowId[0])); } if (!short.TryParse(asRowId[2], out iPdpYear)) { return(BadRequest("Invalid value for Pdp year:" + asRowId[2])); } var foundRec = db.ResultsDatas.Find(new object[] { iSamplePk, asRowId[1], iPdpYear, asRowId[3] }); if (null == foundRec) { return(BadRequest("record with the key {0} was not found")); } switch (req.col) { case "Concen": if (!double.TryParse(req.val, out dVal)) { return(BadRequest("Value of CONCEN can't be " + req.val)); } foundRec.CONCEN = dVal; break; case "LOD": if (!double.TryParse(req.val, out dVal)) { return(BadRequest("Value of LOD can't be " + req.val)); } foundRec.LOD = dVal; break; case "pp_": foundRec.CONUNIT = req.val; break; default: return(BadRequest("can't edit column " + req.col)); } try { db.SaveChanges(); }catch (Exception ex) { Logger.Error(ex); while (null != ex.InnerException) { ex = ex.InnerException; } return(InternalServerError(ex)); } } return(Ok()); }