<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Contacts.aspx.cs" Inherits="ToolsCRM.user_sites.Contacts" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Kontakty</title>
    <link rel="stylesheet" href="../js/style.css" type="text/css" media="screen" />
        <style type="text/css">
        .Buttonstyle1out
        {
            width: 127px;
	        background: url('../images/button.png') no-repeat left center;
            margin-top: 5px;
            cursor:default;
        }
        .Buttonstyle1hover
        {
            width: 127px;
	        background: url('../images/button.png') no-repeat left center;
            margin-top: 5px;
            cursor:pointer;
        } 
    </style>
</head>
<body>
    <form id="form1" runat="server">
     <div id="header">
	    <div id="logo">
		    <h1><a href="../Index.aspx">ToolsCRM</a></h1>
		    <p><a href="http://crm.dynamics.com/pl-pl/home">Microsoft Dynamics CRM</a></p>
	    </div>
         <div id="menu">
		<ul>
			<li class="current_page_item"><a href="#"></a></li>
			<li><a href="#"></a></li>
			<li><a href="#"></a></li>
			<li><a href="#"></a></li>
		    <li><div class="post"><p class="links"><asp:Button ID="Wyloguj" runat="server" Text="Wyloguj" OnClick="Wyloguj_Click" BorderStyle="None" CssClass="more" Font-Bold="True" ForeColor="White"  Width="129px" onMouseOver="this.className='Buttonstyle1hover'" onMouseOut="this.className='Buttonstyle1out'"/></p></div></li>
		</ul>
	</div></div>
        <div id="page">


            <div id="sidebar">
		<ul>
			<li id="search" style="background: none;">
					<div>
						<input type="text" name="s" id="s" size="15" />
						<br />
						<input type="submit" value="Search" />
					</div>
			</li>
			<li>
                <h2><a href="../user.aspx">Strona Startowa</a></h2>
                <h2>Moja Praca</h2>
                <ul>                    
					<li><a href="Activities.aspx">Działania</a></li>
					<li><a href="Agenda.aspx">Kalendarz</a></li>
                    <li><a href="#">Artkuły</a></li>
                    <li><a href="#">Raporty</a></li>
				</ul>
			</li>
            <li>
				<h2>Klienci</h2>
				<ul>
					<li><a href="Account.aspx">Konta</a></li>
					<li><a href="Contacts.aspx">Kontakty</a></li>
				</ul>
			</li>
		</ul>
	</div>
	<!-- end sidebar -->




          <div class="post">
            <div id="content">
                <div class="title">
				    <h2><a href="../user.aspx">Witaj <asp:Label ID="Label1" runat="server"></asp:Label></a></h2>
			    </div>
                
                    
                
                <div class="entry">
                    Dostępne kontakty w bazie CRM
                    <div class="entry">
                    <!--This example lists all contacts from the Microsoft Dynamics CRM system. -->
                    
                        <div class="auto-style1">
                    <asp:GridView ID="GridView1" AutoGenerateColumns ="False" runat="server"
                        Width="100%"
                        DataKeyNames="firstname,lastname,emailaddress1,address1_city,createdon,accountrolecode,statecode" OnDataBound="GridView1_DataBound" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical"
                        >

                        <AlternatingRowStyle BackColor="White" />

                 <Columns>
                     <asp:BoundField DataField="firstname" 
                    HeaderText="Imię"  />
                     <asp:BoundField DataField="lastname" 
                    HeaderText="Nazwisko"  />
                     <asp:BoundField DataField="emailaddress1" 
                    HeaderText="email"  />
                     <asp:BoundField DataField="address1_city" 
                    HeaderText="Miasto"  />
                     <asp:BoundField DataField="createdon" 
                    HeaderText="Utworzony"  />
                     <asp:BoundField DataField="accountrolecode" 
                    HeaderText="Rola"  />
                     <asp:BoundField DataField="statecode" 
                    HeaderText="Stan"  />
            </Columns>
                        <FooterStyle BackColor="#CCCC99" />
                        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                        <RowStyle BackColor="#F7F7DE" />
                        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                        <SortedAscendingCellStyle BackColor="#FBFBF2" />
                        <SortedAscendingHeaderStyle BackColor="#848384" />
                        <SortedDescendingCellStyle BackColor="#EAEAD3" />
                        <SortedDescendingHeaderStyle BackColor="#575357" />
            </asp:GridView>
            </div>
         

                    
                </div>
                    <div class="post"><p class="links">
                <asp:Button ID="Add" runat="server" Text="Dodaj kontakt" OnClick="Add_Click" BorderStyle="None" CssClass="more" Font-Bold="True" ForeColor="White"  Width="129px" onMouseOver="this.className='Buttonstyle1hover'" onMouseOut="this.className='Buttonstyle1out'"/>
                        <asp:Button ID="Edit" runat="server" Text="Edytuj kontakt" BorderStyle="None" CssClass="more" Font-Bold="True" ForeColor="White"  Width="129px" OnClick="Edit_Click" onMouseOver="this.className='Buttonstyle1hover'" onMouseOut="this.className='Buttonstyle1out'"/>
                        <asp:Button ID="Delete" runat="server" Text="Usuń kontakt" BorderStyle="None" CssClass="more" Font-Bold="True" ForeColor="White"  Width="129px" OnClick="Delete_Click" onMouseOver="this.className='Buttonstyle1hover'" onMouseOut="this.className='Buttonstyle1out'"/>
                </p></div><br />
                        <asp:Label ID="Label4" runat="server"></asp:Label><br />
                    <div class="post"><p class="links"><asp:DropDownList ID="DropDownList1" runat="server" Visible="False" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" OnInit="DropDownList1_Init"></asp:DropDownList>
                    <asp:Button ID="Del" runat="server" Text="Usuń"  BorderStyle="None" CssClass="more" Font-Bold="True" ForeColor="White"  Width="129px" OnClick="Del_Click" Visible="False" onMouseOver="this.className='Buttonstyle1hover'" onMouseOut="this.className='Buttonstyle1out'"/>
                        <asp:Button ID="Ed" runat="server" Text="Edytuj"  BorderStyle="None" CssClass="more" Font-Bold="True" ForeColor="White"  Width="129px" OnClick="Ed_Click" Visible="False" onMouseOver="this.className='Buttonstyle1hover'" onMouseOut="this.className='Buttonstyle1out'"/>
                    </p></div>
                    <asp:Table ID="Table1" runat="server" Visible="False" CellPadding="0" CellSpacing="0" Width="470px">
                        <asp:TableRow>
                            <asp:TableHeaderCell HorizontalAlign="Right">Imię</asp:TableHeaderCell><asp:TableCell><asp:TextBox ID="Timie" runat="server" MaxLength="20"></asp:TextBox></asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                            <asp:TableHeaderCell HorizontalAlign="Right" Height="40px">Nazwisko</asp:TableHeaderCell><asp:TableCell><asp:TextBox ID="Tnazwisko" runat="server"></asp:TextBox></asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                            <asp:TableHeaderCell HorizontalAlign="Right">email</asp:TableHeaderCell><asp:TableCell><asp:TextBox ID="Temail" runat="server"></asp:TextBox></asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>  
                            <asp:TableHeaderCell HorizontalAlign="Right">Miasto</asp:TableHeaderCell><asp:TableCell><asp:TextBox ID="Tmiasto" runat="server"></asp:TextBox></asp:TableCell>                          
                             <asp:TableCell HorizontalAlign="Right">
                                <div class="post"><p class="links"><asp:Button ID="Addadd" runat="server" Text="Dodaj" OnClick="Addadd_Click" BorderStyle="None" CssClass="more" Font-Bold="True" ForeColor="White"  Width="129px" onMouseOver="this.className='Buttonstyle1hover'" onMouseOut="this.className='Buttonstyle1out'"/></p></div>
                             </asp:TableCell>                        
                        </asp:TableRow>
                    </asp:Table>
             </div>
                <div>
                    <asp:Label ID="Label2" runat="server" Text="lub dodaj istniejący kontakt w bazie CRM do listy Twoich kontaktów" Visible="False"></asp:Label>

                    <br />
                    <br />
                    <table>
                        <tr>
                            <td>
                                <asp:DropDownList ID="dodawanieKontaktu" runat="server" OnInit="dodawanieKontaktu_Init" Visible="False"></asp:DropDownList>
                            </td>
                            <td>
                                 <div class="post"><p class="links"><asp:Button ID="Addadd2" runat="server" Text="Dodaj" BorderStyle="None" 
                                     CssClass="more" Font-Bold="True" ForeColor="White"  Width="129px" 
                                     onMouseOver="this.className='Buttonstyle1hover'" onMouseOut="this.className='Buttonstyle1out'" OnClick="Addadd2_Click" Visible="False"/></p></div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label3" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                    </table>                   
                   
                </div>
                </div>
            </div>
          </div>
    </form>
</body>
</html>


