[I am trying to bind a gridview from a table and updation records in another table]
Actually I have two sql tables, named mtblVehicle_Booking and mtblLog_Book. In both tables all columns are same but mtblLog_Book is having 2 more columns KM_Start and KM_End.
Actually I am binding the gridview from mtblVehicle_Booking table (which don't have KM_Start and KM_End columns). The other side I have given edit option in gridview, but when I need to edit this gridview , the colums KM_Start and KM_End should come in that gridview as editing form and after updating the gridview the updated information should be seen in the gridview.
How can I accomplish this.
you can take it as a Gridview bounded with one table but when it gets update this should be partially bounded with the other table with updated information and rest of the gridview should bounded with the first one.
Suppose if gridview is having 5 rows from table1 one and if I edit two rows for updation the table2 then the gridview should show these 2 rows from table2 and the rest rows from table1 which actually has bot been updated.
At any rate I wanted to add Facebook login to my (personal) website and didn't want to use the build in authentication (why bother the user with one more very forgettable useless password?)
So I deleted all authorization code and I have an account controller which take the facebook id and check it against Facebook server and set up a Session property with relevant Facebook data
now when I add an [Auhorize] attribute on my method it doesn't work (normal)
I wonder how I could setup the user!
I have code which create an IPrincipal (from facebook info) and set it to the HttpContext.User but it's lost on next query.
I tried override myControl.Initialize(RequestConterxt) and setup the current user (as in request.HttpContext.User = ...)
But I got a stranger error when I do that (which involve none of my code!!!!!):
I am working on an mvc site. I understand the concept of the Model, however we are forced to work with the existance of our main frame. The data comes back in the form of a parameter block (fixed structure defining each field and it's length). This transaction to the mainframe would occur outside the controller (obviously). So to move the data from the transaction to something the controller uses can either be done with it's own class (my company calls them entities) or to double purpose the model as the information from the mainframe would basicaly (with same additions) be the fields of the model. Hopefuly all that made sense.
So the question is: do I create entity class and transfer all the data(properties) into the model after every tranasction once the fields are returned to the controller or do I double purpose the model by using it as the entity as well with the understanding that these fields that aren't to be used in the view would show up because the model fields and entity fields are mingled together?
Any advise would be greatly appreciated...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
I'm developing a multiple-city Visitor's system. I want to create a Login page with following details:
Username, Password, City & Gate_Name.
I need to know how should I proceed with creation of tables and then the code.
The City & Gate_Name should be nested. When a city is selected, then only the appropriate gate-name must be displayed in drop-down box below.
Initially, Username & Password must be checked. If they do not match, an error message must be generated. If they match, then the associated city & gate-name must be checked. If they do not match, an error message must be generated. If all the details match, then a Session by UserID must be created and the user must be redirected to the Home Page. A user allotted a particular gate cannot Login from any other city or any other gate.
Although you will have to add fields for City & Gate_Name and custom logic to check it. But the overall philosophy and working will remain the same as it is in this article.
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
Last Visit: 31-Dec-99 19:00 Last Update: 27-Mar-15 20:23