ASP.NET Table Data Editor - c#

I want to create a control to enable me to edit the data from a table.
I want something similar to the Edit top 200 rows from SQL Server Management Studio.
The ideea is that I have some coefficient tables and the user that hadles these must be able to modify the coefficients.
I have found a probable solution here http://www.highoncoding.com/ArticleDetails.aspx?articleID=139, but I want to see some other options.
I am also using nHibernate with SqlServer 2008
Should I simply use the GridView, a Repeater or are there any other good options ?

What's your budget?
The Telerik Grid editor is very good, if you can afford it. The Telerik MVC grid editor is also reasonably good and free.
If you can use MVC also look at the new MVC3 scaffolding package which you can download via NuGet.
Ultimately most grid solutions will do this job - as that's exactly what they are for. So you need to look at specific features, costs, which platform they support in order to narrow it down to the 'best' option.
One other word of advice. The database / ORM layer shouldn't be a factor in the decision. If it is then you're mixing your layers.

Related

Data visualization from database

Im a newbie for such programming like reports/visualizations si I´m here just to ask for some advices, resources, tutorials..
The main goal of my new focus is to create custom charts/visualizations within really small time. Right now I have made some kinds of reports for Machines Overview, Machines Availability or OEE. These are made in MS SSRS (SQL Server Reporting Services). This kind of reports creating is pretty good, also very limited and not modern. The procedures in SQL server are already written and at least everything I have to do is transform these data to a newer modern design (kinda innovative internal business project)
I started studying ASP.NET MVC 2 months ago to create these charts as a web app. Searched hours for tutorials and videos on youtube, but there are no proper tutorial to visualize data directly from database. Found chart templates for MVC e.g.:
link: https://canvasjs.com/asp-net-mvc-charts/stacked-column-chart/
Here I can find the main source code for the whole chart but the values that´s being showed are strongly typed. I´m trying to figure out how to show exact values from database. I would like to know how to assign exact values for axis X and Y + values calculated from stored procedure.
In visual studio followed the instructions from various tutorials how to create WebForms, MVC website etc. Everywhere they were showing local/strongly typed values.
I need 1 solution for reports where everything is prepared in SQL, there just needs to be somehow connected from database to chart.
Like in the mentioned link there is a controller window where should be maybe some {get; set;} statement from database with same column name as in SQL DB.
We are using
SQL Server 2015
SQL Management studio 2015
SQL Server Reporting Services (SSRS)
MS ReportBuilder
the code to show can be expected in the mentioned link from canvas.js link for the whole MVC chart.
Reports:
I´m looking for a specific solution where I found specific charts (e.g.: canvas.js) what I have to edit and how, to use our data in specific charts. I´m interested in so bad because later in future my department will focus on creating custom specific charts for customer requirements.
Visualization:
Same goal as in Reports. Actually the visualization in production is just mentioned as "visualization" at least it´s just a report which has inside an html meta tag for 30sec autorefresh. I would like to know some other method where the data change could be asynchronous (I have heard something about React for this?)
If what you want is visualize data directly from database, you should look for a BI or business intelligence tool such as Power BI, SAS, SAP, etc.
If you plan to make them your own through a web app and you want to use ASP.NET MVC then you'd really have to study some Javascript, HTML, and MVC itself. What needs to happen is;
From your ASP.NET MVC web app, inside your Controller you need to get the data from the database. Search ADO.NET if you think Entity Framework might take some time.
Now that you have data in your Controller, it's time to pass them to the View. Search ViewBag or ViewData if don't want to use Strongly typed models.
Now that the data is inside the View, it's time to use Javascript or Jquery to loop through that data and pass them to the Charts javascript library you mentioned.
you can try dotnet Report builder https://www.dotnetreport.com and see if it works for your requirements. It’s very fast, installs with just a nuget package and some configuration. Sounds like exactly what you need. Full disclosure, I’m affiliated with the company.

C# Web Application Form using Stored Procedure

As a DBA/SQL Server Developer, I'm often asked to produce web pages where users can view the data in the database and edit them, and see the edits they've made straight away (without refreshing the page). I know nothing about ADO.NET or C#, but I would like to be able to give users this very simple functionality. Essentially I'm looking for three things:
to display a table of data in a webpage retrieved from a SQL Server stored procedure
to display a text box in the same webpage where users can input data
to display a button in the webpage that takes the inputted data from the text box, runs it through the stored procedure as a parameter, and refreshes the table.
Ideally I'd like this all to happen without the user having to refresh the webpage.
My questions are: is this kind of thing possible? How difficult is it to achieve? And how do I do it? I don't have the time to learn web development in full. I wouldn't need the vast majority of skills I'd learn even if I did learn it in full. I just really need this basic functionality, to produce ultra simple pages when user requests come in.
If anyone knows of any examples of just this kind of thing, that I can copy, they would be greatly appreciated!
You don't really need to use MVC, WebForms or even C# for that matter. Using one of those would be killing a ant with a rocket launcher.
Look into node.js and pug, using a RESTFUL API to deliver the information you need. I don't believe you will need more than two hours to provide your users with the interface you told us.
Node has a awesome package called express, it sets up everything for you and uses Pug on the starter template.
You can check out a tutorial right here.
Actually it will also take 2 hours doing with Webforms or MVC . I recommend using Entity Framework to make it super simple.
Webforms may be a bit older technology but will be faster to develop this specific page (assuming you only targeting Desktop users). Otherwise MVC is the way to go.
You can Check the tutorial.
https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/introduction/getting-started

Sharepoint connect to another SQL server?

Here is the task I'm checking:
1) have a product database, which is managed by another application (it has no relation with sharepoint).
2) now, my boss want to have an application within the sharepoint portal to search this database, plus, audit the searches, i.e. who searched what at what time....
There is no problem if this is a regular asp.net application. But, what's the best way to do this in sharepoint?
My plan is to:
use team site template (or blank template), create a webpart. then have UI, and gridview to show the result.
is this the way to do? I try to find an example of using gridview in webpart, but cannot find it. Is there any limitation of using asp.net control in webpart? what about use ajax toolbox control in webpart? any example?
thanks
Roughly there are 2 approaches you could go for:
The webpart approach, just as your describe it. You can use an ASP.NET gridview with no problems in your webpart. As such, a webpart is nothing more (simplified...) than a user control with some dress up.
Go for BDC/BCS. This will allow you to consume the external database and show the information as be it 'native' SharePoint data. This has the added benefit that the content can be made searchable from within SharePoint. Using this approach you also do not have to create a UI to present the data, as SharePoint will present it using the out of the box view pages, etc.
The downside of the webpart approach (option 1) is that if you have multiple front end servers in your farm you need to handle the session in a way (e.g. by setting up sticky sessions on your loadbalancer, or by sharing your session somewhere centrally (in a db for instance)), as you don't want users to switch between servers in one session while they are using your webpart probably.
The downside of option 2 is that at first it might seem complex, but let that not scare you away :-)
http://msdn.microsoft.com/en-us/magazine/ee819133.aspx
You should code this as one or several web parts. You can use pretty much any asp.net controls in web parts. If you want to use any third party tools like DevExpress you must ensure that the binaries are strongly typed so that you will be able to register them in web.config, note that the registration can be done by the wsp deployment if correctly configured.
Web parts behave as any .net code except for the fact as I mentioned all references assemblies must be "safe".

I need to dynamically generate questionnaires in aspnet 3.5 using sqlserver 2005 data

I have been given an assignment that requires dynamically creating many web data entry pages mostly in questionnaire form.
I am using visual studio 2008, aspnet , c#3.5 and sqlserver 2005.
The questions are hierarchical and are stored in sqlserver with hierarchy info and info on which questionnaire(s) they belong to.
Some questions require answers via radio button y/n/na and some require an int as input.
I was thinking of using listview or gridviews (bound to the database with a sqldatasource that filters the questions for the questionnaire being generated) for the data entry.
One listview or gidview would contain the question and a column of radio buttons. I would have to loop thru it row by row to save the data in the db.
The other listview or gidview would have a column bound to a integer column in the db. An inline edit would update the db automatically.
Is there a tool that does this? Preferably with a gui that the enduser can use to enter, edit and change the order and hierarchy of the questions?
Open source is best, but a reasonably priced tool is ok also.
Any other suggestions are also appreciated.
I am doing something very similar for a sitefinity website. Unfortunately the poll module that comes out of the box with sitefinity does not meet the requirements for a questionnaire.
Found a good post here in SO.
There are some survey engine toolkits in the market.
Here are some:
http://www.mentor-logic.com/index.php/products/components/zodiacnet
http://www.classapps.com/SelectSurveyFeatures.asp
http://www.novisystems.com/
http://www.nsurvey.org/
Open source:
VoteControl
NetPolls - The web poll engine
I might do this purely with XML. Use an XML query to SQL server to retrieve the hierarchical information as XMK, then use XSLT to transform the XML into the correct HTML (or XHTML).

Generate dynamic flow-chart

We are looking for some code/component that can create a flow-chart (image) dynamically, preferably in .NET/C# (although a Silverlight/Flash-component that takes a XML/JSON-feed will also be fine).
For example we have a (business) quote that goes through te following steps before it becomes final:
Requested -> Pending -> Ready for revision -> Under revision -> Final
And as an extra step there is the possibility to go from 'Under revision' back to 'Pending'.
So the component/code should draw something like this (where 'Under revision' would be the active status for this quote):
Example chart http://www.wowtah.nl/flowchart-example.gif
The reason that we are not just creating static GIF-images (and load the correct one on demand) is that these steps can vary per customer implementation of our product. So we're looking for a way of dynamically show the user the workflow steps that are configured for them.
Any help would be greatly appreciated!
Take a look at Microsoft MSAGL
I built a workflow solution a while back and evaluated a number of diagramming controls, including the MindFusion control. I settled on the Syncfusion diagram control, primarily for its ease of use for an end user (especially when drawing connections).
I'm using the WPF edition, but they make editions for ASP.Net and WinForms. It has methods for exporting to images.
These are some of the components that I can remember evaluating; I'd recommend giving them a shot and seeing which you like best.
Syncfusion,
NWoods,
yWorks,
Nevron,
EasyDiagram
MindFusion looks like they have some good diagramming controls that may work for you:
http://www.mindfusion.eu/diagramming.html
In the meantime there are also open source diagramming libraries that you can find on Codeplex and Google code.
A very deep one with many features and very flexible is
http://nshape.codeplex.com/
Perhaps easier to program but more limited in scope
http://www.dalssoft.com/diagram/

Categories