在datagridview单元格中输入时间并计算windows窗体应用程序中的差异 [英] Entering time in datagridview cell and calculate difference in windows forms app
本文介绍了在datagridview单元格中输入时间并计算windows窗体应用程序中的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好..
在我的 windows窗体 apllication(即工作人员时间表)中,我需要一个要求......
Plz帮助我。
我正在使用 dataGridView ,其中app用户输入工人 IN 和 OUT 2个会话的时间,即早晨会话和下午会话。
我被困在这里bcz。我不知道方式/格式我可以允许app用户输入时间,而且我还需要找到总数没有。小时工人工作。
提前谢谢..!
hello..
In my windows forms apllication (i.e workers time table),I need one requirement...
Plz help me.
I''m using dataGridView where app user enters worker''s IN and OUT timings in 2 sessions i.e morning session and afternoon session.
I''m stuck here bcz. I don''t know in which way/format I can allow app user to enter timings, and also I need to find total no. of hours the worker worked.
Thanks in advance..!
推荐答案
你好,
我猜你在背景中有一个DataTable有3列,如[CheckInTime],[CheckOtTime]和[TimeDifference]。您可以尝试为[Timedifference]列设置表达式( Link )
但我不确定这是否有用。如果没有,那么您可以为DataTable columnchanged事件创建一个事件处理程序并计算差异并写入表。
Hi,
I guess you have a DataTable in the background with 3 columns like [CheckInTime], [CheckOtTime] and [TimeDifference]. In the you can try to set up an expression for the [Timedifference] column (Link)
but I not sure if this work. If not then you can create an event handler for the DataTable columnchanged event and calculate the difference and write to the table.
这篇关于在datagridview单元格中输入时间并计算windows窗体应用程序中的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文