时间表asp.net应用程序gridview [英] timesheets asp.net application gridview

查看:84
本文介绍了时间表asp.net应用程序gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人开发了一个时间表应用程序,该应用程序显示两周一次的工资单日期的网格,并允许输入给定行的工资类型代码的每一天吗?如果是这样,我想看看您如何创建gridview以及如何将数据检索/存储到数据库中.我不想将薪资日期存储在表中,而是让查询为选定的给定日期动态生成它们.如果您做过类似的事情,请您分享编写asp.net应用程序时间表所涉及的代码和/或概念吗?

Has anyone developed a timesheet application that shows a grid of biweekly payroll dates and allows entry into each day for a given row of pay type codes? If so, I would like to see how you created the gridview and retrieve/store the data into a database. I would like to not have to store the payroll dates in a table, rather have the query dynamically generate them for a given date selected. If you have done something similar, would you please share the code and/or concepts involved in writing an asp.net application for timesheets?

推荐答案

我通常会绑定到对象的集合而不是数据库结果集(尤其是在这种情况下),因此请创建一个具有Date和Type和Hours属性或其他所需属性的TimesheetEntry类.
创建这些对象的集合,以编程方式在循环中设置日期
绑定到收藏集
I would normally bind to a collection of objects rather than a database result set - especially in this sort of case - so create a class TimesheetEntry with properties of Date and Type and Hours or whatever else you need.
Create a collection of these objects, setting the date programmatically in a loop
Bind to the collection


这篇关于时间表asp.net应用程序gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆