Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a Access Database that i manipulate though a c# program.
i am trying to get a order of items that satisfy certain conditions.and be able to change the order.
my idea is to copy the unique key in to another field then order by that field and have a button that moves up and a button that moves down.is this the right way to go about this ?
a separate column in a table called Order for example makes sense, as does allowing a user to re-order the items and save it back to the database. Maybe drag/drop or something for re-ordering would be a bit less clunky than buttons, but I guess it depends if your c# application is winforms, wpf, web, etc. as to how easy that is.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I am currently working on a C# project in which I got a couple of WinForms (currently 5 windows).
From these windows, I need to save all the information that has been filled(all the text from textBoxes, comboBoxes, dataGridViews, checkBoxes). In each window, there is control containing data I will need later to generate a script.
So my question is: What is the best approach for the purpose to save the value of the variables and to get them passed between the WinForms?
For now, I am storing the data from the controls in variables, but I believe there is much better and efficient way of doing this. (And also the variables are passing between the screens. So basically if I have in screen1 variable A, I need to access it from screen2 where there is another variable B, screen 3 needs A and B and variable C appears there, and so on ....)
I've been thinking about:
Saving the data in a text file(which I would like to NOT do it.)
User Settings (but I am pretty sure I cannot store the data from the grid in it. If I am mistaken I will appreciate letting me know!)
And the last one I mentioned I am using - passing variables between the WinForms.
You can create dto-class for each window, put data from window's control to corresponding dto and then serialize it.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
How do I put this DBMS.OUTPUT_PUT.LINE in a database, and is it also allowed to put it on listbox, datagridview or label?
example: [Time]: "NAME" has inserted a data.
If you are trying to get additional text data from an operation to be returned from a SQL operation similar to how DBMS_OUTPUT.PUT_LINE works, then PRINT allows that. Since you mention C#, you should note that to consume PRINT data you need to subscribe to the SqlConnection.InfoMessage event, as described here.
However, in most cases it is more suitable / pragmatic to SELECT (perhaps via OUTPUT-clause in the case of INSERT/DELETE operations) something that informs the UI - perhaps the rows, perhaps the ##ROWCOUNT, perhaps the SCOPE_IDENTITY(). PRINT is usually a bad option for anything other than tool scripts.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
As in this picture, how I can create a list with users and display it on the listbox with two buttons delete and launch and when I can create there code what I must do help please !
I assume you want to write windows forms application with C#. I use DataGridView for this purpose, because in datagridview we can define columns. The wireframe has 3 columns one is the name and others are launch and delete. There is also listview component if you like. If it is a webpage there are similar components like asp.net GridView. These components also have databindings with SqlDataSource, so CRUD operations can be done without coding.
If you are a beginner to winforms, check this out.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
For my job i have to make many small projects that require to send different mails and set up some html. I usually make these forms in Winforms. Now at this moment whenever i need to fill my html I take the string replace some values and have functions that write hardcoded table rows.
To make my job a little easier I was wondering if it was possible to import the razor engine(not sure if it's the right word choice) in my winforms project and simply pass a model to a CSHTML file which returns me the HTML in a string so i can mail it to coworkers.
If this is possible, instructions on how to do it are welcome.
Kind Regards Roxas
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
If I need to show some info on the page and use lot of labels for this, does it make sense to use datagridview and show info as one record?
This is going to depend heavily on the specifics of your situation. If the tablized view of the data is perfect for your situation, then it might make perfect sense. On the other hand, you allow a lot more formatting adjustments and specificity if you use labels and divs and the like to support more detailed css.
A FormView is more recommended in such cases. It's a control that displays data for a single record. In the end of the day whichever control you use will work, but FormView makes it easier to format the data you want to display (in this specific case).