-
Notifications
You must be signed in to change notification settings - Fork 0
/
DepoEkle.aspx.cs
52 lines (41 loc) · 1.24 KB
/
DepoEkle.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace stoktakip2
{
public partial class DepoEkle : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["ad"] == null)
{
Response.Redirect("Giris.aspx");
}
}
protected void btnKaydet1(object sender, EventArgs e)
{
using (stokEntities db = new stokEntities())
{
depo d = new depo();
d.depo_name=txtad.Text.Trim();
db.depo.Add(d);
//var abc = db1.product.ToList();
db.SaveChanges();
Response.Write("Kayıt başarılı");
temizle();
Response.Redirect("~/DepoYonetim.aspx");
}
}
public void temizle()
{
txtad.Text = string.Empty;
}
//protected void btndepovazgec_Click(object sender, EventArgs e)
//{
// Response.Redirect("~/DepoYonetim.aspx");
//}
}
}