Advertisement
Advertisement
| 03.20.2008 at 09:48PM PDT, ID: 23259126 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: |
aspx page
<%@ Page Language="VB" MasterPageFile="~/MembersDefault.master" AutoEventWireup="false" CodeFile="frmHR.aspx.vb" Inherits="Members_frmHRBuild" title="HRBuilder" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">
HR Builder<br />
<script language =javascript type="text/javascript">
function Calculate(HoursPerUnit, PeoplePerUnit, TotalHoursPerUnit)
{
TotalHoursPerUnit.value = HoursPerUnit.value * PeoplePerUnit.value;
}
</script>
<br />
<asp:LinkButton ID="CheckAll" runat="server">Check All</asp:LinkButton>
<asp:LinkButton ID="UncheckAll" runat="server">Uncheck All</asp:LinkButton><br />
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="DetailMUMID"
DataSourceID="SqlDataSource1" AllowSorting="True" ShowFooter="True" AllowPaging="True" EmptyDataText="There is not any data.">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="RecordSelector" runat="server" />
</ItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="DetailID" InsertVisible="False" SortExpression="DetailID">
<EditItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("DetailID") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label32" runat="server" Text='<%# Bind("DetailID") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:LinkButton ID="AddRecord" runat="server" CommandName="Insert">Add</asp:LinkButton>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TemplateHRID" SortExpression="TemplateHRID" Visible="False">
<EditItemTemplate>
<asp:TextBox ID="TextBox32" runat="server" Text='<%# Bind("TemplateHRID") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label33" runat="server" Text='<%# Bind("TemplateHRID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="WorkOrderID" SortExpression="WorkOrderID">
<EditItemTemplate>
<asp:TextBox ID="TextBox31" runat="server" Text='<%# Bind("WorkOrderID") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label31" runat="server" Text='<%# Bind("WorkOrderID") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="NewWorkOrderID" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Loc" SortExpression="Loc">
<EditItemTemplate>
<asp:DropDownList ID="DropDownList5" runat="server" DataSourceID="LocddlODS"
DataTextField="Loc" DataValueField="Loc">
</asp:DropDownList><asp:ObjectDataSource ID="LocddlODS" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="GettblLoc" TypeName="tblLocBLL"></asp:ObjectDataSource>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Loc") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="NewLoc" runat="server" DataSourceID="ddlLoc"
DataTextField="Loc" DataValueField="Loc">
</asp:DropDownList><asp:SqlDataSource ID="ddlLoc" runat="server" ConnectionString="<%$ ConnectionStrings:HRConnectionString %>"
SelectCommand="SELECT [LocID], [Loc] FROM [tblLoc]"></asp:SqlDataSource>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="IndexNumber" SortExpression="IndexNumber">
<EditItemTemplate>
<asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("IndexNumber") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label6" runat="server" Text='<%# Bind("IndexNumber") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="NewIndexNumber" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="HoursPerUnit" SortExpression="HoursPerUnit">
<EditItemTemplate>
<asp:TextBox ID="tbxHrsPerUnit" runat="server" Text='<%# Bind("HoursPerUnit") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label7" runat="server" Text='<%# Bind("HoursPerUnit") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="NewHoursPerUnit" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PeoplePerUnit" SortExpression="PeoplePerUnit">
<EditItemTemplate>
<asp:TextBox ID="tbxPPerUnit" runat="server" Text='<%# Bind("PeoplePerUnit") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Lbl7" runat="server" Text='<%# Bind("PeoplePerUnit") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="NewPeoplePerUnit" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TotalHoursPerUnit" SortExpression="TotalHoursPerUnit">
<EditItemTemplate>
<asp:TextBox ID="tbxTHrsPerUnit" runat="server" Text='<%# Bind("TotalHoursPerUnit") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Lbl8" runat="server" Text='<%# Bind("TotalHoursPerUnit") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="NewTotalHoursPerUnit" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
Code Behind:
------------
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
'GridView Edit Template Rows
Dim HoursPerUnit As System.Web.UI.WebControls.TextBox
Dim PeoplePerUnit As System.Web.UI.WebControls.TextBox
Dim TotalHoursPerUnit As System.Web.UI.WebControls.TextBox
If e.Row.RowType = DataControlRowType.DataRow AndAlso e.Row.RowState = DataControlRowState.Edit Then
HoursPerUnit = CType(e.Row.FindControl("tbxHrsPerUnit"), System.Web.UI.WebControls.TextBox)
PeoplePerUnit = CType(e.Row.FindControl("tbxPPerUnit"), System.Web.UI.WebControls.TextBox)
TotalHoursPerUnit = CType(e.Row.FindControl("tbxTHrsPerUnit"), System.Web.UI.WebControls.TextBox)
HoursPerUnit.Attributes.Add("onchange", "Calculate(" + HoursPerUnit.ClientID + "," + PeoplePerUnit.ClientID + "," + TotalHoursPerUnit.ClientID + ")")
PeoplePerUnit.Attributes.Add("onchange", "Calculate(" + HoursPerUnit.ClientID + "," + PeoplePerUnit.ClientID + "," + TotalHoursPerUnit.ClientID + ")")
End If
'Gridview Footer Row 'Nothing happens when using the statements
If e.Row.RowType = DataControlRowType.DataRow AndAlso e.Row.RowState = DataControlRowState.Insert Then
' HoursPerUnit = CType(Me.GridView1.FooterRow.FindControl("NewHoursPerUnit"), System.Web.UI.WebControls.TextBox)
' PeoplePerUnit = CType(Me.GridView1.FooterRow.FindControl("NewPeoplePerUnit"), System.Web.UI.WebControls.TextBox)
' TotalHoursPerUnit = CType(Me.GridView1.FooterRow.FindControl("NewTotalHoursPerUnit"), System.Web.UI.WebControls.TextBox)
HoursPerUnit = CType(e.Row.FindControl("NewHoursPerUnit"), System.Web.UI.WebControls.TextBox)
PeoplePerUnit = CType(e.Row.FindControl("NewPeoplePerUnit"), System.Web.UI.WebControls.TextBox)
TotalHoursPerUnit = CType(e.Row.FindControl("NewTotalHoursPerUnit"), System.Web.UI.WebControls.TextBox)
HoursPerUnit.Attributes.Add("onchange", "Calculate(" + HoursPerUnit.ClientID + "," + PeoplePerUnit.ClientID + "," + TotalHoursPerUnit.ClientID + ")")
PeoplePerUnit.Attributes.Add("onchange", "Calculate(" + HoursPerUnit.ClientID + "," + PeoplePerUnit.ClientID + "," + TotalHoursPerUnit.ClientID + ")")
End If
End Sub
|