access forms as asp.net's listview - asp.net

I made an access vba application where all my architecting was simply creating a one-to-many relationship between a "status" table and a "data" table that contained all the other details of my record. Created a form with the single click of a button with my "status" table open, and wallah,,, I got a form for my open or closed records that had dropdowns for each field where theres a related table. For activity tracking, I had to make a many-to-many table , and made a one-to-many for the status of those activities and again, clicked the create form and I was in business. To finish things off all I did was integrate a checkbox in my data fields and put buttons on my status forms that act on the record that got checked, and I was done, fast & painlessly, kinda.
Is there any ASP.net code generation of a data control in where I can just structure my MYSQL database, make the relationship and generate code of the RELATED "status" table and get my form w its related subform with text fields & DDL's automatically generated, fast? If not, what would you consider is the next best approach (i.e. using excel for replicating repetitive code)?

Take a look at http://www.asp.net/dynamicdata
As far as I know (having not used it myself) it will do what you need, ie quickly generating data entry pages from an existing sql schema.

Access can actually create .net forms when you use access 2010. (the forms are real xaml or so called zammel forms). The beauty of this system is you get to keep the same point and click approach that allows you to build master forms with child sub-forms. You not have to write one line of code and you not ever see one connection string. Only downside of this great new system called "Access Web Services" is it requires SharePoint (enterprise).
So, this is a true access development for the web, but you continue to use the Access client to build those forms. Those forms scale out to many users since you using xaml forms and SharePoint. Here is a video of this in action:
http://www.youtube.com/watch?v=AU4mH0jPntI
At the half way in above, note how I switch to running the access application 100% in the browser.

Related

How to make dynamic webpages with ASP.NET that display different images pulled from a SQL database?

I am 100% new to ASP.NET and I've been working on this problem for a few weeks. I'm trying to have a very barebones website that when loaded will prompt the user for their dessert preference. If they like cakes, the website will display cake photos, if they like jelly, it will display jelly.
My first thought was to start with the SQL database. It has two tables, Jelly and Cakes, both have the same format for columns.
An integer for id, a varchar for name and a binarydata for storing the image.
Then I created the website on ASP.NET. I started by generating a ASP.NET Web App (MVC) in Microsoft Visual Studio. I tried to create a model class called Dessert that would create a dataset of either Jelly or Cakes dependent on what the user choose but I couldn't figure out how exactly to create that.
I went online and read some documentation and apparently ASP.NET can auto generate a SQL database based on your model? I toyed around with creating different models, trying to connect the model to my SQL database, auto-generating the SQL database with ASP.NET but I'll be honest and say, I haven't got a clue what I'm doing.
My initial feeling was to create a model, have some sort of starting page that asks the user their preference, the Dessert class gets made based on the user's preference and the webpages are dynamically displayed with whatever their preference was.
Any help on this would be appreciated. Even if it's just a link to a resource that can help me.
Thanks.
This involve many steps --
You create the db
Create Web Project
Add Option to connect with Database, you can use (Entity Framework, Plain ADO.NET, Dapper)
Create a db class to make methods that call db
Create model class to hold data returned from db
Create controller and call db class to get data and pass it to view
Create MVC view to show data and capture user intergation
For you use case I allready prepared some code and database, please look into this repo --
https://github.com/mataprasad/MyDesserts

knockout.js - broadcast data across relevant views

I am currently undertaking an exercise to research on a number of JS MV* frameworks and select one that best suits the team's needs. Knockout is one of the contenders that I am learning about.
One of the most important requirements is for changes in the data in a view model to be broadcast to all the views that use such data. For example, lets say we have client details listed in a data grid on a page, clicking on any row in the data grid brings up a pop-up dialog where the user can edit the values of the selected row. When the change is made and the user clicks 'Save', the data is updated in the database. But what we also want is that the change be reflected in the local ko.observablearray and then for any other views that use this 'clients' collection to refresh themselves with the new data. In other words the views must refresh themselves with the data in ko.observablearray rather than get a fresh list from the database.
I have been successful in doing this - have one a single .cshtml file which houses the data grid and a form to create new row in the data grid. In this scenario, the data in the grid refreshes correctly. But when the change happens on a another cshtml file, I am not able to carry these changes across to the other views. Can this be done in knockout and if yes, please point me to an example of how and where this has been done.
I would use a Event aggregator pattern. I have made one for SignalR
https://github.com/AndersMalmgren/SignalR.EventAggregatorProxy
Install usign nuget
Install-Package SignalR.EventAggregatorProxy
If you have no use for SignalR you can then extract the relevant parts from my lib, demo here
http://jsfiddle.net/jh8JV/

How to design a Master-Detail Sharepoint 2010 application?

I am in the process of migrating an Access application to Sharepoint 2010 (Enterprise). I would like to use as much Sharepoint "out of the box" funcationality as possible, but I am not opposed to creating some Web Parts.
I am struggling with the design of the "master" table in this application. The application is used to track employee productivity. Daily, about 50 users access the application and basically enter how many "Widgets" they completed that day. There are about 30 types of these "Widgets" and they don't change very often.
The table is designed with individual columns for each of these Widgets. This makes creating the Reports very easy, since all you have to do is select all the fields from the table and dump the result set.
The downside to this approach is obvikously the fact that the schema is "hard coded" (static). I have been asked (in the sake of time) to just normalize the table as much as possible (with CustomerIDs, EmployeeIDs, etc), but keep all the "Widget" fields in there.
I had proposed that we create a Master Detail type relationship where the users would Add a Row (perhaps in a GridView), select the "Widgets" they created that day (from a drop down) and enter their quantity. They generally only make 1 - 3 types of Widgets per day.
The users hate this design and want me to give them a data entry form with ALL the widgets displayed so they can just click in the box (beside the Widget they created that day) and enter their qty and then click save.
I know I could still create this type of Data Entry Form with a Master-Detail type of relationship, but I am pretty sure I couldn't using the SP Out of The Box forms. I would probably have to create a Web Part with a GridView and just populate the GridView with all the possible Wisdgets, then let the user enter the proper Qty(s) beside each widget they are made that day. Once the form is submitted back, I would then have to go through it and find any Qtys that are valid Numbers and add a (child) detail record for that Master record. (The Master Record would contain date, employee, customer, etc. etc.) The "edit" form would also have to work in a similar way.
This is a pretty "ugly" solution and I was looking for an alternative.
If I can't come up with a good alternative (and convice my manager that the code won't be too difficult to maintain or add too much development time to the project to complete it on time) then I will have to bring over this ugly, existing schema with all its wasted space and have "hard coded" stuff thoughout the application. (For instance, if I provide them with a SharePoint View to see how many Widgets of a certain Type were created, I will have to "hard code" all those values in the Drop Down and "Sum" the correct/matching database column. YUK.
Another consideration is the reporting. Right now all the reports just contain a column on the report for every widget. To preserve the look of these reports (if I use a Master/Detail relationship) will require "fancier" queries (Stored Procedures) to buld the proper result set in a "columuar" format. (And I am not sure how I would tackle laying out the SharePoint Views of the data in a similar fashion.)
It certainly would be "easier" to just leave the schema as is (and have all that wasted space in the table). I just hate developing an application that anytime we need to add a new "Widget" to the application, we have to change the application in several places and rebuild. (Although, my manager isn't concerned about that, he just wants to push it out, ASAP...sigh...)
Any help/recommendations on how to do this type of application (specifically how to create the data entry forms and views) in SharePoint would be greatly appreciated!
Shayne
Have you looked at these ideas:
http://paulgalvinsoldblog.wordpress.com/2007/12/24/implementing-master-detail-relationships-using-custom-lists/
http://blogs.msdn.com/b/alexma/archive/2006/04/10/610934.aspx
In my opinion you should be storing the data in list rather than SQL server. If you decide to use SQL server, look at BCS to build Master child view.

any ideas how to add text communication to my web application using asp.net vb.net?

HI guys
i built a web based task manager / scheduler using vb.net
i need to add a small communication part to it to allow users to send messages to each other.
below is my concept design. the question is: is this the correct way of building a simple communicator or do you have better ideas?
Yes, I think your basic design is reasonable. The UI is logical, and what you've described of the architecture sounds reasonable.
If you're looking to send e-mail to users 'off-site' check out this blog entry.
So mokokamello
i agree with Cpfohl
you already answered your question
i created a table for users, table for messages that contains from and to fields. a query (getting messages for the logged in user and marked "unread") will run at the pageload and bind to gridview. pressing the button "send" will insert data into messages table in the database and clear current text. you think this is OK – mokokamello 1 min ago edit i created a table for users, table for messages that contains from and to fields. a query (getting messages for the logged in user and marked "unread") will run at the pageload and bind to gridview. pressing the button "send" will insert data into messages table in the database and clear current text.
just work on the design to make it more palatable
good luck

Need an application design advice

I'm developing a web application which processes invoices(the functionality is not limited to invoices, but it doesn't matter). One of the parts of the workflow is to print invoice after it was published. This means that the website user is able to select 10-20(and more) invoices and print it at once. Also there may be several invoice templates which may be customizable(this is one of the key requirements).
I should also mention that we decide to generate PDFs from the html code and then print it. So as the PDF creation process may take some time to complete we decided to use a windows service for invoices printing.
So, summarizing we have the following requirements:
There should be customizable invoice
templates;
The website user should be
able to specify which template he
want to use with the invoice item
specified;
There should be a possibility to
print one or several selected
invoices in one click.
Our first idea was to use user controls as invoice templates. The user control will be responsible for invoice layout. This also means there will be a base class for these user controls through which we will be able to define a data source for the controls.
In this case we may even allow users to modify ascx file (or something similar) to edit basic captions if necessary.
The problem begins in the windows service where we are unable to generate output for user controls. So the other solution is to use http handler or web service to generate user controls output and transfer this to the windows service. But this complicates the solution (e.g. we need to use authentication for this and similar problems).
Maybe there is a much more simpler way to do it?
Thanks in advance.
In response to your comment, I suggest you have the website generate the HTML and save it into a 'GeneratedInvoice' field in your DB, which the service then processes (i.e. converts to PDF however your pdf conversion software does it). It's appropriate because you have a 'saved' copy of the generated invoice; i.e. if your invoice processing routine changes (different styles, etc) your old invoices aren't affected, and yet you can regenerate a given bunch in a possibly 'new' format if required.

Resources