<%@ Page language="c#" Codebehind="TeamEditor.aspx.cs" AutoEventWireup="false" Inherits="Mediachase.UI.Web.Projects.TeamEditor" %>
<%@ Register TagPrefix="ibn" TagName="BlockHeader" src="..\Modules\BlockHeader.ascx" %>
<%@ register TagPrefix="lst" namespace="Mediachase.UI.Web.Modules" Assembly="Mediachase.UI.Web" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD id="pT_headTag">
		<title>
			<%=LocRM.GetString("tTitle") %>
		</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script src="../Scripts/browser.js"></script>
		<script src="../Scripts/buttons.js"></script>
		<LINK href="../layouts/styles/windows.css" type="text/css" rel="stylesheet">
		<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/theme.css" rel="stylesheet">
		<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/color1.css" rel="stylesheet">
		<script><!--
		if ((browseris.mac) && !browseris.ie5up)
		{
			var macstyle = "../layouts/styles/mac.css";
			document.write("<link rel='stylesheet' Type='text/css' href='" + macstyle + "'>");
		}
	
		//--></script>
		<script language="JavaScript"> 
			function disableEnterKey() 
			{ 
				try {
					if (window.event.keyCode == 13 && window.event.srcElement.type != "textarea")
						window.event.keyCode = 0;
				}
				catch (e) {}
			} 
		</script>
	</HEAD>
	<body class="UserBackground" id="pT_body" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">
		<form id="frmMain" runat="server">
			<ibn:blockheader id="secHeader" title="ToolBar" runat="server"></ibn:blockheader>
			<table class="text" style="HEIGHT: 100%" height="100%" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr height="22">
					<td class="boldtext" width="280" height="22"><%=LocRM.GetString("Available") %>
						:</td>
					<td width="4">&nbsp;</td>
					<td class="ibn-navframe boldtext"><%=LocRM.GetString("Selected") %>
						:</td>
				</tr>
				<tr style="HEIGHT: 100%">
					<td vAlign="top" width="280">
						<!-- Groups & Users -->
						<table class="text" style="MARGIN-TOP: 5px" cellSpacing="0" cellPadding="3" width="100%">
							<tr>
								<td width="9%" style="HEIGHT: 18px"><%=LocRM.GetString("Group") %>
									:</td>
								<td width="91%" style="HEIGHT: 18px"><lst:indenteddropdownlist id="ddGroups" runat="server" CssClass="text" Width="190px" AutoPostBack="True" DataTextField="GroupName" DataValueField="GroupId"></lst:indenteddropdownlist></td>
							</tr>
							<TR>
								<TD width="9%"><%=LocRM.GetString("Search") %>:</TD>
								<TD width="91%">
									<asp:TextBox id="tbSearch" runat="server" CssClass="text" Width="125px"></asp:TextBox>
									<asp:button id="btnSearch" runat="server" Width="60px" CssClass="text" CausesValidation="False"></asp:button>
									<asp:Label ID="lblError" CssClass="ibn-error" Runat=server></asp:Label>
								</TD>
							</TR>
							<tr>
								<td vAlign="top" height="96"><%=LocRM.GetString("User") %>
									:</td>
								<td vAlign="top"><asp:listbox id="lbUsers" runat="server" CssClass="text" Width="190px" SelectionMode="Multiple" Rows="6"></asp:listbox></td>
							</tr>
							<tr>
								<td vAlign="top" height="28">&nbsp;</td>
								<td><button id="btnAdd" runat="server" Class="text" style="width:90px" type="button"></button>
									<Button id="btnSave" runat="server" Text="Button" style="DISPLAY:none" type="button">
									</Button>
								</td>
							</tr>
						</table>
						<!-- End Groups & Users -->
					</td>
					<td width="4">&nbsp;</td>
					<td vAlign="top" class="ibn-navframe" height="100%">
						<!-- Data GRID -->
						<div style="OVERFLOW:auto;HEIGHT:300px">
							<asp:DataGrid Runat="server" ID="dgMembers" AutoGenerateColumns="False" AllowPaging="False" AllowSorting="False" cellpadding="3" gridlines="None" CellSpacing="3" borderwidth="0px" Width="100%">
								<ItemStyle CssClass="text"></ItemStyle>
								<HeaderStyle CssClass="text"></HeaderStyle>
								<Columns>
									<asp:BoundColumn DataField="UserId" Visible="False"></asp:BoundColumn>
									<asp:TemplateColumn HeaderText='Name'>
										<ItemTemplate>
											<%# Mediachase.UI.Web.Util.CommonHelper.GetUserStatusUL((int)DataBinder.Eval(Container.DataItem, "UserId"))%>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn HeaderText='Code' HeaderStyle-Width="35" >
										<ItemTemplate>
											<input type="text" class="text" runat="server" value='<%# DataBinder.Eval(Container.DataItem, "Code") %>' id="tCode"  maxlength="2" style="Width:30px"/>
											<asp:RequiredFieldValidator ID="vCode" Runat="server" ControlToValidate="tCode" ErrorMessage="*" Display="Dynamic"></asp:RequiredFieldValidator>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:TemplateColumn HeaderText='Rate' HeaderStyle-Width="50" >
										<ItemTemplate>
											<input type="text" class="text" runat="server" value='<%# ((decimal)DataBinder.Eval(Container.DataItem, "Rate")).ToString("f") %>' id="tRate"  style="Width:50px"/>
											<asp:RequiredFieldValidator ID="Requiredfieldvalidator1" Runat="server" ControlToValidate="tRate" ErrorMessage="*" Display="Dynamic"></asp:RequiredFieldValidator>
										</ItemTemplate>
									</asp:TemplateColumn>
									<asp:templatecolumn HeaderStyle-Width="20" Visible="True">
										<itemtemplate>
											<asp:imagebutton id="ibDelete" runat="server" borderwidth="0" width="16" height="16" imageurl="../layouts/images/DELETE.GIF" commandname="Delete" causesvalidation="False"></asp:imagebutton>
										</itemtemplate>
									</asp:templatecolumn>
								</Columns>
							</asp:DataGrid>
							<!-- End Data GRID --></div>
					</td>
				</tr>
			</table>
			<script language=javascript>
				function FuncSave()
				{
					DisableButtons(document.forms[0].<%=btnSave.ClientID%>);
					<%=Page.GetPostBackClientEvent(btnSave,"") %>;
				}
				function FuncCancel(ProjectId)
				{
					var obj = window.parent.document.getElementById('<%=BtnID%>');
					if(obj!=null)
						obj.style.display = "none";
					else if(parent == window)
						window.close();
					else
						window.top.frames['right'].location.href='ProjectView.aspx?ProjectId='+ProjectId;
				}
			</script>
		</form>
	</body>
</HTML>
