Find Jobs
Hire Freelancers

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

$25-50 USD / hour

Selesai
Disiarkan sekitar 10 tahun yang lalu

$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 Projek: 5854175

Tentang projek

3 cadangan
Projek jarak jauh
Aktif 10 tahun yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
Dianugerahkan kepada:
Avatar Pengguna
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 dalam 40 hari
5.0 (1 ulasan)
1.4
1.4
3 pekerja bebas membida secara purata $29 USD/jam untuk pekerjaan ini
Avatar Pengguna
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 dalam 3 hari
5.0 (1 ulasan)
2.4
2.4
Avatar Pengguna
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 dalam 40 hari
5.0 (2 ulasan)
1.0
1.0

Tentang klien

Bendera SOUTH AFRICA
Johannesburg, South Africa
5.0
7
Kaedah pembayaran disahkan
Ahli sejak Nov 8, 2013

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.