📄 timeentry.aspx
字号:
DataTextField="BranchName" Width="91px" AutoPostBack="True"></asp:dropdownlist>
<span class="header-gray">部门名称</span><asp:dropdownlist id="DepartmentDropList" runat="server" CssClass="standard-text" DataValueField="DepID"
DataTextField="DepName" Width="91px" AutoPostBack="True"></asp:dropdownlist>
<span class="header-gray">姓名</span> <asp:dropdownlist id="UserList" runat="server" CssClass="standard-text" Width="150px" AutoPostBack="True"
DataValueField="UserID" DataTextField="UserName"></asp:dropdownlist></td>
</tr>
<tr>
<td vAlign="top"><asp:datagrid id="TimeEntryGrid" runat="server" Width="100%" BorderStyle="None" CellPadding="2"
AutoGenerateColumns="False" Font-Name="Verdana" FontSize="11px" AllowSorting="True" DataKeyField="EntryLogID"
BorderColor="White">
<headerstyle font-bold="True" cssclass="grid-header"></headerstyle>
<columns>
<asp:templatecolumn SortExpression="EntryDate" HeaderText="日期">
<headerstyle horizontalalign="Center" width="80px" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle horizontalalign="Center" cssclass="grid-first-item"></itemstyle>
<itemtemplate>
<asp:label ID="EntryDay" Text=' <%# DataBinder.Eval(Container, "DataItem.EntryDate", "{0:ddd}") %>' Runat="server" Width='40px' />
</itemtemplate>
<edititemtemplate>
<asp:dropdownlist Width="48px" ID="EntryDays" CssClass="Standard-text" DataSource='<%# _dayListTable %>' DataTextField = "Day" DataValueField = "Date" Runat="server">
</asp:dropdownlist>
</edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn SortExpression="ProjectName" HeaderText="项目">
<headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle width="108px" cssclass="grid-item"></itemstyle>
<itemtemplate>
<asp:label ID="EntryProject" Text=' <%# DataBinder.Eval(Container, "DataItem.ProjectName") %>' Runat="server" />
<asp:label ID="EntryProjectID" Text='<%# DataBinder.Eval(Container, "DataItem.ProjectID") %>' Runat="server" Visible="False" />
</itemtemplate>
<edititemtemplate>
<asp:dropdownlist Width="100px" ID="EntryProjects" AutoPostBack="True" CssClass="Standard-text" DataSource='<%# ListUserProjects() %>' DataTextField="Name" DataValueField="ProjectID" Runat="server" OnSelectedIndexChanged="UserProjects_OnChange" />
</edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn SortExpression="CategoryName" HeaderText="进程">
<headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle width="88px" cssclass="grid-item"></itemstyle>
<itemtemplate>
<asp:label ID="EntryCategory" Text=' <%# DataBinder.Eval(Container, "DataItem.CategoryName") %>' Runat="server" />
</itemtemplate>
<edititemtemplate>
<asp:dropdownlist Width="80px" ID="EntryCategories" CssClass="Standard-text" DataSource='<%# ListGridCategories(_userInput.ProjectID) %>' DataTextField="Abbreviation" DataValueField="CategoryID" Runat="server">
</asp:dropdownlist>
</edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn SortExpression="Duration" HeaderText="时间">
<headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle horizontalalign="Right" width="50px" cssclass="grid-item"></itemstyle>
<itemtemplate>
<asp:label ID="EntryDuration" Text=' <%# DataBinder.Eval(Container.DataItem, "Duration", "{0:f}") %>' Runat="server" />
</itemtemplate>
<edititemtemplate>
<asp:textbox Width="40px" AutoPostBack=false CssClass="Standard-text" Runat="server" ID="EntryHours" Text='<%# _userInput.Duration %>' />
<asp:requiredfieldvalidator id="RequiredFieldValidatorGridHours" runat="server" ErrorMessage="不能为空!" ControlToValidate="EntryHours"
Display="Dynamic"></asp:requiredfieldvalidator>
<asp:comparevalidator id="CompareValidatorGridHours" runat="server" ErrorMessage="必须为整数!" ControlToValidate="EntryHours"
Display="Dynamic" Type="Currency" Operator="DataTypeCheck"></asp:comparevalidator>
</edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn SortExpression="Description" HeaderText="描述">
<headerstyle horizontalalign="Left" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle cssclass="grid-item"></itemstyle>
<itemtemplate>
<asp:label ID="GridDescription" Text=' <%# DataBinder.Eval(Container, "DataItem.Description") %>' Runat="server" />
</itemtemplate>
<edititemtemplate>
<asp:textbox runat="server" CssClass="Standard-text" ID="EntryDescription" Text='<%# _userInput.Description %>' Width="250" MaxLength="255">
</asp:textbox>
</edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn HeaderText="编辑">
<headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle cssclass="grid-edit-column"></itemstyle>
<itemtemplate>
<asp:imagebutton runat="server" ImageUrl="images/icon-pencil.gif" AlternateText="编辑此记录" CommandName="Edit"
CausesValidation="false" ID="Imagebutton1" NAME="Imagebutton1"></asp:imagebutton>
<img src="images/spacer.gif" width="3">
<asp:imagebutton Runat="server" ImageUrl="images/icon-delete.gif" AlternateText="删除此记录" CommandName="Delete"
CausesValidation="False" ID="Imagebutton2" NAME="Imagebutton2"></asp:imagebutton>
</itemtemplate>
<edititemtemplate>
<asp:imagebutton runat="server" ImageUrl="images/icon-floppy.gif" AlternateText="更新此记录" CommandName="Update"
CausesValidation="False" ID="Imagebutton3" NAME="Imagebutton3"></asp:imagebutton>
<img src="images/spacer.gif" width="3">
<asp:imagebutton runat="server" ImageUrl="images/icon-pencil-x.gif" AlternateText="取消" CommandName="Cancel"
CausesValidation="False" ID="Imagebutton4" NAME="Imagebutton4"></asp:imagebutton>
</edititemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid></td>
</tr>
</table>
<!-- End Right Panel --></td>
<td width="11"><IMG height="11" src="images/spacer.gif" width="11"></td>
</tr>
<tr>
<td vAlign="top" colSpan="5" height="15"><IMG height="15" src="images/spacer.gif" width="15"></td>
</tr>
</table>
</form>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -