|
Hello.
I work in a communications company where we maintain a library and other literary resources. I need to build a software system that manages the entire library.
What I have at the moment is a windows form that the administrator can use to manage the library. I need a system where members of staff can access a library intranet web site from their computers and check out library contents, make requests for books, etc.
Any thoughts on this? I'm hoping i won't have to discard my winform completely, at least the admin can still use it.
How do I integrate the winform into the web site please?
Thanks in advance...
Obi from Nigeria.
//obinnaaj Eof
|
|
|
|
|
Hello,
At work I have a typed dataset and in some cases much more than one typed datasets, but the problem is that when i bind the data to controls and than i come to the point where i need to do an update my boss told me that we need to kepp like a kind of log that tracks what data has been updated inserted and deleted. So what i need is how can i get the value from the typed dataset that has been changed so i can log what the data was before the logging and how the data is after the update. the same goes for delte and insert but in this case only which data has been deleted and which data has been inserted.
I hope i explained my self well any help would be greatly appreciated.
Thank you.
Regards,
Christian Pace
|
|
|
|
|
How are you updating the data?
Is it by using a method (or event handler) in your application? If so can you please post the code (just for that part).
Is it by a Stored Procedure in the Database?
Whichever it is you either need a Log file on the network/computer, or preferably some additional tables in your database for the audit trail.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi
first of all yes I have a table in the database which is taking cear of keeping the audit I'd events etc... And I'm updating the data by using the type daraset's tableadapter by doing tableadapter.endedit() and then call the tableadapter.update(....) method. Now what I need to know is that after doing the update method is there a way which I could fund out which cells or rows where modified by calling some method from the table adapter or binding source or something else?
Thank you very much
Regards,
Christian Pace
|
|
|
|
|
Take a look at How to: Check for Changed Rows (MSDN)[^].
Hope this helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I don't think you quite understood exactly what i need. The thing is that i don't need to check if there has been any changes, that i already know but what where the changes that have been made
|
|
|
|
|
I did understand. One of the links on that page leads to another which details how to get a collection of the changed rows (using HasChanges and GetChanges ). The changed rows have I think four versions, original, current, proposed and default (look up DataRowVersion ) Once you have the changed rows, you have all the information that you need to form an Update Query for the audit table ExecuteNonQuery[^]. If at all possible you should use parameterized queries.
Note that you must do this before applying the Update(), or GetChanges returns an empty dataset.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Yea i saw it. Thank you very much for the help and your time.
|
|
|
|
|
Hi Everyone,
I have a small application that I am developing that takes a half minute or so to load up (lot of stuff going on). I am wondering what the best way to display a "Loading" form is. For example, if you've ever used Adobe Photoshop, when you launch the program, a dialog/form shows up center screen and it tells you that its loading textures, fonts, etc. I want to do the same thing in my application.
Is the proper way to do this actually creating another form, showing that form in the main form onload event, and then destroying it after the loading process is complete?
Thanks!!
|
|
|
|
|
The normal way is to use another form with FormBorderStyle set to None and ShowInTaskbar set to false, and use a BackgroundWorker to do the initialization on a background thread, reporting progress back to this form so it can give feedback via a ProgressBar or whatever.
Search for SplashScreen C# and you'll find many examples.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I am using Named Pipes to transfer data from a client (C++) to a server (C#), the client does the following:
[Code]
struct MESSAGE
{
char cCommand[8];
string sParameter;
};
MESSAGE msg;
strcpy(msg.cCommand, "COMMAND");
strcpy(msg.sParameter, "DO SOMETHING");
DWORD dwWrote = 0;
WriteFile (hpipe, &msg, sizeof(msg), dwWrote, NULL);
[/Code]
Then, at the receiving end the C# server does the following:
[Code]
IntPtr chRequest;
bool fSuccess = ReadFile(hPipeInst, chRequest, uSize, cbRead, OverlappedPtr);
if (fSuccess)
byte[] temp = Encoding.ASCII.GetBytes(Marshal.PtrToStringAnsi(chRequest));
[/Code]
Now, at the receiving end, I need to transform the temp (byte[]) back into the STRUCT or something equivalent so I can access the members cCommand and sPatameter - but at this point I have no clue how to proceed... In reality doesn't need to be a struct, I just need to extract the data itself.
Note - the STRUCT MESSAGE is something I came up with, meaning that it can be changed if a different format would be helpful in the reconstruction (add the length of sParameter for example?), I just need a COMMAND and PARAMETER to be transfered in a single block (if possible).
Requirements are simple:
- COMMAND is a fixed-length 8-characters long string that indicates what action needs to be performed
- PARAMETER is a variable-length (unless this causes issues) parameter dependant on each COMMAND
For example:
COMMAND = TRANS
PARAMETER = C:\FILE.txt C:\NewFolder\FILE.TXT
(this is just to illustrate, there are a lot more applications)
If possible I would like to extract it as a chunk of data (byte[]) and then pass it along to my application where it could be decomposed, not a fan of reading in the size, then a field, then a size, then a field - that requires that my Communication be overly linked with my implementation.
If there is a more suitable way to implement this transfer please let me know... advice would be welcome...
Any help would be much appreciated.
Thanks,
|
|
|
|
|
that means, the first 8 bytes is the char[] and the other is the string.
|
|
|
|
|
I think the easiest way to do this is to replicate the struct on the C# end so you can pass the data using ref or out (or if it's a pointer that you get - Marshal.PtrToStructure) without needing to use the byte array.
You will have problems using both char[] and string when using C# as they are not the same as in C++.
char[] is really an array of bytes. The string may need to have a MAXSIZE constant. So, you may need something like this:
public static class Constants
{
public const int MAXPARAMETERENGTH = 1024;
public const int SIZEOFCOMMAND = 8;
}
[StructLayout(LayoutKind.Sequential)]
public struct MESSAGE
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.SIZEOFCOMMAND, ArraySubType = UnmanagedType.U1)]
public byte[] cCommand;
[MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = Constants.MAXPARAMETERENGTH)]
public string sParameter;
} I'm not happy with passing the command as a byte array - I've never had to deal with a char[] like this before.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi,
Compilation in Release mode failed, where as it is successful in Debug mode.
few errors are listed below.
1. Error: The type or namespace name 'AxOfficeCtrl' could not be found (are you missing a using directive or an assembly reference?
2. Error: The type or namespace name 'Practices' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Thanks in advance.
|
|
|
|
|
You should copy non GAC assemblies which are you are using to the bin\Release from bin\Debug directory of your project.
Life is a stage and we are all actors!
|
|
|
|
|
I am writing a multithreaded application. A download manager to be precise. When downloading one file, everything is quite fine. The thread starts, downloads the file and terminates as expected. When i start another download thread, however, when the first is still running, i get the error above 9in the subject). The problem is on this line of code which is meant to create a new filestream and write the retrieved data to the stream.
strLocal = new FileStream(Application.StartupPath+"\\"+SaveAsTextBox.Text,FileMode.Create, FileAccess.Write,FileShare.ReadWrite);
The download method is called Download(), is void and does not take any arguments.
A thread is started using
DownloadThread[j] = new Thread(new ThreadStart(Download));<br />
DownloadThread[j].Start();<br />
where j has a value incremented per click, so as to start a new thread each time.
What i do not understand is that the exception seems to suggest that 2 write operations are requesting to be handled by the same stream, yet it is actually a different stream because the user changes the SaveAsTextBox.Text on every new download.
Any answers?
BHM
|
|
|
|
|
At a guess it is trying to use the same stream (i.e. strLocal) it is a different file but that does not mean there is more than one stream.
That depends on where strLocal is declared and how the code that declares it is called. And that we don't know since it's not in your post.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
ankitjain1110 wrote: can anyone give me the code plz
No.
But if you research the SELECT Statement (SQL) you will find plenty of examples of extracting specific information, and if your research the DataGridView or DataGrid , depending on the version of VS and whether it is a Web or Windows Forms Application, you will find lots of examples for that part.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
A little advise on the type of questions you are asking:
1) Please check the spelling of the message before you submit to the world. Broken language is particularly very disgusting and irritating.
2) I believe you have a good, comfortable QWERTY keyboard and are not constrained to work from a mobile keypad or a like device. Hence avoid Text Speak for normal queries.
3) Discussion forums are intended to support your earnest endeavor and honest initiatives towards the task on hand by assisting you to elegantly confront and tackle any problems that thwart you from reaching the desired goal. Misusing/Abusing the forum as a substitute for homework is not going to help you go any farther.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
|
Start writing code for you by yourself and when you stuck in specific problem then post here,someone will hand you.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
sorry for asking directly the code. but have triead a lot. like i was just selecting the datagrid view.then after adding the datasource i tried the edit column and add column part...but am lost...no values is being displayed.i can do the codin till extracting the values into a datareader..what to do after that.
|
|
|
|
|
Hi,
How to create FTP site using "System.DirectoryServices" in C#? I want to set all the properties like IP,PORT , log directories , etc..
How can we create and set properties using "System.DirectoryServices" ? I would highly appreciate your help.
Thanks,
Mike.
|
|
|
|
|