<%@ Page language="c#" Codebehind="EditCategories.aspx.cs" AutoEventWireup="false" Inherits="Mediachase.UI.Web.Projects.EditCategories" %>
<%@ register TagPrefix="btn" namespace="Mediachase.UI.Web.Modules" Assembly="Mediachase.UI.Web" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<html>
  <head>
    <title>
			<%= LocRM.GetString("Categorization")%>
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
    <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">
		<LINK href='<%=Mediachase.UI.Web.Util.CommonHelper.GetAbsolutePath("/layouts/styles/mcCalendClient.css")%>' rel="stylesheet">
		<script language="javascript">
			function AddCategory(CategoryType,ButtonId)
			{
					var w = 640;
					var h = 350;
					var l = (screen.width - w) / 2;
					var t = (screen.height - h) / 2;
					winprops = 'resizable=0, height='+h+',width='+w+',top='+t+',left='+l;
					var f = window.open('../Common/AddCategory.aspx?BtnID='+ButtonId+'&DictType=' + CategoryType, "AddCategory", winprops);
			}
		</script>
  </head>
  <body class="UserBackground" id="pT_body" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">
	
	<form id="frmMain" method="post" runat="server">
	<table class="text" cellSpacing="6" cellPadding="0" width="100%" border="0" style="margin-top:0">
		<tr>
			<td>
				<div class="ibn-label"><%= LocRM.GetString("category")%>:</div>
				<div style="height:100px; overflow-y: auto; border: 1px solid black; margin-top:5px">
					<asp:DataGrid id="grdCategories" runat="server" allowsorting="False" allowpaging="False" width="100%" autogeneratecolumns="False" borderwidth="0" gridlines="None" cellpadding="0" CellSpacing="0" ShowFooter="False" ShowHeader="False">
						<columns>
							<asp:boundcolumn visible="false" datafield="CategoryId"></asp:boundcolumn>
							<asp:templatecolumn itemstyle-cssclass="text">
								<itemtemplate>
									<asp:checkbox runat="server" id="chkItem" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName")%>' Checked='<%# SelectedCategories.Contains((int)DataBinder.Eval(Container.DataItem, "CategoryId"))%>'></asp:checkbox>
								</itemtemplate>
							</asp:templatecolumn>
						</columns>
					</asp:DataGrid>
				</div>
				<div align="right">
					<button id="btnAddGeneralCategory" runat="server" style="border:1px;padding:0;height:20px;width:22px;background-color:transparent" type="button"><IMG height="20" src="../layouts/images/icons/dictionary_edit.gif" width="22" border="0"></button>
				</div>
			</td>
		</tr>
		<tr>
			<td>
				<div class="ibn-label"><%= LocRM.GetString("ProjectCategory")%>:</div>
				<div style="height:100px; overflow-y: auto; border: 1px solid black; margin-top:5px">
					<asp:DataGrid id="grdProjectCategories" runat="server" allowsorting="False" allowpaging="False" width="100%" autogeneratecolumns="False" borderwidth="0" gridlines="None" cellpadding="0" CellSpacing="0" ShowFooter="False" ShowHeader="False">
						<columns>
							<asp:boundcolumn visible="false" datafield="CategoryId"></asp:boundcolumn>
							<asp:templatecolumn itemstyle-cssclass="text">
								<itemtemplate>
									<asp:checkbox runat="server" id="chkItem" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName")%>' Checked='<%# SelectedProjectCategories.Contains((int)DataBinder.Eval(Container.DataItem, "CategoryId"))%>'></asp:checkbox>
								</itemtemplate>
							</asp:templatecolumn>
						</columns>
					</asp:DataGrid>
				</div>
				<div align="right">
					<button id="btnAddProjectCategory" runat="server" style="border:1px;padding:0;height:20px;width:22px;background-color:transparent" type="button"><IMG height="20" src="../layouts/images/icons/dictionary_edit.gif" width="22" border="0"></button>
				</div>
			</td>
		</tr>
		<tr>
			<td>
				<div class="ibn-label"><%= LocRM.GetString("tPortfolio")%>:</div>
				<div style="height:100px; overflow-y: auto; border: 1px solid black; margin-top:5px">
					<asp:DataGrid id="grdPortfolios" runat="server" allowsorting="False" allowpaging="False" width="100%" autogeneratecolumns="False" borderwidth="0" gridlines="None" cellpadding="0" CellSpacing="0" ShowFooter="False" ShowHeader="False">
						<columns>
							<asp:boundcolumn visible="false" datafield="ProjectGroupId"></asp:boundcolumn>
							<asp:templatecolumn itemstyle-cssclass="text">
								<itemtemplate>
									<asp:checkbox runat="server" id="chkItem" Text='<%# DataBinder.Eval(Container.DataItem, "Title")%>' Checked='<%# SelectedPortfolios.Contains((int)DataBinder.Eval(Container.DataItem, "ProjectGroupId"))%>'></asp:checkbox>
								</itemtemplate>
							</asp:templatecolumn>
						</columns>
					</asp:DataGrid>
				</div>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center" >
				<btn:imbutton class="text" id="btnSave" Runat="server" CustomImage="../layouts/images/saveitem.gif" style="width:120"></btn:imbutton>
				<btn:imbutton class="text" id="btnCancel" Runat="server" IsDecline="true" CausesValidation="false" style="width:120;margin-left:20"></btn:imbutton>
			</td>
		</tr>
	</table>
	<asp:Button id="btnRefresh" CausesValidation="False" runat="server" style="visibility:hidden;"></asp:Button>
	</form>
  </body>
</html>
