Skip to content

Commit 0614f4f

Browse files
author
Ömer Selim
committed
commit1
1 parent b23302a commit 0614f4f

File tree

162 files changed

+78506
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+78506
-6
lines changed

Yonetim.BLL/Repository/Repository.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
namespace Yonetim.BLL.Repository
99
{
1010
public class HaberRepo : RepositoryBase<Haber, int> { }
11-
public class Kategori : RepositoryBase<Kategori, int> { }
11+
public class KategoriRepo : RepositoryBase<Kategori, int> { }
1212
}

Yonetim.DAL/Migrations/201708111027407_a2.Designer.cs

+29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace Yonetim.DAL.Migrations
2+
{
3+
using System;
4+
using System.Data.Entity.Migrations;
5+
6+
public partial class a2 : DbMigration
7+
{
8+
public override void Up()
9+
{
10+
CreateIndex("dbo.Kategoriler", "Ad", unique: true);
11+
}
12+
13+
public override void Down()
14+
{
15+
DropIndex("dbo.Kategoriler", new[] { "Ad" });
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 2.0
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">2.0</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
<value>[base64 mime encoded serialized .NET Framework object]</value>
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27+
<comment>This is a comment</comment>
28+
</data>
29+
30+
There are any number of "resheader" rows that contain simple
31+
name/value pairs.
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
37+
mimetype set.
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
41+
extensible. For a given mimetype the value must be set accordingly:
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
45+
read any of the formats listed below.
46+
47+
mimetype: application/x-microsoft.net.object.binary.base64
48+
value : The object must be serialized with
49+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50+
: and then encoded with base64 encoding.
51+
52+
mimetype: application/x-microsoft.net.object.soap.base64
53+
value : The object must be serialized with
54+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55+
: and then encoded with base64 encoding.
56+
57+
mimetype: application/x-microsoft.net.object.bytearray.base64
58+
value : The object must be serialized into a byte array
59+
: using a System.ComponentModel.TypeConverter
60+
: and then encoded with base64 encoding.
61+
-->
62+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64+
<xsd:element name="root" msdata:IsDataSet="true">
65+
<xsd:complexType>
66+
<xsd:choice maxOccurs="unbounded">
67+
<xsd:element name="metadata">
68+
<xsd:complexType>
69+
<xsd:sequence>
70+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
71+
</xsd:sequence>
72+
<xsd:attribute name="name" use="required" type="xsd:string" />
73+
<xsd:attribute name="type" type="xsd:string" />
74+
<xsd:attribute name="mimetype" type="xsd:string" />
75+
<xsd:attribute ref="xml:space" />
76+
</xsd:complexType>
77+
</xsd:element>
78+
<xsd:element name="assembly">
79+
<xsd:complexType>
80+
<xsd:attribute name="alias" type="xsd:string" />
81+
<xsd:attribute name="name" type="xsd:string" />
82+
</xsd:complexType>
83+
</xsd:element>
84+
<xsd:element name="data">
85+
<xsd:complexType>
86+
<xsd:sequence>
87+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89+
</xsd:sequence>
90+
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93+
<xsd:attribute ref="xml:space" />
94+
</xsd:complexType>
95+
</xsd:element>
96+
<xsd:element name="resheader">
97+
<xsd:complexType>
98+
<xsd:sequence>
99+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100+
</xsd:sequence>
101+
<xsd:attribute name="name" type="xsd:string" use="required" />
102+
</xsd:complexType>
103+
</xsd:element>
104+
</xsd:choice>
105+
</xsd:complexType>
106+
</xsd:element>
107+
</xsd:schema>
108+
<resheader name="resmimetype">
109+
<value>text/microsoft-resx</value>
110+
</resheader>
111+
<resheader name="version">
112+
<value>2.0</value>
113+
</resheader>
114+
<resheader name="reader">
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116+
</resheader>
117+
<resheader name="writer">
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119+
</resheader>
120+
<data name="Target" xml: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XfJ3MWVeLvdZTb/WAKHyX/oiUb6U6mWyXOdIFwHvCJSaL0/bN+CHDMHEJZ+RB9hFtlsBH2BJ3HU2N2kG2e6IqtmHJ5QsI+KLFKOgx48Yw56/evMvlkykAAEmAAA=</value>
122+
</data>
123+
<data name="DefaultSchema" xml:space="preserve">
124+
<value>dbo</value>
125+
</data>
126+
</root>

Yonetim.DAL/Yonetim.DAL.csproj

+7
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
<Compile Include="Migrations\201708100949562_a1.Designer.cs">
5454
<DependentUpon>201708100949562_a1.cs</DependentUpon>
5555
</Compile>
56+
<Compile Include="Migrations\201708111027407_a2.cs" />
57+
<Compile Include="Migrations\201708111027407_a2.Designer.cs">
58+
<DependentUpon>201708111027407_a2.cs</DependentUpon>
59+
</Compile>
5660
<Compile Include="Migrations\Configuration.cs" />
5761
<Compile Include="MyContext.cs" />
5862
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -71,6 +75,9 @@
7175
<EmbeddedResource Include="Migrations\201708100949562_a1.resx">
7276
<DependentUpon>201708100949562_a1.cs</DependentUpon>
7377
</EmbeddedResource>
78+
<EmbeddedResource Include="Migrations\201708111027407_a2.resx">
79+
<DependentUpon>201708111027407_a2.cs</DependentUpon>
80+
</EmbeddedResource>
7481
</ItemGroup>
7582
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
7683
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

Yonetim.Model/Entities/Kategori.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public class Kategori
1515
public int Id { get; set; }
1616

1717
[Required]
18-
[StringLength(50)]
18+
[StringLength(50,ErrorMessage ="Kategori Ado en fazla 50 karakter olabilir")]
19+
[Index(IsUnique = true)]
1920
public string Ad { get; set; }
2021
public string Aciklama { get; set; }
2122
public virtual List<Haber> Haberler { get; set; } = new List<Haber>();
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel.DataAnnotations;
4+
using System.ComponentModel.DataAnnotations.Schema;
5+
using System.Linq;
6+
using System.Text;
7+
using System.Threading.Tasks;
8+
9+
namespace Yonetim.Model.ViewModels
10+
{
11+
public class HaberViewModel
12+
{
13+
public int Id { get; set; }
14+
15+
[Required]
16+
[StringLength(255,MinimumLength =5,ErrorMessage ="Haber Başlığı 5-255 karakter arasında olmalıdır")]
17+
public string Baslik { get; set; }
18+
[Required]
19+
public string Icerik { get; set; }
20+
21+
public DateTime EklenmeZamani { get; set; } = DateTime.Now;
22+
public int Hit { get; set; } = 0;
23+
public bool YayindaMi { get; set; } = false;
24+
public string Keywords { get; set; }
25+
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel.DataAnnotations;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace Yonetim.Model.ViewModels
9+
{
10+
public class KategoriViewModel
11+
{
12+
public int Id { get; set; }
13+
14+
[Required]
15+
[StringLength(50, ErrorMessage = "Kategori Ado en fazla 50 karakter olabilir")]
16+
public string Ad { get; set; }
17+
[Display(Name = "Açıklama")]
18+
public string Aciklama { get; set; }
19+
}
20+
}

Yonetim.Model/Yonetim.Model.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@
5252
<Compile Include="Entities\Haber.cs" />
5353
<Compile Include="Entities\Kategori.cs" />
5454
<Compile Include="Properties\AssemblyInfo.cs" />
55+
<Compile Include="ViewModels\HaberViewModel.cs" />
56+
<Compile Include="ViewModels\KategoriViewModel.cs" />
5557
</ItemGroup>
5658
<ItemGroup>
5759
<None Include="App.config" />
5860
<None Include="packages.config" />
5961
</ItemGroup>
60-
<ItemGroup>
61-
<Folder Include="ViewModels\" />
62-
</ItemGroup>
62+
<ItemGroup />
6363
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6464
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
6565
Other similar extension points exist, see Microsoft.Common.targets.

Yonetim.UI.Web/Content/Site.css

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.tek{
2+
background-color:tomato;
3+
color:azure;
4+
}
5+
.cift{
6+
background-color:cornsilk;
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
using Yonetim.Model.ViewModels;
7+
8+
namespace Yonetim.UI.Web.Controllers
9+
{
10+
public class HaberController : Controller
11+
{
12+
// GET: Haber
13+
public ActionResult Index()
14+
{
15+
return View();
16+
}
17+
public ActionResult Ekle()
18+
{
19+
return View();
20+
}
21+
[HttpPost]
22+
public ActionResult Ekle(HaberViewModel model)
23+
{
24+
return View();
25+
}
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
7+
namespace Yonetim.UI.Web.Controllers
8+
{
9+
public class HomeController : Controller
10+
{
11+
// GET: Home
12+
public ActionResult Index()
13+
{
14+
return View();
15+
}
16+
#region PartialResults
17+
public PartialViewResult NavHeaderPartial()
18+
{
19+
return PartialView("_NavHeader-Partial");
20+
}
21+
public PartialViewResult NavRightPartial()
22+
{
23+
return PartialView("_NavbarRightPartial");
24+
}
25+
public PartialViewResult SideBarPartial()
26+
{
27+
return PartialView("_SideBarPartial");
28+
}
29+
30+
#endregion
31+
}
32+
}

0 commit comments

Comments
 (0)