daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Nov 4th, 2018 121 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="WebApplication1.Index" %>
  2.  
  3. <!DOCTYPE html>
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head runat="server">
  7.     <title></title>
  8. </head>
  9. <body>
  10.     <form id="form1" runat="server">
  11.         <div>
  12.             <asp:Label ID="Poruka" runat="server"></asp:Label>
  13. <script runat="server">
  14.  protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
  15.  {
  16.  // Poruka ako je brisanje uspešno.
  17.  if(e.Exception == null)
  18.  {
  19.  Poruka.Text = "Obrisan zapis.";
  20.  }
  21.  else
  22.  {
  23.  Poruka.Text = "Greska prilikom brisanja.";
  24.  e.ExceptionHandled = true;
  25.  }
  26.  }
  27.  protected void SqlDataSource1_Deleted(object sender, SqlDataSourceStatusEventArgs e)
  28.  {
  29.  // Poruka ako je brisanje uspešno.
  30.  if(e.Exception == null)
  31.  {
  32.  Poruka.Text = "Obrisan zapis.";
  33.  }
  34.  else
  35.  {
  36.  Poruka.Text = "Greska prilikom brisanja.";
  37.  e.ExceptionHandled = true;
  38.  }
  39.  }
  40.    
  41. </script>
  42.             <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RegistracijaAutomobilaConnectionString %>" SelectCommand="SELECT * FROM [Vozilo]"
  43.                 UpdateCommand="UPDATE [Vozilo]
  44.                 SET [Vozac]= @Vozac,
  45.                 [MarkaVozila]= @MarkaVozila,
  46.                 [VrstaVozila]= @VrstaVozila,
  47.                 [Godiste]= @Godiste,
  48.                 [SnagaMotora]= @SnagaMotora,
  49.                 [ZapreminaMotora]= @ZapreminaMotora,
  50.                 [VoziloRegistrovano]= @VoziloRegistrovano
  51.                 WHERE [Vozilo_ID]= @Vozilo_ID"
  52.                 DeleteCommand="DELETE FROM [Vozilo]
  53.                                     Where[Vozilo_ID]=@Vozilo_ID"
  54.                 InsertCommand ="INSERT INTO [Vozilo]
  55.                 ([Vozilo_ID], [Vozac], [MarkaVozila], [VrstaVozila], [Godiste], [SnagaMotora], [ZapreminaMotora], [VoziloRegistrovano])
  56.                 VALUES (@Vozilo_ID, @Vozac, @MarkaVozila, @VrstaVozila, @Godiste, @SnagaMotora, @ZapreminaMotora, @VoziloRegistrovano)">
  57.                 <UpdateParameters>
  58.                         <asp:Parameter Name="Vozac" Type="Int32"> </asp:Parameter>
  59.                         <asp:Parameter Name="MarkaVozila" Type="Int32"> </asp:Parameter>
  60.                         <asp:Parameter Name="VrstaVozila" Type="Int32"></asp:Parameter>
  61.                         <asp:Parameter Name="Godiste" Type="Int32"></asp:Parameter>
  62.                         <asp:Parameter Name="SnagaMotora" Type="Int32"></asp:Parameter>
  63.                         <asp:Parameter Name="ZapreminaMotora" Type="Int32"></asp:Parameter>
  64.                         <asp:Parameter Name="VoziloRegistrovano" Type="Boolean"></asp:Parameter>
  65.                 </UpdateParameters>
  66.                 <InsertParameters>
  67.                         <asp:Parameter Name="Vozilo_ID" Type="Int32"> </asp:Parameter>
  68.                         <asp:Parameter Name="Vozac" Type="Int32"> </asp:Parameter>
  69.                         <asp:Parameter Name="MarkaVozila" Type="Int32"> </asp:Parameter>
  70.                         <asp:Parameter Name="VrstaVozila" Type="Int32"></asp:Parameter>
  71.                         <asp:Parameter Name="Godiste" Type="Int32"></asp:Parameter>
  72.                         <asp:Parameter Name="SnagaMotora" Type="Int32"></asp:Parameter>
  73.                         <asp:Parameter Name="ZapreminaMotora" Type="Int32"></asp:Parameter>
  74.                         <asp:Parameter Name="VoziloRegistrovano" Type="Boolean"></asp:Parameter>
  75.                 </InsertParameters>
  76.                 <DeleteParameters>
  77.                         <asp:Parameter Name="Vozilo_ID" Type="Int32"> </asp:Parameter>
  78.                 </DeleteParameters>
  79.             </asp:SqlDataSource>
  80.             <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:RegistracijaAutomobilaConnectionString %>" SelectCommand="SELECT * FROM [MarkaVozila]"
  81.                 UpdateCommand="UPDATE [MarkaVozila]
  82.                 SET [MarkaVozilaNaziv]= @MarkaVozilaNaziv
  83.                 WHERE [MarkaVozila_ID]= @MarkaVozila_ID"
  84.                 DeleteCommand="DELETE FROM [MarkaVozila]
  85.                                     WHERE [MarkaVozila_ID]= @MarkaVozila_ID">
  86.                 <UpdateParameters>
  87.                         <asp:Parameter Name="MarkaVozilaNaziv" Type="String"> </asp:Parameter>
  88.                 </UpdateParameters>
  89.                 <DeleteParameters>
  90.                         <asp:Parameter Name="MarkaVozila_ID" Type="Int32"> </asp:Parameter>
  91.                 </DeleteParameters>
  92.             </asp:SqlDataSource>
  93.             <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:RegistracijaAutomobilaConnectionString %>" SelectCommand="SELECT * FROM [Vozac]"
  94.                 UpdateCommand="UPDATE [Vozac]
  95.                 SET [Ime]= @Ime,
  96.                 [Prezime]= @Prezime,
  97.                 [LicnaKarta]= @LicnaKarta,
  98.                 [SaobracajnaDozvola]= @SaobracajnaDozvola
  99.                 WHERE [Vozac_ID]= @Vozac_ID"
  100.                 DeleteCommand="DELETE FROM [Vozac]
  101.                                     Where[Vozac_ID]=@Vozac_ID">
  102.                 <UpdateParameters>
  103.                         <asp:Parameter Name="Ime" Type="String"> </asp:Parameter>
  104.                         <asp:Parameter Name="Prezime" Type="String"> </asp:Parameter>
  105.                         <asp:Parameter Name="LicnaKarta" Type="Boolean"></asp:Parameter>
  106.                         <asp:Parameter Name="SaobracajnaDozvola" Type="Boolean"></asp:Parameter>
  107.                 </UpdateParameters>
  108.                 <DeleteParameters>
  109.                         <asp:Parameter Name="Vozac_ID" Type="Int32"> </asp:Parameter>
  110.                 </DeleteParameters></asp:SqlDataSource>
  111.             <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:RegistracijaAutomobilaConnectionString %>" SelectCommand="SELECT * FROM [VrstaVozila]"
  112.                 UpdateCommand="UPDATE [VrstaVozila]
  113.                 SET [NazivVozila]= @NazivVozila
  114.                 WHERE [VrstaVozila_ID]= @VrstaVozila_ID"
  115.                 DeleteCommand="DELETE FROM [VrstaVozila]
  116.                                     WHERE [VrstaVozila_ID]= @VrstaVozila_ID">
  117.                 <UpdateParameters>
  118.                         <asp:Parameter Name="NazivVozila" Type="String"> </asp:Parameter>
  119.                 </UpdateParameters>
  120.                 <DeleteParameters>
  121.                         <asp:Parameter Name="VrstaVozila_ID" Type="Int32"> </asp:Parameter>
  122.                 </DeleteParameters></asp:SqlDataSource>
  123.           <a href="Uputstvo.aspx" class="someclass" contenteditable="false"> Uputstvo.aspx</a>
  124.                 <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" AutoGenerateRows="False" CellPadding="4" DataKeyNames="Vozilo_ID" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" Height="50px" Width="1200px"
  125.                  AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" AutoGenerateColumns="False">
  126.                 <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
  127.                 <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
  128.                 <EditRowStyle BackColor="#999999" HorizontalAlign="Center" />
  129.                 <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
  130.                 <Fields>
  131.                     <asp:BoundField DataField="Vozilo_ID" HeaderText="Vozilo_ID" ReadOnly="True" SortExpression="Vozilo_ID" />
  132.                     <asp:BoundField DataField="Vozac" HeaderText="Vozac" SortExpression="Vozac" />
  133.                     <asp:BoundField DataField="MarkaVozila" HeaderText="MarkaVozila" SortExpression="MarkaVozila" />
  134.                     <asp:BoundField DataField="VrstaVozila" HeaderText="VrstaVozila" SortExpression="VrstaVozila" />
  135.                     <asp:BoundField DataField="Godiste" HeaderText="Godiste" SortExpression="Godiste" />
  136.                     <asp:BoundField DataField="SnagaMotora" HeaderText="SnagaMotora" SortExpression="SnagaMotora" />
  137.                     <asp:BoundField DataField="ZapreminaMotora" HeaderText="ZapreminaMotora" SortExpression="ZapreminaMotora" />
  138.                     <asp:CheckBoxField DataField="VoziloRegistrovano" HeaderText="VoziloRegistrovano" SortExpression="VoziloRegistrovano" />
  139.                 </Fields>
  140.                 <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
  141.                 <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
  142.                 <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
  143.                 <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Left" VerticalAlign="Top" />
  144.             </asp:DetailsView>
  145.             <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Vozac_ID" DataSourceID="SqlDataSource3" ForeColor="#333333" GridLines="None" Width="1200px"
  146.                 AutoGenerateDeleteButton="True" AutoGenerateEditButton="True">
  147.                 <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
  148.                 <Columns>
  149.                     <asp:BoundField DataField="Vozac_ID" HeaderText="Vozac_ID" ReadOnly="True" SortExpression="Vozac_ID" />
  150.                     <asp:BoundField DataField="Ime" HeaderText="Ime" SortExpression="Ime" />
  151.                     <asp:BoundField DataField="Prezime" HeaderText="Prezime" SortExpression="Prezime" />
  152.                     <asp:CheckBoxField DataField="LicnaKarta" HeaderText="LicnaKarta" SortExpression="LicnaKarta" />
  153.                     <asp:CheckBoxField DataField="SaobracajnaDozvola" HeaderText="SaobracajnaDozvola" SortExpression="SaobracajnaDozvola" />
  154.                 </Columns>
  155.                 <EditRowStyle BackColor="#999999" />
  156.                 <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
  157.                 <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
  158.                 <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
  159.                 <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
  160.                 <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
  161.                 <SortedAscendingCellStyle BackColor="#E9E7E2" />
  162.                 <SortedAscendingHeaderStyle BackColor="#506C8C" />
  163.                 <SortedDescendingCellStyle BackColor="#FFFDF8" />
  164.                 <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
  165.             </asp:GridView>
  166.             <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="MarkaVozila_ID" DataSourceID="SqlDataSource2" ForeColor="#333333" GridLines="None" Width="1200px"
  167.                 AutoGenerateDeleteButton="True" AutoGenerateEditButton="True">
  168.                 <AlternatingRowStyle BackColor="White" ForeColor="#284775" HorizontalAlign="Center" VerticalAlign="Middle" />
  169.                 <Columns>
  170.                     <asp:BoundField DataField="MarkaVozila_ID" HeaderText="MarkaVozila_ID" ReadOnly="True" SortExpression="MarkaVozila_ID" />
  171.                     <asp:BoundField DataField="MarkaVozilaNaziv" HeaderText="MarkaVozilaNaziv" SortExpression="MarkaVozilaNaziv" />
  172.                 </Columns>
  173.                 <EditRowStyle BackColor="#999999" HorizontalAlign="Center" VerticalAlign="Middle" />
  174.                 <EmptyDataRowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
  175.                 <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
  176.                 <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
  177.                 <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
  178.                 <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
  179.                 <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
  180.                 <SortedAscendingCellStyle BackColor="#E9E7E2" />
  181.                 <SortedAscendingHeaderStyle BackColor="#506C8C" />
  182.                 <SortedDescendingCellStyle BackColor="#FFFDF8" />
  183.                 <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
  184.             </asp:GridView>
  185.             <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="VrstaVozila_ID" DataSourceID="SqlDataSource4" ForeColor="#333333" GridLines="None" Width="1200px"
  186.                 AutoGenerateDeleteButton="True" AutoGenerateEditButton="True">
  187.                 <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
  188.                 <Columns>
  189.                     <asp:BoundField DataField="VrstaVozila_ID" HeaderText="VrstaVozila_ID" ReadOnly="True" SortExpression="VrstaVozila_ID" />
  190.                     <asp:BoundField DataField="NazivVozila" HeaderText="NazivVozila" SortExpression="NazivVozila" />
  191.                 </Columns>
  192.                 <EditRowStyle BackColor="#999999" />
  193.                 <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
  194.                 <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
  195.                 <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
  196.                 <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" VerticalAlign="Middle" />
  197.                 <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
  198.                 <SortedAscendingCellStyle BackColor="#E9E7E2" />
  199.                 <SortedAscendingHeaderStyle BackColor="#506C8C" />
  200.                 <SortedDescendingCellStyle BackColor="#FFFDF8" />
  201.                 <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
  202.             </asp:GridView>
  203.             <asp:DetailsView ID="DetailsView2" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" Height="50px" OnPageIndexChanging="DetailsView2_PageIndexChanging" Width="600px"
  204.                 AutoGenerateInsertButton="True" AutoGenerateRows="False" DataKeyNames="Vozilo_ID" DataSourceID="SqlDataSource1">
  205.                 <AlternatingRowStyle BackColor="White" />
  206.                 <CommandRowStyle BackColor="#C5BBAF" Font-Bold="True" />
  207.                 <EditRowStyle BackColor="#7C6F57" />
  208.                 <FieldHeaderStyle BackColor="#D0D0D0" Font-Bold="True" />
  209.                 <Fields>
  210.                     <asp:BoundField DataField="Vozilo_ID" HeaderText="Vozilo_ID" ReadOnly="True" SortExpression="Vozilo_ID" />
  211.                     <asp:BoundField DataField="Vozac" HeaderText="Vozac" SortExpression="Vozac" />
  212.                     <asp:BoundField DataField="MarkaVozila" HeaderText="MarkaVozila" SortExpression="MarkaVozila" />
  213.                     <asp:BoundField DataField="VrstaVozila" HeaderText="VrstaVozila" SortExpression="VrstaVozila" />
  214.                     <asp:BoundField DataField="Godiste" HeaderText="Godiste" SortExpression="Godiste" />
  215.                     <asp:BoundField DataField="SnagaMotora" HeaderText="SnagaMotora" SortExpression="SnagaMotora" />
  216.                     <asp:BoundField DataField="ZapreminaMotora" HeaderText="ZapreminaMotora" SortExpression="ZapreminaMotora" />
  217.                     <asp:CheckBoxField DataField="VoziloRegistrovano" HeaderText="VoziloRegistrovano" SortExpression="VoziloRegistrovano" />
  218.                 </Fields>
  219.                 <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
  220.                 <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
  221.                 <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
  222.                 <RowStyle BackColor="#E3EAEB" />
  223.             </asp:DetailsView>
  224.             <br />
  225.         </div>
  226.     </form>
  227. </body>
  228. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top