public HttpResponseMessage GetSpectroEntry() { ENT.SpectroEntry objENT = new ENT.SpectroEntry(); List <ENT.SpectroEntry> lstResult = new List <ENT.SpectroEntry>(); try { objENT.Mode = "GetAllSpectroEntry"; lstResult = new DAL.SpectroEntry().GetSpectroEntry(objENT); objENT.Message = lstResult.Count + " Record Found."; } catch (Exception ex) { objENT.Message = ex.Message.ToString(); ERRORREPORTING.Report(ex, Request.RequestUri.AbsoluteUri, new Guid("00000000-0000-0000-0000-000000000000"), "Gujarat_Intrux", "Function Name : GetSpectroEntry()"); return(ControllerContext.Request.CreateResponse(HttpStatusCode.InternalServerError, new { objENT })); } return(ControllerContext.Request.CreateResponse(HttpStatusCode.OK, new { lstResult, objENT })); }
public List <ENT.SpectroEntry> GetSpectroEntry(ENT.SpectroEntry objENT) { List <ENT.SpectroEntry> lstENT = new List <ENT.SpectroEntry>(); try { sqlCMD = new SqlCommand(); sqlCMD.CommandText = "GetSpectroEntry"; sqlCMD.Parameters.AddWithValue("@SpectroID", objENT.SpectroID); sqlCMD.Parameters.AddWithValue("@SpectroNo", objENT.SpectroNo); sqlCMD.Parameters.AddWithValue("@EntryDate", objENT.EntryDate); sqlCMD.Parameters.AddWithValue("@Mode", objENT.Mode); lstENT = DBHelper.GetEntityList <ENT.SpectroEntry>(sqlCMD); } catch (Exception ex) { throw ex; } return(lstENT); }
public bool InsertUpdateDeleteSpectroEntry(ENT.SpectroEntry objENT) { bool row = false; try { sqlCMD = new SqlCommand(); sqlCMD.CommandText = "InsertUpdateDeleteSpectroEntry"; sqlCMD.Parameters.AddWithValue("@SpectroID", objENT.SpectroID); sqlCMD.Parameters.AddWithValue("@SpectroNo", objENT.SpectroNo); sqlCMD.Parameters.AddWithValue("@KeyName", objENT.KeyName); sqlCMD.Parameters.AddWithValue("@KeyValue", objENT.KeyValue); sqlCMD.Parameters.AddWithValue("@Mode", objENT.Mode); row = objCRUD.InsertUpdateDelete(sqlCMD); } catch (Exception ex) { throw ex; } return(row); }