How To Create A Database In Araba



Similar documents
Conexión SQL Server C#

1.Tüm Kayıtları Getirme - Arama Yapma

I A Form és a párbeszédablakok I.1. MessageBox osztály MessageBox.Show(szöveg[,cím[,gombok[,ikon[,defaultbutton]]]]);

1. La classe Connexion class Connexion {

ADOBE READER AND ACROBAT

PROCEDURE INSERTION(NUM IN EMPLOYES.NUMEMP%TYPE, NOM VARCHAR2, PRENOM IN VARCHAR2, PPHOTO IN BLOB, SALAIRE IN NUMBER);

5 Airport. Chapter 5: Airport 49. Right-click on Data Connections, then select Add Connection.

Database Communica/on in Visual Studio/C# using Web Services. Hans- Pe=er Halvorsen, M.Sc.

Aucune validation n a été faite sur l exemple.

如 何 在 C#.2005 中 使 用 ICPDAS I/O Card 的 DLL 檔 案

ASP.NET(C#) ile Kayıt Listeleme, Silme ve Düzenleme İşlemi

A Step by Step Guide for Building an Ozeki VoIP SIP Softphone

Aplicação ASP.NET MVC 4 Usando Banco de Dados

How To Develop A Mobile Application On Sybase Unwired Platform

FANESE Faculdade de Administração e Negócios de Sergipe. Tópicos Avançados em Desenvolvimento WEB. Prof.: Fabio Coriolano.

How To Design An Eprescription System

A PROJECT REPORT ON. SkyDrive. Submitted for the partial fulfillment of the requirement for the Award of the degree of MASTER OF COMPUTER APPLICATION

VB.NET - DATABASE ACCESS

C# Datenbank-Programmierung

Tutorial 1: M/M/n Service System Simulation Tutorial 2: M/M/n Simulation using Excel input file Tutorial 3: A Production/Inventory System Simulation

How To: Create a Crystal Report from ADO.NET Dataset using Visual Basic.NET

Introduction to Visual Studio and C#

Access Data Object (cont.)

Real-World ASP.NET: Building a Content Management System

Systems Programming & Scripting

Tutorial: Windows Mobile Application Development. Sybase Unwired Platform 2.1 ESD #2

Chapter 14 WCF Client WPF Implementation. Screen Layout

See the Developer s Getting Started Guide for an introduction to My Docs Online Secure File Delivery and how to use it programmatically.

Database Communica/on in Visual Studio/C# using ASP.NET Web Forms. Hans- PeBer Halvorsen, M.Sc.

Hi, processing. Code of the vb.net version. Imports System.Data Imports System.Data.SqlClient

{ oledbdataadapter1.updatecommand.commandtext = "update personel set ad='" + textbox2.text + "' where id=" + textbox1.text; oledbconnection1.

Windows Mobile Power Management

טכנולוגיית WPF מספקת למפתחים מודל תכנות מאוחד לחוויית בניית יישומיי. ניהול התצוגה מתבצע בשפת הסימון Extensible Application Markup ) XAML

Web Session Classes: Performance Metrics For N-Tier s Business Logic Issues

AD A O.N. ET E Access Data Object

ASP and ADO (assumes knowledge of ADO)

Alsafeer software for teaching computer literacy

A Tutorial on SQL Server CMPT 354 Fall 2007

Interaction Tracker Interaction Segments

USER GUIDE Appointment Manager

Empirical study of performance of data binding in ASP.NET web applications

To be able to use web parts to create a portal-style web application

Integration guide Rabo OmniKassa

BACKING UP A DATABASE

Capturx for SharePoint 2.0: Notification Workflows

Using ilove SharePoint Web Services Workflow Action

ASP.NET Dynamic Data

SQL injection attacks SQL injection user input SQL injection SQL Command parameters Database account. SQL injection attacks Data Code

A Scalable Application Architecture for Composing News Portals on the Internet

ASP.NET Programming with C# and SQL Server

İNTERNET TABANLI PROGRAMLAMA- 13.ders GRIDVIEW, DETAILSVIEW, ACCESSDATASOURCE NESNELERİ İLE BİLGİ GÖRÜNTÜLEME

Mobile Application Development Using.NET

Secure Routing and Identifying Hacking In P2p System

Implementation of the AutoComplete Feature of the Textbox Based on Ajax and Web Service

Converting Relational Database Into Xml Document

X. Apéndice C. Listado de Códigos.

Chapter 9 Delegates and Events

Architecture design. Use of some Microsoft patterns & practices for Architecture Guidance (

listboxgaatmee.dragdrop += new DragEventHandler(listBox_DragDrop); ListBox from = (ListBox)e.Data.GetData(typeof(ListBox));

MyChartWebPart.cs. // For SortList using System.Collections.Generic; using System.Collections; // For DataTable using System.Data;

Praktikum im Bereich Praktische Informatik Entwicklung eines Ray-Tracing Systems. computer graphics & visualization

Software Engineering 1 EEL5881 Spring Homework - 2

wpf5concat Start Microsoft Visual Studio. File New Project WPF Application, Name= wpf5concat OK.

WINDOWS PRESENTATION FOUNDATION LEKTION 3

WINDOWS FORMS DEVELOPMENT

Creating the Product Catalog Part I (continued)

Web Services API Developer Guide

Getting Started with Telerik Data Access. Contents

Integrating SAS and Microsoft.NET for Data Analysis

Using C# for Graphics and GUIs Handout #2

The Modeling of Communication with Other. Systems in Process Automation Applications

Ambientes de Desenvolvimento Avançados

Einführung in die Windows Store App Entwicklung mit C# und XAML. Modul 2 Datenbindung und Zugriff auf das lokale Dateisystem

No part of this document can be reproduced, transferred, distributed or stored in any format without the prior written permission of Foxit.

Sage HRMS 2015 Sage Employee Self Service Advanced Customization. February 2015

A Static Analysis Framework for Database Applications

Chair of Software Engineering. Java and C# in depth. Carlo A. Furia, Bertrand Meyer. C#: Persistence

Form Tasarımı - 5. Veri Tabanı Veri tabanı ismi; m Tablo ismi; mt

APPLICATION NOTE. Atmel AVR10006: XDK User Guide. Atmel Microcontrollers. Features. Description

Using IRDB in a Dot Net Project

Sending Data from a computer to a microcontroller using a UART (Universal Asynchronous Receiver/Transmitter)

Beginning MYSQL 5.0. With. Visual Studio.NET 2005

Web Services in.net (1)

Mastering Visual Basic.NET Database Programming Evangelos Petroutsos; Asli Bilgin

The Developer Side of the MS Business Intelligence Stack

How to create a SMTP plugin for ArGoSoft Mail Server,.NET edition (AMS.NET edition) using Visual Studio 2005

Tutorial: Windows Mobile Application Development using Custom Development. Sybase Unwired Platform 1.5.2

CHAPTER 10: WEB SERVICES

Research and Implementation of Agricultural Science and Technology Consulting System Based on Ajax and Improved VSM

How To Control Asp.Net Html And Html On A Pc Or Mac Or Mac (For Mac) On A Web Browser On A Mac Or Pc Or Pc (For Pc Or Ipad) On Pc Or Microsoft Mac Or Ipa (

Body Pose Tracking and Instrumented Personal Training using Kinect. Michael Sherman Capstone Project Report for BSEE Rutgers University

Introduction to C# Programming and the.net Framework: (PDF)

Introduction to the BackgroundWorker Component in WPF

2009 Tutorial (DB4O and Visual Studio 2008 Express)

SQL INJECTION ATTACKS

Working with Data in ASP.NET 2.0 :: Creating Stored Procedures and User Defined Functions with Managed Code Introduction

2nd GENERATION CAR SECURITY SYSTEM

Tutorial: Windows Object API Application Development. SAP Mobile Platform 2.3

v1.1.0 SimpleSQL SQLite manager for Unity3D echo17.com

Mapping Specification for DWG/DXF (MSD) C#.NET Code Samples

Transcription:

create database ARABA use ARABA create table arac ( plaka varchar(15), marka varchar(15), model varchar(4)) create table musteri ( tck varchar(11), ad varchar(15), soy varchar(15)) drop table kiralama create table kiralama ( tck varchar(11), plaka varchar(15), baslama_tarihi Datetime, bitis_tarihi Datetime, saat_ucreti real, tutar real ) using System; using System.Collections.Generic; using System.ComponentModel;

using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace arac public partial class Form1 : Form public Form1() InitializeComponent(); public static SqlConnection con = new SqlConnection("Data Source=L112_SERVER\\SQLEXPRESS; Initial Catalog= ARABA; Integrated Security=SSPI;"); con); private void Form1_Load(object sender, EventArgs e) // araç bilgisi SqlDataAdapter arac_da = new SqlDataAdapter("select plaka, (marka+'-'+model)as marka from arac order by model DESC ", DataSet arac_ds = new DataSet(); arac_da.fill(arac_ds); combobox1.datasource = arac_ds.tables[0]; combobox1.displaymember = "marka"; combobox1.valuemember = "plaka"; // Müşteri bilgisi SqlDataAdapter musteri_da = new SqlDataAdapter("select tck, (ad+' '+soy)as adsoy from musteri ", con); DataSet musteri_ds = new DataSet(); musteri_da.fill(musteri_ds); combobox2.datasource = musteri_ds.tables[0]; combobox2.displaymember = "adsoy"; combobox2.valuemember = "tck";

private void button1_click(object sender, EventArgs e) TimeSpan fark = datetimepicker2.value.subtract(datetimepicker1.value ); int saat = fark.hours; textbox2.text = (saat * Convert.ToInt32(textBox1.Text)).ToString(); string komut = "insert into kiralama VALUES(@tck,@plaka,@baslama_tarihi,"+ " @bitis_tairihi,@saat_ucreti,@tutar)"; if (con.state == ConnectionState.Closed) con.open(); SqlCommand cmd = new SqlCommand(); cmd.connection = con; cmd.commandtext = komut; cmd.parameters.addwithvalue("@tck", combobox2.selectedvalue ); cmd.parameters.addwithvalue("@plaka", combobox1.selectedvalue); cmd.parameters.addwithvalue("@baslama_tarihi",datetimepicker1.value); cmd.parameters.addwithvalue("@bitis_tairihi", datetimepicker2.value); cmd.parameters.addwithvalue("@saat_ucreti", textbox1.text); cmd.parameters.addwithvalue("@tutar", textbox2.text); if(cmd.executenonquery() >0) MessageBox.Show("Kayıt Yapıldı"); private void button2_click(object sender, EventArgs e) Form2 f = new Form2(); f.show();

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace arac public partial class Form2 : Form public Form2()

InitializeComponent(); private void Form2_Load(object sender, EventArgs e) // araç bilgisi SqlDataAdapter arac_da = new SqlDataAdapter("select plaka, (marka+'-'+model)as marka from arac order by model DESC ", Form1.con); DataSet arac_ds = new DataSet(); arac_da.fill(arac_ds); combobox1.datasource = arac_ds.tables[0]; combobox1.displaymember = "marka"; combobox1.valuemember = "plaka"; // Müşteri bilgisi SqlDataAdapter musteri_da = new SqlDataAdapter("select tck, (ad+' '+soy)as adsoy from musteri ", Form1.con); DataSet musteri_ds = new DataSet(); musteri_da.fill(musteri_ds); combobox2.datasource = musteri_ds.tables[0]; combobox2.displaymember = "adsoy"; combobox2.valuemember = "tck"; // araca göre listeleme private void button1_click(object sender, EventArgs e) string sorgu= "select M.tck,M.ad,M.soy,K.baslama_tarihi,K.bitis_tarihi,K.saat_ucreti,K.tutar "+ "from kiralama K inner Join arac A ON K.plaka=A.plaka inner join musteri M ON M.tck= K.tck "+ "where A.plaka='0'" ; SqlCommand cmd = new SqlCommand(); cmd.connection = Form1.con; cmd.commandtext = string.format(sorgu, combobox1.selectedvalue); SqlDataAdapter da = new SqlDataAdapter( cmd); DataSet ds = new DataSet(); da.fill(ds); datagridview1.datasource = ds.tables[0]; // müşteriye göre kirlama lkistesi

private void button2_click(object sender, EventArgs e) string sorgu = "select A.plaka,A.marka,A.model,K.baslama_tarihi,K.bitis_tarihi,K.saat_ucreti,K.tutar " + "from kiralama K inner Join arac A ON K.plaka=A.plaka inner join musteri M ON M.tck= K.tck " + "where K.tck='0 ' and baslama_tarihi>='1' and bitis_tarihi<='2' "; string tarih1 = datetimepicker1.value.year+"."+datetimepicker1.value.month+"."+datetimepicker1.value.day; string tarih2 = datetimepicker2.value.year + "." + datetimepicker2.value.month + "." + datetimepicker2.value.day; SqlCommand cmd = new SqlCommand(); cmd.connection = Form1.con; cmd.commandtext = string.format(sorgu, combobox2.selectedvalue,tarih1, tarih2); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.fill(ds); datagridview1.datasource = ds.tables[0];