|
Hi..
I need ur Help.
just give me simple logic
i Make a progrm users IN And OUT.I make a table in my database like USERNAME, DATE,INTIME, OUTTIME, when User come Select IN and click save button save in my database USERNAME, DATE,INTIME, after he going he select OUT save in my database in Same line just out timing of user.
Thanks In Advance
Jawad khatri
|
|
|
|
|
Find last IN status for user and update that row by upadating OUTTIME value.
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.
|
|
|
|
|
Superficially the program logic looks easy, but there are some edge cases that you want to consider. What happens if your user chooses to select in twice without selecting out? When you code your application, you need to think about the different ways that the user interacts with it, and work out where they could go wrong. I normally find that sketching out a simple UI on a piece of paper helps to concentrate my mind on what can (and will) cause problems with my interface.
There are two approaches to solving the problem I just gave you. The first approach is to have the application prevent you from performing the IN operation if there's one that doesn't have an OUT operation. The second approach is to allow the application to perform the IN operation, but to warn them that they have a problem because they didn't log out before, and they need to seek help. The method you choose depends entirely on your business processes, so you need to take them into account.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
A few tips when asking questions here:
'Hello..' ==> bad subject line. It doesn't mean anything, doesn't help the people here to see on a fast glimpse what you'll be asking.
mjawadkhatri wrote: just give me simple logic
Bold text (and all capital letters) is considered shouting, and that is considered rude.
mjawadkhatri wrote: i
= I
mjawadkhatri wrote: progrm
= program
As to the actual question:
You'll need a simple GUI interface.
I'd make it so that they have to select there name (if it can be automated with a smart card or something that's even better) and click 'IN' or 'OUT'.
Then you'll have to catch those edge cases Pete talked about.
Basically put yourself in the place of the user and think of ways you can make the program crash / not work / not work like it should / ...
Because the user will find them sooner or later.
|
|
|
|
|
Hello,
I have written the following code to execute a script on a remote machine.
This works fine using the default login details.
How do I modify this code so that the user's credentials are used.
string strScriptPath = strTargetFullPath;
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "cscript.exe";
process.StartInfo.Arguments = strScriptPath;
process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
try
{
process.Start();
}
catch (Exception ex)
{
}
Thanks
|
|
|
|
|
You can't. Impersonating the user remotely is a huge security risk and, therefore, not allowed. The remote script will always run as SYSTEM on the remote machine. You also cannot launch a process on a remote machine and expose a user interface. This too is a huge security risk and, again, not allowed.
|
|
|
|
|
hello folks,
i am creating an application where i am using a menubar.
now,i want to create it in such a way that,suppose i click on one menu,say data entry,the form should be opened in the same window.
at present,i have taken parentform so that i can make the menu consistent through out and i am using following code to open new window.
this.Hide();
Form2 frm = new Form2();
frm.ShowDialog();
this.Close();
this opens another window and closes the previous one.
and what i want is to open the form in same window without opening another form provided that
1. new form size fits in the window.
2. on closing the application only i can close the form.
3. on clicking next menu,this form is closed and another is opened without closing and reopening or opening a new form.
How can this be solved ??
|
|
|
|
|
IMO you should make use of MDI forms. Here[^] is an article to begin with.
Meth Ferrel wrote: 1. new form size fits in the window.
Set WindowState to maximized.
Meth Ferrel wrote: 2. on closing the application only i can close the form.
You mean just the child form? If yes, then on form closing of the Parent, check if there are any open forms. If found, just close the active child form. You can get the collection of OpenForms through Applciation.OpenForms . Note that this collection will also have the parent form.
Meth Ferrel wrote: 3. on clicking next menu,this form is closed and another is opened without closing and reopening or opening a new form.
Handle click event. Close the curently opened child form and open the next one.
|
|
|
|
|
dude...
i am not clear yet.
see...
basically i have taken MDIparent form.
what i want is,the MDI parent should not be closed,but below menu,there should be changes taking place on selecting the menu.
|
|
|
|
|
Handle the FormClosing event for the Parent. When you close it, check that if there is any open child. If you find it, then close that and cancel the closing of parent.
|
|
|
|
|
you are not at all getting my point dear.
what i am trying to say is,i just want to change all the forms according to the menu clicked.
The parent form shuold remain open.
i am using the code as
this.Hide();
form2.ShowDialog();
this.Close();
i have to change this code accordingly to fulfill my needs.
|
|
|
|
|
Meth Ferrel wrote: form2.ShowDialog();
If you are able to use ShowDialog, this means the form, is not the MDI child of the parent. If you are using MDIs, you will not be allowed to use ShowDialog for showing the child forms.
|
|
|
|
|
its the inherited form where the form is inherited by the mdiparent form.
i dont find any option as MDIChild in the add new item window.
|
|
|
|
|
Hey there,
Have you considered looking into MDI's? Here's a link for a bit of reading. I'm sorry I can't help you anymore than this as I have not used them myself, but I have heard alot about them being used for this reason.
Introduction to MDI Forms with C#[^]
Hope this helps.
Jase.
|
|
|
|
|
How Can I Get The Mac Address
|
|
|
|
|
|
What Is The Namespace To Do That
|
|
|
|
|
System.Management .
In Visual Studio, if you open the Object Browser and paste the name of class, you will get all the information about it.
|
|
|
|
|
But The ManegmentScope Does Not Work Why?
|
|
|
|
|
sanforjackass wrote: ManegmentScope ManagementScope
|
|
|
|
|
When I Put The Namespace
using System.Management;
The ManagementScope Does Not Work
|
|
|
|
|
|
The type or namespace 'ManagementScope' could not be found...
|
|
|
|
|
Add a reference to System.Management in your application.
|
|
|
|
|