urgent!!! I am using aspx c#

  • Thread starter Thread starter ANIL AYDINALP
  • Start date Start date
A

ANIL AYDINALP

Guest
(html and aspx)design code

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="customer.aspx.cs" Inherits="customer" %>
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Umur-Cleany</title>
<link rel="stylesheet" href="../assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?fa...,400,400i,600,600i,700,700i,800,800i,900,900i">
<link rel="stylesheet" href="../assets/fonts/fontawesome-all.min.css">
<link rel="stylesheet" href="../assets/fonts/font-awesome.min.css">
<link rel="stylesheet" href="../assets/fonts/fontawesome5-overrides.min.css">
<link rel="stylesheet" href="../assets/css/card.css">
<link rel="stylesheet" href="../assets/css/Form-Select---Full-Date---Month-Day-Year.css">
<link rel="stylesheet" href="../assets/css/style.css">
</head>

<body style="background-color: #ffffff;">
<form id="form1" runat="server">
<div id="wrapper">
<div class="d-flex flex-column" id="content-wrapper" style="background-color: rgb(255,255,255);">
<div>
<div class="row" style="background-color: #28375e;height: 55px;">
<div class="col d-flex align-items-center justify-content-end"><button class="btn btn-primary border-0" type="button" style="background-color: rgba(162,175,213,0);"><i class="fas fa-power-off"></i></button></div>
</div>
</div>
<div id="content" style="/*width: 998px;*/">
<div class="container-fluid">
<div class="mt-5"><a href="../Menu/index.html" style="font-size: 20px;color: rgb(0,0,0);"><i class="fa fa-arrow-left"></i>&nbsp; Geri</a>
<h4 class="text-center mb-5" style="font-size: 40px;color: rgb(1,1,1);">Müşteri Yönetimi</h4>
</div>
<div class="d-flex justify-content-between mb-5">
<div><span class="mr-3" style="color: rgb(0,0,0);">Ara</span><input type="text" placeholder="Kelime girin..."></div>
<div><button class="btn btn-light border shadow mr-3" type="button" data-toggle="modal" data-target="" style="color: rgb(40,55,94);border-width: 5px;border-width: 5px;border-color: rgb(40,55,94);">&nbsp;Liste Yükle</button><button class="btn btn-light border shadow mr-3" type="button" data-toggle="modal" data-target="" style="color: rgb(40,55,94);border-width: 5px;border-width: 5px;border-color: rgb(40,55,94);">&nbsp;Liste İndir</button><button class="btn btn-success border-0 shadow"
type="button" style="font-size: 16px;background-color: #28375e;" data-toggle="modal" data-target="#newCustomer">Müşteri Oluştur</button></div>
</div>
<div class="row mt-4" id="datatable">
<div class="col">
<div style="font-size: 14px;">
<ul class="nav nav-tabs" style="font-size: 14px;">
<li class="nav-item" style="font-size: 14px;"><a class="nav-link active" role="tab" data-toggle="tab" href="#tab-1" style="color: #707070;">Potansiyel Müşteriler</a></li>
<li class="nav-item"><a class="nav-link" role="tab" data-toggle="tab" href="#tab-2" style="color: #707070;">Mevcut Müşteriler</a></li>
<li class="nav-item"><a class="nav-link" role="tab" data-toggle="tab" href="#tab-3" style="color: #707070;">Eski Müşteriler</a></li>
</ul>

<div class="tab-content">
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Musteri_id" ForeColor="#333333" GridLines="None" Width="2497px">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:BoundField DataField="Musteri_id" HeaderText="Musteri_id" ReadOnly="True" SortExpression="Musteri_id" />
<asp:BoundField DataField="Adi" HeaderText="Adi" SortExpression="Adi" />
<asp:BoundField DataField="Unvani" HeaderText="Unvani" SortExpression="Unvani" />
<asp:BoundField DataField="Yetkili" HeaderText="Yetkili" SortExpression="Yetkili" />
<asp:BoundField DataField="Durum" HeaderText="Durum" SortExpression="Durum" />
<asp:BoundField DataField="Sektor" HeaderText="Sektor" SortExpression="Sektor" />
<asp:BoundField DataField="Sehir" HeaderText="Sehir" SortExpression="Sehir" />
<asp:BoundField DataField="Ilce" HeaderText="Ilce" SortExpression="Ilce" />
<asp:BoundField DataField="Adres" HeaderText="Adres" SortExpression="Adres" />
<asp:BoundField DataField="Cep" HeaderText="Cep" SortExpression="Cep" />
<asp:BoundField DataField="Telefon" HeaderText="Telefon" SortExpression="Telefon" />
<asp:BoundField DataField="Fax" HeaderText="Fax" SortExpression="Fax" />
<asp:BoundField DataField="Mail" HeaderText="Mail" SortExpression="Mail" />
<asp:BoundField DataField="Bina" HeaderText="Bina" SortExpression="Bina" />
<asp:BoundField DataField="Vergi" HeaderText="Vergi" SortExpression="Vergi" />
<asp:BoundField DataField="BaslangicTarihi" HeaderText="BaslangicTarihi" SortExpression="BaslangicTarihi" />
<asp:BoundField DataField="BitisTarihi" HeaderText="BitisTarihi" SortExpression="BitisTarihi" />
</Columns>
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
</div>


</div>

<div class="modal fade" role="dialog" tabindex="-1" id="newCustomer">
<div class="modal-dialog" role="document">
<div class="modal-content" id="personnelModalContent">
<div class="modal-header text-center">
<h5 class="modal-title text-center" style="color: #000000;">Müşteri Oluştur</h5><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div>
<div class="modal-body">
<div class="form-row mb-2">
<div class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Müşteri Adı *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-user-tie"></i></span></div><input class="border-dark form-control" type="text"
placeholder="Müşteri adı giriniz..." name="musteradi" id="musteradi" style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Şirket Ünvanı *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-building"></i></span></div><input class="border-dark form-control" type="text"
placeholder="Şirket ünvanı giriniz..." name="ŞirketÜvanı" style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Durum *</h6><select name="Durum" class="form-control"><optgroup label="Durum"><option value="12" selected="">Potansiyel</option><option value="13">Mevcut</option><option value="14">Eski</option></optgroup></select></div>
<div
class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Sektör *</h6><select name="Sektör" class="form-control"><optgroup label="Sektör Adı"><option value="15" selected="">Konut</option><option value="16">Ticari</option><option value="17">Karma</option></optgroup></select></div>
<div
class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Şehir *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-map-marker-alt"></i></span></div><input class="border-dark form-control" type="text"
placeholder="Şehir adı giriniz..." name="ŞehirAdı" style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">İlçe *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-map-marker-alt"></i></span></div><input class="border-dark form-control" type="text"
placeholder="İlçe adı giriniz..." style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Adres *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-address-book"></i></span></div><input class="border-dark form-control" type="text" placeholder="Adres giriniz..." name="Adres"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);" maxlength="400"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Bina Sayısı</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-building"></i></span></div><input class="border-dark form-control" type="text" placeholder="Bina sayısı giriniz..." name="BinaSayısı"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Vergi no *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-bookmark"></i></span></div><input class="border-dark form-control" type="text" placeholder="Vergi no giriniz..." name="VergiNo"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Tel no *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="far fa-address-book"></i></span></div><input class="form-control" type="tel" placeholder="Telefon numarası giriniz..." name="TelefonNo"
style="border-color: rgb(0,0,0);"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Fax no *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="far fa-address-book"></i></span></div><input class="form-control" type="tel" placeholder="Fax numarası giriniz..." name="FaxNo"
style="border-color: rgb(0,0,0);"></div>
</div>
<div class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">E-posta Adresi *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-address-book"></i></span></div><input class="border-dark form-control" type="text" placeholder="E-posta adresi giriniz..." nane="Mail"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);" maxlength="400"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">İş Başlangıç Tarihi</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-address-book"></i></span></div><input class="form-control" type="date" style="border-color: rgb(0,0,0);"n name="BaşlangıçTarihi"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">İş Bitiş Tarihi</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-address-book"></i></span></div><input class="form-control" type="date" style="border-color: rgb(0,0,0);" name="BitişTarihi"></div>
</div>
</div>
</div>
<div class="modal-footer"><button class="btn btn-light" type="button" data-dismiss="modal">İptal</button><button class="btn btn-success border-0" type="button" runat="server" onserverclick="Kaydett">Kaydet</button></div>
</div>
</div>
</div>
<div class="modal fade" role="dialog" tabindex="-1" id="editCustomer">
<div class="modal-dialog" role="document">
<div class="modal-content" id="personnelModalContent">
<div class="modal-header text-center">
<h5 class="modal-title text-center" style="color: #000000;">Müşteri Oluştur</h5><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div>
<div class="modal-body">
<div class="form-row mb-2">
<div class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Müşteri Adı *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-user-tie"></i></span></div><input class="border-dark form-control" name="MüşteriAdı" type="text" placeholder="Müşteri adı giriniz..."
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Şirket Ünvanı *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-building"></i></span></div><input class="border-dark form-control" type="text" placeholder="Şirket ünvanı giriniz..."name="ŞirketAdı"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Durum *</h6><select name="Durum" class="form-control"><optgroup label="Durum"><option value="12" selected="">Potansiyel</option><option value="13">Mevcut</option><option value="14">Eski</option></optgroup></select></div>
<div
class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Sektör *</h6><select name=Sektör"" class="form-control"><optgroup label="Sektör Adı"><option value="15" selected="">Konut</option><option value="16">Ticari</option><option value="17">Karma</option></optgroup></select></div>
<div
class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Şehir *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-map-marker-alt"></i></span></div><input class="border-dark form-control" type="text" placeholder="Şehir adı giriniz..."name="ŞehirAdı"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">İlçe *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-map-marker-alt"></i></span></div><input class="border-dark form-control" type="text" placeholder="İlçe adı giriniz..."name="İlçeAdı"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Adres *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-address-book"></i></span></div><input class="border-dark form-control" type="text" placeholder="Adres giriniz..."name="Adres"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);" maxlength="400"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Bina Sayısı</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-building"></i></span></div><input class="border-dark form-control" type="text" placeholder="Bina sayısı giriniz..." name="BinaSayısı"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Vergi no *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-bookmark"></i></span></div><input class="border-dark form-control" type="text" placeholder="Vergi no giriniz..." name="VergiNo"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Tel no *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="far fa-address-book"></i></span></div><input class="form-control" type="tel" placeholder="Telefon numarası giriniz..." name="TelefonNo"
style="border-color: rgb(0,0,0);"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">Fax no *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="far fa-address-book"></i></span></div><input class="form-control" type="tel" placeholder="Fax numarası giriniz..." name="FaxNo"
style="border-color: rgb(0,0,0);"></div>
</div>
<div class="col-12 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">E-posta Adresi *</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-address-book"></i></span></div><input class="border-dark form-control" type="text" placeholder="E-posta adresi giriniz..." name="E_Posta"
style="color: #707070;font-size: 14px;background-color: rgb(255,255,255);" maxlength="400"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">İş Başlangıç Tarihi</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-address-book"></i></span></div><input class="form-control" type="date" style="border-color: rgb(0,0,0);" name="BaşlangıTarihi"></div>
</div>
<div class="col-6 mb-3">
<h6 style="height: 14px;font-size: 14px;color: rgb(0,0,0);">İş Bitiş Tarihi</h6>
<div class="input-group mb-3">
<div class="input-group-prepend"><span class="border-dark input-group-text" style="background-color: rgb(255,255,255);color: rgb(0,0,0);"><i class="fas fa-address-book"></i></span></div><input class="form-control" type="date" style="border-color: rgb(0,0,0);" name="BitişTarihi"></div>
</div>
</div>
</div>
<div class="modal-footer"><button class="btn btn-light" type="button" data-dismiss="modal">İptal</button><asp:Button ID="Button3" runat="server" Text="Button" /></div>
</div>
</div>
</div>
</div>
</div>
</div>

</div>
<script src="../assets/js/jquery.min.js"></script>
<script src="../assets/bootstrap/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.js"></script>
<script src="../assets/js/select.js"></script>
</form>
</body>

</html>
</div>



</form >






using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class customer : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{


}
db973135Entities dc = new db973135Entities();
string myStringVariable;
Umur_Musteri müşteri = new Umur_Musteri();
protected void Kaydett(object sender, EventArgs e)
{

String Adi = Request.Form["MüşteriAdı"];
String Unvani = Request.Form["ŞirketÜvanı"];
String Durum = Request.Form["Durum"];
String Sektor = Request.Form["email"];
String Sehir = Request.Form["ŞehirAdı"];
String Ilce = Request.Form["İlçeAdı"];
String Adres = Request.Form["Adres"];
String Telefon = Request.Form["TelefonNo"];
String Fax = Request.Form["TelefonNo"];
String Mail = Request.Form["Mail"];
String Bina = Request.Form["BinaSayısı"];
String Vergi = Request.Form["VergiNo"];
String BaslangicTarihi = Request.Form["BaşlangıçTarihi"];
String BitisTarihi = Request.Form["BitişTarihi"];




müşteri.Adi = Adi;
müşteri.Unvani = Unvani;
müşteri.Durum = Durum;
müşteri.Sektor = Sektor;
müşteri.Sehir = Sehir;
müşteri.Ilce = Ilce;
müşteri.Adres = Adres;
müşteri.Telefon = Telefon;
müşteri.Fax = Fax;
müşteri.Mail = Mail;

müşteri.Bina = Bina;
müşteri.Vergi = Vergi;
if (BaslangicTarihi != string.Empty)
{ müşteri.BaslangicTarihi = Convert.ToDateTime(BaslangicTarihi);
}
if (BitisTarihi != string.Empty)
{ müşteri.BitisTarihi = Convert.ToDateTime(BitisTarihi);}
dc.Umur_Musteri.Add(müşteri);
dc.SaveChanges();
myStringVariable = "Kayıt Başarılı";

ClientScript.RegisterStartupScript(this.GetType(), "", "alert('" + myStringVariable + "');", true);
}


}1610059.png


1610063.png

if you are looking at picture it is that I am getting error please help me and How can I solve problem

Continue reading...
 
Back
Top