public IHttpActionResult DeleteRFIResponses(RFIResponse rfiResponse) { if (rfiResponse == null) { return(BadRequest()); } SortedDictionary <string, string> sd = new SortedDictionary <string, string>() { }; sd.Add("@ProejctId", rfiResponse.ProjectId); sd.Add("@RFiResponseId", rfiResponse.RfiResponseId); RDSService.RDSService rdsService = new RDSService.RDSService(); DataSet retvalue = rdsService.SelectList("USP_DeleteRFIResponses", sd); return(Ok(retvalue)); }
public IHttpActionResult AddRFIResponse(RFIResponse rfiresponse) { SortedDictionary <string, string> sd = new SortedDictionary <string, string>() { }; sd.Add("@ProejctId", rfiresponse.ProjectId); sd.Add("@fileName", rfiresponse.FileName); sd.Add("@timeStamp", rfiresponse.TImeStamp); RDSService.RDSService rdsService = new RDSService.RDSService(); DataSet retvalue = rdsService.SelectList("USP_InsertRFIResponse", "RFIResponseId", sd); var ContractDWGSId = retvalue.Tables[0].Rows[0][0].ToString(); return(Ok(ContractDWGSId)); }
public IHttpActionResult GetRFIResponses(string projectId) { SortedDictionary <string, string> sd = new SortedDictionary <string, string>() { }; sd.Add("@ProejctId", projectId.ToString()); RDSService.RDSService rdsService = new RDSService.RDSService(); DataSet ds = rdsService.SelectList("USP_GetRFIResponses", sd); var rfiResponses = new List <RFIResponse>(); if (ds != null && ds.Tables.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { var rfiResponse = new RFIResponse { ProjectId = dr[0].ToString(), RfiResponseId = dr[1].ToString(), FileName = dr[2].ToString(), TImeStamp = dr[3].ToString() }; rfiResponses.Add(rfiResponse); } } return(Ok(rfiResponses)); }