[Dnsmail-cvs] projeler/ajanda-no KAYITLAR.MDB,NONE,1.1 Web.Config,NONE,1.1 nsb.aspx,NONE,1.1 nsb[1].
Brought to you by:
ethem
From: berhuni <be...@us...> - 2006-05-27 12:43:27
|
Update of /cvsroot/dnsmail/projeler/ajanda-no In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26742 Added Files: KAYITLAR.MDB Web.Config nsb.aspx nsb[1].aspx.cs Log Message: ilk defa ekliyoruz. --- NEW FILE: Web.Config --- <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <appSettings/> <connectionStrings> <add name="KAYITLARConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\KAYITLAR.MDB"" providerName="System.Data.OleDb" /> <add name="KAYITLARConnectionString2" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\Documents and Settings\MRT\Belgelerim\Visual Studio 2005\Projects\KAYITLAR.MDB"" providerName="System.Data.OleDb" /> <add name="KAYITLARConnectionString3" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\Documents and Settings\SE\Belgelerim\Visual Studio 2005\Projects\Yeni Klasör\KAYITLAR.MDB"" providerName="System.Data.OleDb" /> <add name="KAYITLARConnectionString4" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\Documents and Settings\SE\Belgelerim\Visual Studio 2005\Projects\Yeni Klasör\KAYITLAR.MDB"" providerName="System.Data.OleDb" /> <add name="KAYITLARConnectionString5" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\Documents and Settings\SE\Belgelerim\Visual Studio 2005\Projects\Yeni Klasör\KAYITLAR.MDB"" providerName="System.Data.OleDb" /> <add name="KAYITLARConnectionString6" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\Documents and Settings\SE\Belgelerim\Visual Studio 2005\Projects\Yeni Klasör\KAYITLAR.MDB"" providerName="System.Data.OleDb" /> </connectionStrings> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true"/> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <authentication mode="Windows"/> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> </system.web> </configuration> --- NEW FILE: nsb.aspx --- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="nsb.aspx.cs" Inherits="Default3" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body > <form id="form1" runat="server"> <div> <br /> <asp:Label ID="Label3" runat="server" Text="Label" Visible="False"></asp:Label> <asp:Label ID="Label4" runat="server" Text="Label" Visible="False"></asp:Label><br /> <center> <asp:Panel ID="Panel2" runat="server" Height="1px" Width="345px"> <table style="width: 336px; height: 188px; background-color: transparent;" border="0" cellpadding="4" cellspacing="4" > <tr> <td style="width: 82px"> <asp:Label ID="Label1" runat="server" Text="Kullanýcý " BackColor="#FFC080" BorderColor="#FFC0C0" BorderStyle="Dotted" BorderWidth="1px" Font-Bold="True" Font-Size="Medium" ForeColor="#C04000" Width="128px"></asp:Label></td> <td style="width: 158px"> <asp:TextBox ID="TextBox1" runat="server" BackColor="#FFE0C0" BorderStyle="Double" BorderWidth="1px"></asp:TextBox></td> </tr> <tr> <td style="width: 82px; height: 26px;"> <asp:Label ID="Label2" runat="server" Text="Þifre" BackColor="#FFC080" BorderColor="#FFC0C0" BorderStyle="Dotted" BorderWidth="1px" Font-Bold="True" Font-Size="Medium" ForeColor="#C04000" Width="128px"></asp:Label></td> <td style="width: 158px; height: 26px;"> <asp:TextBox ID="TextBox2" runat="server" BackColor="#FFE0C0" BorderStyle="Double" BorderWidth="1px"></asp:TextBox></td> </tr> <tr> <td style="width: 63px" colspan="2" align="right" valign="middle" > <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="GÝRÝÞ" /></td> </tr> <tr> <td style="width: 63px" colspan="2" align="center" > <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="Kullanýcý adýný giriniz" Width="235px"></asp:RequiredFieldValidator></td> </tr> <tr> <td style="width: 63px" colspan="2" align="center" > <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" ErrorMessage="Þifre giriniz" Width="238px"></asp:RequiredFieldValidator> </td> </tr> </table> </asp:Panel></center> <br /> <asp:Panel ID="Panel3" runat="server" Height="1px" Width="560px" Visible="False"> <asp:Label ID="Label5" runat="server" Text="Label" Visible="False"></asp:Label> <asp:Label ID="Label7" runat="server" Text="Label" Visible="False"></asp:Label> <asp:Label ID="Label8" runat="server" Text="Label" Visible="False"></asp:Label><center> <center> <table> <tr> <td align="left" valign="bottom" style="height: 95px; width: 898px;"> <asp:Label ID="Label6" runat="server" BackColor="#FFC080" Font-Bold="True" Font-Italic="False" Font-Names="Comic Sans MS" Font-Overline="False" Font-Size="Large" Font-Strikeout="False" ForeColor="#C04000" Text="Ajandaya bilgi girmek için tarih seçiniz" BorderColor="#FF8000" BorderWidth="1px"></asp:Label><br /> <br /> <br /> </td> </tr> <tr> <td style="width: 898px"> <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="Black" BorderStyle="Solid" CellSpacing="1" Font-Names="Verdana" Font-Size="9pt" ForeColor="Black" Height="338px" NextPrevFormat="FullMonth" OnDayRender="Calendar1_DayRender" Width="895px" OnSelectionChanged="Calendar1_SelectionChanged1" OnVisibleMonthChanged="Calendar1_VisibleMonthChanged"> <SelectedDayStyle BackColor="Gainsboro" ForeColor="Coral" BorderColor="#FFE0C0" /> <TodayDayStyle BackColor="#999999" ForeColor="White" /> <DayStyle BackColor="Silver" BorderStyle="None" Font-Bold="True" Font-Italic="False" ForeColor="Indigo" /> <OtherMonthDayStyle ForeColor="#999999" /> <NextPrevStyle Font-Bold="True" Font-Size="8pt" ForeColor="White" /> <DayHeaderStyle Font-Bold="True" Font-Size="8pt" ForeColor="DarkViolet" Height="10pt" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" /> <TitleStyle BackColor="#333399" BorderStyle="Solid" Font-Bold="True" Font-Size="12pt" ForeColor="White" Height="12pt" /> </asp:Calendar> </td> </tr> <tr> <td align="right" valign="top" style="width: 898px"> <br /> <asp:TextBox ID="TextBox3" runat="server" BackColor="#FFE0C0" Height="57px" TextMode="MultiLine" Visible="False" Width="885px" BorderStyle="Double" BorderWidth="1px"></asp:TextBox><br /> </td> </tr> <tr> <td align="right" style="width: 898px; height: 41px"> <asp:Button ID="Button3" runat="server" Text="Kaydet" OnClick="Button3_Click" Visible="False" Height="38px" Width="136px" /></td> </tr> </table> </center> <center> </center> </center> </asp:Panel> </div> </form> </body> </html> --- NEW FILE: nsb[1].aspx.cs --- using System; using System.Data; using System.Data.OleDb; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Default3 : System.Web.UI.Page { string[,] bilgiler = new string[13, 32]; string bilgi; int gun, ay; protected void Page_Load(object sender, EventArgs e) { string text; string starih = DateTime.Today.ToShortDateString(); Label4.Text = starih; text = TextBox1.Text; OleDbConnection baglanti; OleDbCommand cmdInsert; OleDbDataReader ss; baglanti = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=KAYITLAR.mdb"); baglanti.Open(); cmdInsert = new OleDbCommand("Select kullaniciadi,tarih,bilgi,gun,ay From veriler", baglanti); ss = cmdInsert.ExecuteReader(); while (ss.Read()) { if (ss.GetString(0) == Label3.Text) { gun = Convert.ToInt32(ss["gun"]); ay = Convert.ToInt32(ss["ay"]); bilgi = Convert.ToString(ss["bilgi"]); for (int i = 1; i <= 13; i++) { for (int j = 1; j <= 32; j++) { if (ay == i && gun == j) { bilgiler[i, j] = bilgi; } } } } } baglanti.Close(); } protected void Calendar1_DayRender(object sender, DayRenderEventArgs e) { CalendarDay gun; TableCell hucre; gun = e.Day; hucre = e.Cell; string bilgi = bilgiler[gun.Date.Month, gun.Date.Day]; if (bilgi != "") { hucre.Controls.Add(new LiteralControl("<font color=#404040><p>" + bilgi)); } } protected void Button2_Click(object sender, EventArgs e) { OleDbConnection baglanti; OleDbCommand cmdInsert,cmd2Insert; OleDbDataReader ss,ss1; baglanti = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=KAYITLAR.mdb"); baglanti.Open(); cmdInsert = new OleDbCommand("Select kullaniciadi,sifre From kullanicibilgisi", baglanti); cmd2Insert = new OleDbCommand("Select kullaniciadi,tarih,bilgi,gun,ay From veriler", baglanti); ss = cmdInsert.ExecuteReader(); while (ss.Read()) { if (ss.GetString(0) == TextBox1.Text && ss.GetString(1) == TextBox2.Text) { Label3.Text = TextBox1.Text; ss1 = cmd2Insert.ExecuteReader(); while (ss1.Read()) { if (ss1.GetString(0)==TextBox1.Text) { gun = Convert.ToInt32(ss1["gun"]); ay = Convert.ToInt32(ss1["ay"]); bilgi = Convert.ToString(ss1["bilgi"]); for (int i = 1; i <= 13; i++) { for (int j = 1; j <= 32; j++) { if (ay == i && gun == j) { bilgiler[i, j] = bilgi; } } } } } Panel3.Visible = true; Panel2.Visible = false; } } baglanti.Close(); } protected void Button3_Click(object sender, EventArgs e) { if (TextBox3.Text != "") { OleDbConnection baglanti; string strInsert; OleDbCommand cmdInsert,cmd2Insert; OleDbDataReader ss1; baglanti = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=KAYITLAR.mdb"); strInsert = "Insert into veriler( kullaniciadi,bilgi,tarih,gun,ay) Values (@adý,@bilgi,@tarih,@gun,@ay)"; cmd2Insert = new OleDbCommand("Select kullaniciadi,tarih,bilgi,gun,ay From veriler", baglanti); cmdInsert = new OleDbCommand(strInsert, baglanti); cmdInsert.Parameters.Add("@adý", Label3.Text); cmdInsert.Parameters.Add("@bilgi", TextBox3.Text); cmdInsert.Parameters.Add("@tarih", Label5.Text); cmdInsert.Parameters.Add("@gun", Label7.Text); cmdInsert.Parameters.Add("@ay", Label8.Text); baglanti.Open(); cmdInsert.ExecuteNonQuery(); ss1 = cmd2Insert.ExecuteReader(); while (ss1.Read()) { if (ss1.GetString(0) == Label3.Text) { gun = Convert.ToInt32(ss1["gun"]); ay = Convert.ToInt32(ss1["ay"]); bilgi = Convert.ToString(ss1["bilgi"]); for (int i = 1; i <= 13; i++) { for (int j = 1; j <= 32; j++) { if (ay == i && gun == j) { bilgiler[i, j] = bilgi; } } } } } Panel3.Visible = true; Panel2.Visible = false; TextBox3.Text = ""; baglanti.Close(); } } protected void Calendar1_SelectionChanged1(object sender, EventArgs e) { Panel3.Visible = true; Panel2.Visible = false; TextBox3.Visible = true; Button3.Visible = true; string selecteddate = Calendar1.SelectedDate.ToShortDateString(); Label5.Text = selecteddate; Label7.Text = Calendar1.SelectedDate.Day.ToString(); Label8.Text = Calendar1.SelectedDate.Month.ToString(); } protected void Calendar1_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { Panel2.Visible = false; Panel3.Visible = true; } } --- NEW FILE: KAYITLAR.MDB --- (This appears to be a binary file; contents omitted.) |