Find Jobs
Hire Freelancers

Update a c# project to return multiple id's as opposed to single id

$25-50 USD / hour

Terminado
Publicado hace alrededor de 10 años

$25-50 USD / hour

The following is a web service to return a view from a sql database. I need to include an IN clause to allow for multiple groups (external ID) on the return query. This may need to be serialised to ensure that all the groups (external IDs) are returned. Here is a snapshot of the code below: [AccessKeyAuthorization] public class XmlViewsController : ApiController { public HttpResponseMessage Get(string accessKey, string viewName, string fieldName = null, string fieldValue = null) {if (accessKey == "293892380") { viewName = "ViewName1"; }; //To ensure only the relevant View is allowed string vToRedirect = "No"; switch(viewName) { case "ViewName2": vToRedirect = "Yes"; break; } if (vToRedirect == "No") { return new HttpResponseMessage([login to view URL]); }; string dataSetName = "DataSet"; string userIdFiledName = "Team"; var cn = new SqlConnection([login to view URL]["DataConnection"].ConnectionString); var cmd = new SqlCommand([login to view URL]("SELECT * FROM [{0}] WHERE 1=1", viewName), cn); var adapter = new SqlDataAdapter(cmd); var dataSet = new DataSet(dataSetName); [login to view URL](dataSet, [login to view URL], viewName); // filter by user id if ([login to view URL][viewName].[login to view URL](userIdFiledName)) { var userIdColumn = [login to view URL][viewName].Columns[userIdFiledName]; // TO SKIP THE FIELD SELECTION ON TEAM IF TEAM IS ALL if ((User as User).ExternalId == "ALL") { if ([login to view URL] == typeof(string)) { //[login to view URL] += [login to view URL](" AND [{0}]=@Team", userIdFiledName); //[login to view URL](new SqlParameter("@Team", "%")); }} // NEED TO CONVERT SO THAT IT IS NOT ONLY A SINGLE TEAM, BUT A LIST FROM A TABLE else { if ([login to view URL] == typeof(string)) { [login to view URL] += [login to view URL](" AND [{0}]=@Team", userIdFiledName); [login to view URL](new SqlParameter("@Team", (User as User).ExternalId)); }}} // filter by field value if (![login to view URL](fieldName) && ![login to view URL](fieldValue) && [login to view URL][viewName].[login to view URL](fieldName)) {var fieldColumn = [login to view URL][viewName].Columns[fieldName]; [login to view URL] += [login to view URL](" AND [{0}]=@FieldValue", fieldName); [login to view URL](new SqlParameter("@FieldValue", [login to view URL](fieldValue, [login to view URL])));} var content = new HttpResponseMessage([login to view URL]) {Content = new StringContent([login to view URL](dataSetName, viewName, Url))}; [login to view URL] = new MediaTypeHeaderValue("application/xml"); return content; }}}
ID del proyecto: 5854175

Información sobre el proyecto

3 propuestas
Proyecto remoto
Activo hace 10 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hello , My self Parm. I am Microsoft technology Expert Having 7+ years of Experience in Development of Web & windows based projects. I have skills in ASP.Net 2.0 - 4.5, c#, VB.net, mvc, wcf, wpf, silverlight, SQL Server 2005-12, MySQL, jQuery, JavaScript & Ajax Technologies. its easy job for me, let me help you on this. i will charge $10/hr for this job. I have worked in team environment on following projects. [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] ####My Expertise#### 1. Web Application Development 2. Desktop Application Development 3. Database Programming 4. Reporting & Charting 5. Business Intelligence Dashboard 6. Data Integration -ETL 7. Social Media & 3d party API Integration I have good understanding of E Commerce, Health Care application, Practice Management Systems, Logistics, Supply Chain Management, Telecom, Education and many other areas. I am individual person & easily available over Skype for voice calls or chat. I am expecting your positive reply on my proposal. Thanks Regards Parm
$25 USD en 40 días
5,0 (1 comentario)
1,4
1,4
3 freelancers están ofertando un promedio de $29 USD /hora por este trabajo
Avatar del usuario
Hi, I can able to get the output quickly but need more details so we can talk about it and work together for completion. Looking forward.
$25 USD en 3 días
5,0 (1 comentario)
2,4
2,4
Avatar del usuario
Hi Sir I have many interesting about your project If you give me your project , i will do my best for you I wanna work with you As you can see, im top 9th on freelancer Thanks!
$36 USD en 40 días
5,0 (2 comentarios)
1,0
1,0

Sobre este cliente

Bandera de SOUTH AFRICA
Johannesburg, South Africa
5,0
7
Forma de pago verificada
Miembro desde nov 8, 2013

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.