|
I tried all the points as you mentioned here.But still, invoice number clash happens when the multiple users save at a time.Here the invoice number is unique.But in details part we can save multiple products for a particular invoice.But here clash happens when multiple users enter data at once.
for example
users-->invoice no Products
Raj 1 J,K
Tarun 2 O,M
But at the time of saving it swapped like this
users-->invoice no Products
Raj 1 J,K,M-------->Clashing taken place
Tarun 2 O
Please give me suggestions to solve this.
|
|
|
|
|
Where's the version number?
I don't see any evidence of you "trying all the points".
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
|
Thank you Mr.palikhelsanjeeb.I will go through this link and let you know the result if it is useful.
|
|
|
|
|
hi
I'm trying to get the weight attached to a computer using RS232 com port.
I can read the weighing, but when I walk out the form , and came again -
My program and computer freezing.
this is my code:
private void Main_Load(object sender, EventArgs e)
{
port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
port.DataReceived += new s system.IO.Ports.SerialDataReceivedEventHandler(Recepcion);
if (port.IsOpen == false)
{
try
{
port.Open();
}
catch (Exception oex)
{
MessageBox.Show(oex.ToString());
}
}
}
private void Actualizar(object s, EventArgs e)
{
lblMSG.Text = ExtractDecimalFromString(port.ReadLine()).ToString();
port.DiscardInBuffer();
lblMSG.Text = ExtractDecimalFromString(port.ReadExisting()).ToString();
port.DiscardInBuffer();
}
private void Recepcion(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
try
{
this.Invoke(new EventHandler(Actualizar));
}
catch { }
}
and when i close the form i do this:
port.DataReceived -= new System.IO.Ports.SerialDataReceivedEventHandler(Recepcion);
GC.Collect();
port.Close();
port.Dispose();
this.Close();
It is not always freezes, sometime yes...sometime no....
I searched the entire network still does not answer and solution.
I'm really despair. I wish to find a solution here
|
|
|
|
|
From where I can see this, I believe you are facing the UI freezing effect (there are various threads that explain what it is in technical aspect). The effect is that, when your application is doing a task that takes some time (if I remember correctly, it was more than 100ms or 1 second) then you need to run that task on a background thread, otherwise your application will freeze and user might think that the application is stuck, because the UI thread doesn't get enough time to update its components or respond to UI interaction; although it is still working properly.
The way you wrote the code, it is a bit tough to consider where you might put a background thread to execute. But the nearest of it to cover the try...catch block in the Recepcion function. There are various ways to solve this problem, and various ways to increase the pain, so I will leave that in your hand to change the code in order to minimize the UI thread to wait for the updating.
Read more here, Asynchronous Programming with Async and Await (C# and Visual Basic)
wpf - C# UI freezing when serial port attempts to connect - Stack Overflow
c# - What causes my UI to freeze when closing a serial port? - Stack Overflow
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
i try this.... still same problem
|
|
|
|
|
1. Check that there are bytes to read (port.BytesToRead > 0 )
2. If you cannot be sure that every message will be terminated by a new line, use port.Read(buffer, 0, count); instead of port.ReadLine() .
|
|
|
|
|
In my experience, "ports" need to be somewhat "stable".
You can't arbitrarily open and close them without expecting a few "connection" fails.
I typically create a single instance for a port in a "longer running" app (including "weighing"), and share that instance; I don't keep opening and closing the port.
Weigh scales also need "wait" times to "center" and respond, etc. At least 100 ms.
I can't picture your scenario as being realistic: repeatedly loading a form to perform a "weighing".
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Hi Dear,
I'm confused about my semester project, Kindly give me some GUI based projects suggestion which can be implemented in C#. I have already done Chatting APP using Client Server Protocol in Java Language and have done many times Management System, In this semester I want to do something new Please Suggested me the projects.
Thanks.
|
|
|
|
|
Go to the CodeProject Articles section, where you will find many suggestions & ideas. But be careful not to copy the code, and submit it as your own work.
|
|
|
|
|
thanks for your advise I will remember your words and appreciate your suggestion !
|
|
|
|
|
Write a web crawler that crawls the internet looking for student project ideas.
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
|
how it is possible like web crawler in C#? I think it can be possible in ASP.NET not in the C#
|
|
|
|
|
What do you think ASP.NET uses? It's either using C# or VB.NET.
This space for rent
|
|
|
|
|
Message Closed
modified 1-Feb-17 8:43am.
|
|
|
|
|
ASP.NET is just a web framework. Underneath, any of the .NET languages can be used with it - this means that these languages have access to the framework features that ASP.NET uses. For instance, you can use the HttpClient class to make a HTTP request directly from C#.
This space for rent
|
|
|
|
|
Do you want to do that in Java again? If so, this is wrong forum, if not then you can rebuild the same and explain how Java and C# APIs differ in networking programming. Pretty simple?
In case, you want to do the project in Java, try adding a bit of security. End-to-end encryption is a new feature in almost every chat application, you can show you to implement that in the project you built last time. There is no harm in this in academics, I say.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Thanks for you suggestion, I want to try some new ideas instead adding feature in old one. I'm quite interested in Jarvis AI. I have read some where that It's possible and Already done in Arduino Projects by using the EMBEDDED COMPUTER ?.
modified 2-Feb-17 8:28am.
|
|
|
|
|
What are you interested in; what are your future job-market goals ?
Where do see yourself as needing to improve your skills and understanding: data-structures and databases ? algorithms and problem analysis ? visual user interaction ? web/cloud ?
To help you find what you need is possible; but, you need to find who you are.
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
Actually I'm not here to be convince who am I !
Just need suggestion, I don't expect anything from the future I believe in the present, so just suggest me your ideas instead of motivational comments, Well I'm quite interested to build the Jarvis Like Mark build it for his home automation.
|
|
|
|
|
TEProjects wrote: just suggest me your ideas instead of motivational comments Unless you take the initiative to develop your own ideas, you will learn nothing.
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
A poker-game.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I want to get the Record in Web form by clicking on select button on each Row
I mean i want to select the data from grid view from each row and other thing i want that is the form of that perticlur grid filled automatically so that i can edit it and update the data . hope u got me all of u Please help me
i know grid view has a select button so that each row is selected i want selected data in form not in grid view
|
|
|
|
|
You can get the controls of grid on button click event.
GridViewRow gvr = ((Button)sender).NamingContainer as GridViewRow; will get the row for you..
All you need to do is to get the values of controls in grid and pass their values to your form controls.
like .... Label lbl = gvr.FindControl("lbl") as Label.... and you will get the value of your row selected ..
Hope this helps
|
|
|
|