├── Library MVP
├── .vs
│ └── Library MVP
│ │ └── v15
│ │ ├── .suo
│ │ └── sqlite3
│ │ └── storage.ide
├── Library MVP.sln
└── Library MVP
│ ├── App.config
│ ├── Library MVP.csproj
│ ├── Logic
│ ├── Presenter
│ │ ├── AuthoresPresenter.cs
│ │ ├── BookDataPresenter.cs
│ │ ├── BookPlacePresenter.cs
│ │ ├── BooksSearchPersenter.cs
│ │ ├── BorrowPersenter.cs
│ │ ├── BorrowersPersenter.cs
│ │ ├── CategoryPresenter.cs
│ │ ├── CountryPresenter.cs
│ │ └── DarNashrPersenter.cs
│ └── Services
│ │ ├── AuthoresServices.cs
│ │ ├── BookPlaceServeice.cs
│ │ ├── BooksDataService.cs
│ │ ├── BooksSearchServices.cs
│ │ ├── BorrowServices.cs
│ │ ├── BorrowersServices.cs
│ │ ├── CategoryService.cs
│ │ ├── CountryService.cs
│ │ ├── DBHelper.cs
│ │ └── DarNashrService.cs
│ ├── Models
│ ├── AuthorsModel.cs
│ ├── BookDataModel.cs
│ ├── BookPlacesModel.cs
│ ├── BooksSearch.cs
│ ├── BorrowModel.cs
│ ├── BorrowersModel.cs
│ ├── CategoryModel.cs
│ ├── CountryModel.cs
│ └── DarNasherModel.cs
│ ├── Program.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ ├── Settings.settings
│ └── licenses.licx
│ ├── Views
│ ├── Forms
│ │ ├── Frm_Authors.Designer.cs
│ │ ├── Frm_Authors.cs
│ │ ├── Frm_Authors.resx
│ │ ├── Frm_BookPlace.Designer.cs
│ │ ├── Frm_BookPlace.cs
│ │ ├── Frm_BookPlace.resx
│ │ ├── Frm_BooksData.Designer.cs
│ │ ├── Frm_BooksData.cs
│ │ ├── Frm_BooksData.resx
│ │ ├── Frm_BooksSearch.Designer.cs
│ │ ├── Frm_BooksSearch.cs
│ │ ├── Frm_BooksSearch.resx
│ │ ├── Frm_Borrow.Designer.cs
│ │ ├── Frm_Borrow.cs
│ │ ├── Frm_Borrow.resx
│ │ ├── Frm_Borrowers.Designer.cs
│ │ ├── Frm_Borrowers.cs
│ │ ├── Frm_Borrowers.resx
│ │ ├── Frm_Category.Designer.cs
│ │ ├── Frm_Category.cs
│ │ ├── Frm_Category.resx
│ │ ├── Frm_Country.Designer.cs
│ │ ├── Frm_Country.cs
│ │ ├── Frm_Country.resx
│ │ ├── Frm_DarNashr.Designer.cs
│ │ ├── Frm_DarNashr.cs
│ │ ├── Frm_DarNashr.resx
│ │ ├── RibbonForm1.Designer.cs
│ │ ├── RibbonForm1.cs
│ │ └── RibbonForm1.resx
│ └── Interface
│ │ ├── IAuthors.cs
│ │ ├── IBookPlace.cs
│ │ ├── IBooksData.cs
│ │ ├── IBooksSearch.cs
│ │ ├── IBorrow.cs
│ │ ├── IBorrowers.cs
│ │ ├── ICategory.cs
│ │ ├── ICountry.cs
│ │ └── IDarNashr.cs
│ ├── bin
│ └── Debug
│ │ ├── DevExpress.Data.v18.1.dll
│ │ ├── DevExpress.Data.v18.1.xml
│ │ ├── DevExpress.Pdf.v18.1.Core.dll
│ │ ├── DevExpress.Pdf.v18.1.Core.xml
│ │ ├── DevExpress.Printing.v18.1.Core.dll
│ │ ├── DevExpress.Printing.v18.1.Core.xml
│ │ ├── DevExpress.Sparkline.v18.1.Core.dll
│ │ ├── DevExpress.Sparkline.v18.1.Core.xml
│ │ ├── DevExpress.Utils.v18.1.dll
│ │ ├── DevExpress.Utils.v18.1.xml
│ │ ├── DevExpress.XtraBars.v18.1.dll
│ │ ├── DevExpress.XtraBars.v18.1.xml
│ │ ├── DevExpress.XtraEditors.v18.1.dll
│ │ ├── DevExpress.XtraEditors.v18.1.xml
│ │ ├── Library MVP.exe
│ │ ├── Library MVP.exe.config
│ │ ├── Library MVP.pdb
│ │ ├── de
│ │ ├── DevExpress.Data.v18.1.resources.dll
│ │ ├── DevExpress.Pdf.v18.1.Core.resources.dll
│ │ ├── DevExpress.Printing.v18.1.Core.resources.dll
│ │ ├── DevExpress.Sparkline.v18.1.Core.resources.dll
│ │ ├── DevExpress.Utils.v18.1.resources.dll
│ │ ├── DevExpress.XtraBars.v18.1.resources.dll
│ │ └── DevExpress.XtraEditors.v18.1.resources.dll
│ │ ├── es
│ │ ├── DevExpress.Data.v18.1.resources.dll
│ │ ├── DevExpress.Pdf.v18.1.Core.resources.dll
│ │ ├── DevExpress.Printing.v18.1.Core.resources.dll
│ │ ├── DevExpress.Sparkline.v18.1.Core.resources.dll
│ │ ├── DevExpress.Utils.v18.1.resources.dll
│ │ ├── DevExpress.XtraBars.v18.1.resources.dll
│ │ └── DevExpress.XtraEditors.v18.1.resources.dll
│ │ ├── ja
│ │ ├── DevExpress.Data.v18.1.resources.dll
│ │ ├── DevExpress.Pdf.v18.1.Core.resources.dll
│ │ ├── DevExpress.Printing.v18.1.Core.resources.dll
│ │ ├── DevExpress.Sparkline.v18.1.Core.resources.dll
│ │ ├── DevExpress.Utils.v18.1.resources.dll
│ │ ├── DevExpress.XtraBars.v18.1.resources.dll
│ │ └── DevExpress.XtraEditors.v18.1.resources.dll
│ │ └── ru
│ │ ├── DevExpress.Data.v18.1.resources.dll
│ │ ├── DevExpress.Pdf.v18.1.Core.resources.dll
│ │ ├── DevExpress.Printing.v18.1.Core.resources.dll
│ │ ├── DevExpress.Sparkline.v18.1.Core.resources.dll
│ │ ├── DevExpress.Utils.v18.1.resources.dll
│ │ ├── DevExpress.XtraBars.v18.1.resources.dll
│ │ └── DevExpress.XtraEditors.v18.1.resources.dll
│ └── obj
│ └── Debug
│ ├── DesignTimeResolveAssemblyReferences.cache
│ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ ├── Library MVP.csproj.CopyComplete
│ ├── Library MVP.csproj.CoreCompileInputs.cache
│ ├── Library MVP.csproj.FileListAbsolute.txt
│ ├── Library MVP.csproj.GenerateResource.Cache
│ ├── Library MVP.csprojResolveAssemblyReference.cache
│ ├── Library MVP.exe
│ ├── Library MVP.pdb
│ ├── Library_MVP.Properties.Resources.resources
│ ├── Library_MVP.Views.Forms.Frm_Authors.resources
│ ├── Library_MVP.Views.Forms.Frm_BookPlace.resources
│ ├── Library_MVP.Views.Forms.Frm_BooksData.resources
│ ├── Library_MVP.Views.Forms.Frm_BooksSearch.resources
│ ├── Library_MVP.Views.Forms.Frm_Borrow.resources
│ ├── Library_MVP.Views.Forms.Frm_Borrowers.resources
│ ├── Library_MVP.Views.Forms.Frm_Category.resources
│ ├── Library_MVP.Views.Forms.Frm_Country.resources
│ ├── Library_MVP.Views.Forms.Frm_DarNashr.resources
│ ├── Library_MVP.Views.Forms.RibbonForm1.resources
│ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ └── library mvp.exe.licenses
└── sqlscript.sql
/Library MVP/.vs/Library MVP/v15/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/.vs/Library MVP/v15/.suo
--------------------------------------------------------------------------------
/Library MVP/.vs/Library MVP/v15/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/.vs/Library MVP/v15/sqlite3/storage.ide
--------------------------------------------------------------------------------
/Library MVP/Library MVP.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26730.16
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library MVP", "Library MVP\Library MVP.csproj", "{F1E797A6-FC59-45A4-B926-9B47C51FF0EC}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {F1E797A6-FC59-45A4-B926-9B47C51FF0EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {F1E797A6-FC59-45A4-B926-9B47C51FF0EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {F1E797A6-FC59-45A4-B926-9B47C51FF0EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {F1E797A6-FC59-45A4-B926-9B47C51FF0EC}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {DE234466-2514-48CF-9DF9-B835D3FD14D5}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | .\SQLExpress
15 |
16 |
17 | Library
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Library MVP.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {F1E797A6-FC59-45A4-B926-9B47C51FF0EC}
8 | WinExe
9 | Library_MVP
10 | Library MVP
11 | v4.6.1
12 | 512
13 | true
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | Form
85 |
86 |
87 | Frm_Authors.cs
88 |
89 |
90 | Form
91 |
92 |
93 | Frm_BookPlace.cs
94 |
95 |
96 | Form
97 |
98 |
99 | Frm_BooksData.cs
100 |
101 |
102 | Form
103 |
104 |
105 | Frm_BooksSearch.cs
106 |
107 |
108 | Form
109 |
110 |
111 | Frm_Borrow.cs
112 |
113 |
114 | Form
115 |
116 |
117 | Frm_Borrowers.cs
118 |
119 |
120 | Form
121 |
122 |
123 | Frm_Category.cs
124 |
125 |
126 | Form
127 |
128 |
129 | Frm_Country.cs
130 |
131 |
132 | Form
133 |
134 |
135 | Frm_DarNashr.cs
136 |
137 |
138 | Form
139 |
140 |
141 | RibbonForm1.cs
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 | ResXFileCodeGenerator
155 | Resources.Designer.cs
156 | Designer
157 |
158 |
159 | True
160 | Resources.resx
161 |
162 |
163 | Frm_Authors.cs
164 |
165 |
166 | Frm_BookPlace.cs
167 |
168 |
169 | Frm_BooksData.cs
170 |
171 |
172 | Frm_BooksSearch.cs
173 |
174 |
175 | Frm_Borrow.cs
176 |
177 |
178 | Frm_Borrowers.cs
179 |
180 |
181 | Frm_Category.cs
182 |
183 |
184 | Frm_Country.cs
185 |
186 |
187 | Frm_DarNashr.cs
188 |
189 |
190 | RibbonForm1.cs
191 |
192 |
193 | SettingsSingleFileGenerator
194 | Settings.Designer.cs
195 |
196 |
197 | True
198 | Settings.settings
199 | True
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Presenter/AuthoresPresenter.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Services;
2 | using Library_MVP.Models;
3 | using Library_MVP.Views.Interface;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Data;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 |
11 | namespace Library_MVP.Logic.Presenter
12 | {
13 | class AuthoresPresenter
14 | {
15 | IAuthors iAuthors;
16 | AuthorsModel authorsModels = new AuthorsModel();
17 |
18 | public AuthoresPresenter(IAuthors view)
19 | {
20 | this.iAuthors = view;
21 | }
22 |
23 | //connect bewteen model cat and interface cat
24 | private void connectBetweenModelInterface()
25 | {
26 | authorsModels.ID = iAuthors.ID;
27 | authorsModels.AuthorName = iAuthors.AuthorName;
28 | authorsModels.CountryID = iAuthors.CountryID;
29 | authorsModels.AuthorDate = iAuthors.AuthorDate;
30 | }
31 |
32 | //this methoud to connect to services class to insert data in authors table
33 | public bool AuthorsInsert()
34 | {
35 | connectBetweenModelInterface();
36 | DateTime d1 = Convert.ToDateTime(authorsModels.AuthorDate);
37 | string d2 = d1.ToString("dd/MM/yyyy");
38 |
39 | return AuthoresServices.authoresInsert(authorsModels.ID, authorsModels.AuthorName, d2 , authorsModels.CountryID);
40 | }
41 | //this methoud to connect to services class to update data in authors table
42 | public bool AuthorsUpdate()
43 | {
44 | connectBetweenModelInterface();
45 | DateTime d1 = Convert.ToDateTime(authorsModels.AuthorDate);
46 | string d2 = d1.ToString("dd/MM/yyyy");
47 |
48 | return AuthoresServices.authoresUpdate(authorsModels.ID, authorsModels.AuthorName, d2, authorsModels.CountryID);
49 | }
50 |
51 |
52 | public void FillCbx ()
53 | {
54 | iAuthors.cbxCountry = AuthoresServices.getAllData();
55 | iAuthors.AuthorDisplayMember = "اسم الدولة";
56 | iAuthors.AuthorValueMember = "رقم الدولة";
57 | }
58 |
59 | public void AutoNumber ()
60 | {
61 | string val = Convert.ToString(AuthoresServices.getAuthorMaxID().Rows[0][0]);
62 | if (val == null || val == "")
63 | {
64 | iAuthors.ID = 1;
65 | }
66 | else
67 | {
68 | iAuthors.ID = Convert.ToInt32(AuthoresServices.getAuthorMaxID().Rows[0][0]) + 1;
69 | }
70 | iAuthors.AuthorName = "";
71 | iAuthors.AuthorDate = DateTime.Now.ToShortDateString();
72 | iAuthors.selectdIndex = 0;
73 | iAuthors.Dgv = AuthoresServices.getAllAuthorData();
74 |
75 |
76 | iAuthors.btnSave = false;
77 | iAuthors.btnDelete = false;
78 | iAuthors.btnDeleteAll = false;
79 | iAuthors.btnAdd = true;
80 | }
81 |
82 |
83 |
84 | public void getRow(int row)
85 | {
86 | DataTable tbl = new DataTable();
87 | tbl = AuthoresServices.getAllAuthorDataCountryID();
88 |
89 | iAuthors.ID = Convert.ToInt32(tbl.Rows[row][0]);
90 | iAuthors.AuthorName = Convert.ToString(tbl.Rows[row][1]);
91 | try
92 | {
93 | DateTime dt = DateTime.ParseExact(Convert.ToString(tbl.Rows[row][2]), "dd/MM/yyyy", null);
94 | iAuthors.AuthorDate = dt.ToString();
95 | }
96 | catch (Exception) { }
97 | iAuthors.selectdValue = Convert.ToInt32(tbl.Rows[row][3]);
98 |
99 | iAuthors.btnSave = true;
100 | iAuthors.btnDelete = true;
101 | iAuthors.btnDeleteAll = true;
102 | iAuthors.btnAdd = false;
103 | }
104 |
105 |
106 | public DataTable getLastRow()
107 | {
108 | DataTable tbl = new DataTable();
109 | tbl = AuthoresServices.getLastRow();
110 |
111 |
112 | return tbl;
113 | }
114 |
115 | public bool DeleteAuthor()
116 | {
117 | connectBetweenModelInterface();
118 | bool check = AuthoresServices.DeleteDeleteAuthor(authorsModels.ID);
119 | AutoNumber();
120 | return check;
121 | }
122 |
123 | public bool DeleteAuthorAll()
124 | {
125 | connectBetweenModelInterface();
126 | bool check = AuthoresServices.DeleteAuthorAll();
127 | AutoNumber();
128 | return check;
129 | }
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Presenter/BookDataPresenter.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Services;
2 | using Library_MVP.Models;
3 | using Library_MVP.Views.Interface;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Data;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 |
11 | namespace Library_MVP.Logic.Presenter
12 | {
13 | class BookDataPresenter
14 | {
15 |
16 | IBooksData iBookData;
17 | BookDataModel bookDataModels = new BookDataModel();
18 |
19 | public BookDataPresenter(IBooksData view)
20 | {
21 | this.iBookData = view;
22 | }
23 |
24 | //connect bewteen model cat and interface cat
25 | private void connectBetweenModelInterface()
26 | {
27 | bookDataModels.ID = iBookData.ID;
28 | bookDataModels.BookName = iBookData.BookName;
29 | bookDataModels.CountryID = iBookData.CountryID;
30 | bookDataModels.BookPrice = iBookData.BookPrice;
31 | bookDataModels.BookStatu = iBookData.BookStatu;
32 | bookDataModels.CatID = iBookData.CatID;
33 | bookDataModels.DarID = iBookData.DarID;
34 | bookDataModels.Date = iBookData.Date;
35 | bookDataModels.Notes = iBookData.Notes;
36 | bookDataModels.PageNumbers = iBookData.PageNumbers;
37 | bookDataModels.PlcaeID = iBookData.PlcaeID;
38 | bookDataModels.SubCat = iBookData.SubCat;
39 | bookDataModels.AuthorID = iBookData.AuthorID;
40 | }
41 | public void FillCbxDarNashr()
42 | {
43 | iBookData.cbxDarNashr = BooksDataService.getAllDarNashrData();
44 | iBookData.cbxDarNashrDisplayMember = "اسم الدار";
45 | iBookData.cbxDarNashrValueMember = "رقم الدار";
46 | }
47 |
48 | public void FillCbxCountry()
49 | {
50 | iBookData.cbxCountry = BooksDataService.getAllCountryData();
51 | iBookData.cbxCountryDisplayMember = "اسم الدولة";
52 | iBookData.cbxCountryValueMember = "رقم الدولة";
53 | }
54 |
55 | public void FillCbxCategory()
56 | {
57 | iBookData.cbxCat = BooksDataService.getAllCategory();
58 | iBookData.cbxCatDisplayMember = "اسم التصنيف";
59 | iBookData.cbxCatValueMember = "رقم التصنيف";
60 | }
61 |
62 | public void FillCbxBookPlaces()
63 | {
64 | iBookData.cbxPlace = BooksDataService.getAllBookPlace();
65 | iBookData.cbxPlaceDisplayMember = "اسم المكان";
66 | iBookData.cbxPlaceValueMember = "رقم المكان";
67 | }
68 | public void FillCbxAuthore()
69 | {
70 | iBookData.cbxAuthores = BooksDataService.getAllAuthore();
71 | iBookData.cbxAuthoresDisplayMember = "الاسم";
72 | iBookData.cbxAuthoresValueMember = "رقم المؤلف";
73 | }
74 |
75 | public void FillCbxBooks()
76 | {
77 | iBookData.cbxBooks = BooksDataService.getAllBooks();
78 | iBookData.cbxBooksDisplayMember = "Book_Name";
79 | iBookData.cbxBooksValueMember = "ID";
80 | }
81 |
82 | public void AutoNumber()
83 | {
84 | string val = Convert.ToString(BooksDataService.getMaxBookID().Rows[0][0]);
85 | if (val == null || val == "")
86 | {
87 | iBookData.ID = 1;
88 | }
89 | else
90 | {
91 | iBookData.ID = Convert.ToInt32(BooksDataService.getMaxBookID().Rows[0][0]) + 1;
92 | }
93 | iBookData.BookName = "";
94 | iBookData.Date= DateTime.Now.ToShortDateString();
95 | iBookData.cbxDarNashrselectdIndex = 0;
96 | iBookData.cbxPlaceselectdIndex = 0;
97 | iBookData.cbxCountryselectdIndex = 0;
98 | iBookData.cbxCatselectdIndex = 0;
99 | iBookData.cbxBooksselectdIndex = 0;
100 |
101 | iBookData.BookPrice = 1;
102 | iBookData.PageNumbers = 1;
103 | iBookData.Notes = "";
104 |
105 | iBookData.btnSave = false;
106 | iBookData.btnDelete = false;
107 | iBookData.btnDeleteAll = false;
108 | iBookData.btnAdd = true;
109 | }
110 |
111 | //this methoud to connect to services class to insert data in bookData table
112 | public bool BookDataInsert()
113 | {
114 | connectBetweenModelInterface();
115 | DateTime d1 = Convert.ToDateTime(bookDataModels.Date);
116 | string d2 = d1.ToString("dd/MM/yyyy");
117 |
118 | return BooksDataService.bookDataInsert(bookDataModels.ID, bookDataModels.BookName, bookDataModels.CatID , bookDataModels.AuthorID, bookDataModels.CountryID, bookDataModels.DarID, bookDataModels.SubCat, d2 , bookDataModels.PageNumbers, bookDataModels.PlcaeID , bookDataModels.BookStatu, bookDataModels.BookPrice, bookDataModels.Notes);
119 | }
120 |
121 | public bool DeleteBookData()
122 | {
123 | connectBetweenModelInterface();
124 | bool check = BooksDataService.DeleteBookData(bookDataModels.ID);
125 | AutoNumber();
126 | return check;
127 | }
128 | public bool DeleteBookDataAll()
129 | {
130 | connectBetweenModelInterface();
131 | bool check = BooksDataService.DeleteBookDataAll();
132 | AutoNumber();
133 | return check;
134 | }
135 |
136 |
137 | public void getRow(int row)
138 | {
139 | DataTable tbl = new DataTable();
140 | tbl = BooksDataService.getAllbookDataDataID();
141 |
142 | iBookData.ID = Convert.ToInt32(tbl.Rows[row][0]);
143 | iBookData.BookName = Convert.ToString(tbl.Rows[row][1]);
144 | iBookData.CatID = Convert.ToInt32(tbl.Rows[row][2]);
145 | iBookData.AuthorID = Convert.ToInt32(tbl.Rows[row][3]);
146 | iBookData.CountryID = Convert.ToInt32(tbl.Rows[row][4]);
147 | iBookData.DarID = Convert.ToInt32(tbl.Rows[row][5]);
148 | iBookData.SubCat = Convert.ToString(tbl.Rows[row][6]);
149 |
150 | try
151 | {
152 | DateTime dt = DateTime.ParseExact(Convert.ToString(tbl.Rows[row][7]), "dd/MM/yyyy", null);
153 | iBookData.Date = dt.ToString();
154 | }
155 | catch (Exception) { }
156 | iBookData.PageNumbers = Convert.ToInt32(tbl.Rows[row][8]);
157 | iBookData.PlcaeID = Convert.ToInt32(tbl.Rows[row][9]);
158 | iBookData.BookStatu = Convert.ToString(tbl.Rows[row][10]);
159 | iBookData.BookPrice = Convert.ToDecimal(tbl.Rows[row][11]);
160 | iBookData.Notes = Convert.ToString(tbl.Rows[row][12]);
161 |
162 | iBookData.btnSave = true;
163 | iBookData.btnDelete = true;
164 | iBookData.btnDeleteAll = true;
165 | iBookData.btnAdd = false;
166 | }
167 |
168 |
169 | public DataTable getLastRow()
170 | {
171 | DataTable tbl = new DataTable();
172 | tbl = BooksDataService.getLastRow();
173 | return tbl;
174 | }
175 |
176 | //this methoud to connect to services class to insert data in bookData table
177 | public bool BookDataUpdate()
178 | {
179 | connectBetweenModelInterface();
180 | DateTime d1 = Convert.ToDateTime(bookDataModels.Date);
181 | string d2 = d1.ToString("dd/MM/yyyy");
182 |
183 | return BooksDataService.bookDataUpdate(bookDataModels.ID, bookDataModels.BookName, bookDataModels.CatID, bookDataModels.AuthorID, bookDataModels.CountryID, bookDataModels.DarID, bookDataModels.SubCat, d2, bookDataModels.PageNumbers, bookDataModels.PlcaeID, bookDataModels.BookStatu, bookDataModels.BookPrice, bookDataModels.Notes);
184 | }
185 | }
186 | }
187 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Presenter/BookPlacePresenter.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Services;
2 | using Library_MVP.Models;
3 | using Library_MVP.Views.Interface;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Data;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 |
11 | namespace Library_MVP.Logic.Presenter
12 | {
13 |
14 |
15 | class BookPlacePresenter
16 | {
17 | IBookPlace iBookPlace;
18 | BookPlacesModel bookPlacesModel = new BookPlacesModel();
19 |
20 | public BookPlacePresenter(IBookPlace i)
21 | {
22 | this.iBookPlace = i;
23 | }
24 |
25 | //connect bewteen model cat and interface cat
26 | private void connectBetweenModelInterface()
27 | {
28 | bookPlacesModel.ID = iBookPlace.ID;
29 | bookPlacesModel.CatName = iBookPlace.CatName;
30 | }
31 |
32 |
33 | public bool BookPlaceInsert()
34 | {
35 | connectBetweenModelInterface();
36 | return BookPlaceServeice.bookPlaceInsert(bookPlacesModel.ID, bookPlacesModel.CatName);
37 | }
38 |
39 | public bool BookPlaceUpdate()
40 | {
41 | connectBetweenModelInterface();
42 | return BookPlaceServeice.bookPlaceUpdate(bookPlacesModel.ID, bookPlacesModel.CatName);
43 | }
44 | public bool BookPlaceDeleteAll()
45 | {
46 |
47 | return BookPlaceServeice.bookPlaceDeleteAll();
48 | }
49 |
50 | public bool BookPlaceDelete()
51 | {
52 | connectBetweenModelInterface();
53 | return BookPlaceServeice.bookPlaceDelete(bookPlacesModel.ID);
54 | }
55 | public void ShowInGridView()
56 | {
57 | iBookPlace.dGVPlace = BookPlaceServeice.getAllData();
58 |
59 | }
60 |
61 | public void AutoNumber()
62 | {
63 | string test = (BookPlaceServeice.getMaxID().Rows[0][0]).ToString();
64 | if (test == null || test == "")
65 | {
66 | iBookPlace.ID = 1;
67 | }
68 | else
69 | {
70 | iBookPlace.ID = Convert.ToInt32(BookPlaceServeice.getMaxID().Rows[0][0]) + 1;
71 | }
72 | iBookPlace.CatName = "";
73 | iBookPlace.btnSave = false;
74 | iBookPlace.btnDelete = false;
75 | iBookPlace.btnDeleteAll = false;
76 | iBookPlace.btnAdd = true;
77 | ShowInGridView();
78 | }
79 |
80 |
81 | public void getRow(int row)
82 | {
83 | DataTable tbl = new DataTable();
84 | tbl = BookPlaceServeice.getAllData();
85 |
86 | iBookPlace.ID = Convert.ToInt32(tbl.Rows[row][0]);
87 | iBookPlace.CatName = Convert.ToString(tbl.Rows[row][1]);
88 |
89 | iBookPlace.btnSave = true;
90 | iBookPlace.btnDelete = true;
91 | iBookPlace.btnDeleteAll = true;
92 | iBookPlace.btnAdd = false;
93 | }
94 |
95 |
96 | public DataTable getLastRow()
97 | {
98 | DataTable tbl = new DataTable();
99 | tbl = BookPlaceServeice.getLastRow();
100 |
101 |
102 | return tbl;
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Presenter/BooksSearchPersenter.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Services;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Library_MVP.Logic.Presenter
10 | {
11 |
12 |
13 | class BooksSearchPersenter
14 | {
15 | IBooksSearch ibooksSearch;
16 |
17 | public BooksSearchPersenter(IBooksSearch view)
18 | {
19 | this.ibooksSearch = view;
20 | }
21 |
22 | public void FillDGV()
23 | {
24 | ibooksSearch.dGVSearch = BooksSearchServices.getAllBooks();
25 | }
26 |
27 | public void FillDGVByID()
28 | {
29 | ibooksSearch.dGVSearch = BooksSearchServices.getAllBooksByID(ibooksSearch.bookID);
30 | }
31 |
32 | public void FillDGVByICat()
33 | {
34 | ibooksSearch.dGVSearch = BooksSearchServices.getAllBooksByCat(ibooksSearch.catID);
35 | }
36 | public void FillCbxBooks()
37 | {
38 | ibooksSearch.cbxBooks = BooksDataService.getAllBooks();
39 | ibooksSearch.cbxBooksDisplayMember = "Book_Name";
40 | ibooksSearch.cbxBooksValueMember = "ID";
41 | }
42 |
43 | public void FillCbxCategory()
44 | {
45 | ibooksSearch.cbxCat = BooksDataService.getAllCategory();
46 | ibooksSearch.cbxCatDisplayMember = "اسم التصنيف";
47 | ibooksSearch.cbxCatValueMember = "رقم التصنيف";
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Presenter/BorrowPersenter.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Services;
2 | using Library_MVP.Models;
3 | using Library_MVP.Views.Interface;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace Library_MVP.Logic.Presenter
11 | {
12 | class BorrowPersenter
13 | {
14 | IBorrow iborrow;
15 | BorrowModel borrowModels = new BorrowModel();
16 |
17 | public BorrowPersenter(IBorrow view)
18 | {
19 | this.iborrow = view;
20 | }
21 |
22 |
23 | public void fillBorrowerCbx()
24 | {
25 | iborrow.cbxBorrowDatasource = BorrowServices.getAllDataBorrow();
26 | iborrow.BorrowDisplayMember = "Name";
27 | iborrow.BorrowValueMember = "ID";
28 | }
29 |
30 | public void fillBooksCbx()
31 | {
32 | iborrow.cbxBooksDatasource = BooksDataService.getAllBooks();
33 | iborrow.BookDisplayMember = "Book_Name";
34 | iborrow.BookValueMember = "ID";
35 | }
36 |
37 |
38 | public void AutoNumber()
39 | {
40 | string val = Convert.ToString(BorrowServices.getMaxID().Rows[0][0]);
41 | if (val == null || val == "")
42 | {
43 | iborrow.ID = 1;
44 | }
45 | else
46 | {
47 | iborrow.ID = Convert.ToInt32(BorrowServices.getMaxID().Rows[0][0]) + 1;
48 | }
49 | iborrow.Notes = "";
50 | iborrow.StartDate = DateTime.Now.ToShortDateString();
51 | iborrow.EndDate = DateTime.Now.ToShortDateString();
52 | iborrow.selectdIndexBook = 0;
53 | iborrow.selectdIndexBorrow = 0;
54 | iborrow.btnSave = false;
55 | iborrow.btnDelete = false;
56 | iborrow.btnDeleteAll = false;
57 | iborrow.btnAdd = true;
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Presenter/BorrowersPersenter.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Services;
2 | using Library_MVP.Models;
3 | using Library_MVP.Views.Interface;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Data;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 |
11 | namespace Library_MVP.Logic.Presenter
12 | {
13 | class BorrowersPersenter
14 | {
15 | IBorrowers iborrowers;
16 | BorrowersModel borrowerModel = new BorrowersModel();
17 |
18 | public BorrowersPersenter(IBorrowers view)
19 | {
20 | this.iborrowers = view;
21 | }
22 |
23 |
24 | public void AutoNumber()
25 | {
26 | string test = (BorrowersServices.getMaxID().Rows[0][0]).ToString();
27 | if (test == null || test == "")
28 | {
29 | iborrowers.ID = 1;
30 | }
31 | else
32 | {
33 | iborrowers.ID = Convert.ToInt32(BorrowersServices.getMaxID().Rows[0][0]) + 1;
34 | }
35 | iborrowers.Name = "";
36 | iborrowers.Notes = "";
37 | iborrowers.Phone = "";
38 | iborrowers.Address = "";
39 | iborrowers.btnSave = false;
40 | iborrowers.btnDelete = false;
41 | iborrowers.btnDeleteAll = false;
42 | iborrowers.btnAdd = true;
43 | }
44 | //connect bewteen model cat and interface cat
45 | private void connectBetweenModelInterface()
46 | {
47 | borrowerModel.ID = iborrowers.ID;
48 | borrowerModel.Name = iborrowers.Name;
49 | borrowerModel.Phone = iborrowers.Phone;
50 | borrowerModel.Address = iborrowers.Address;
51 | borrowerModel.Notes = iborrowers.Notes;
52 | }
53 |
54 | public bool BorrowerInsert()
55 | {
56 | connectBetweenModelInterface();
57 | return BorrowersServices.borrowerInsert(borrowerModel.ID, borrowerModel.Name , borrowerModel.Phone, borrowerModel.Address, borrowerModel.Notes);
58 | }
59 | public bool BorrowerUpdate()
60 | {
61 | connectBetweenModelInterface();
62 | return BorrowersServices.borrowerUpdate(borrowerModel.ID, borrowerModel.Name, borrowerModel.Phone, borrowerModel.Address, borrowerModel.Notes);
63 | }
64 |
65 | public bool BorrowerDelete()
66 | {
67 | connectBetweenModelInterface();
68 | return BorrowersServices.borrowerdelete(borrowerModel.ID);
69 | }
70 |
71 | public bool BorrowerDeleteAll()
72 | {
73 |
74 | return BorrowersServices.borrowerdeleteAll();
75 | }
76 |
77 |
78 | public void getRow(int row)
79 | {
80 | DataTable tbl = new DataTable();
81 | tbl = BorrowersServices.getAllData();
82 |
83 | iborrowers.ID = Convert.ToInt32(tbl.Rows[row][0]);
84 | iborrowers.Name = Convert.ToString(tbl.Rows[row][1]);
85 | iborrowers.Phone = Convert.ToString(tbl.Rows[row][2]);
86 | iborrowers.Address = Convert.ToString(tbl.Rows[row][3]);
87 | iborrowers.Notes = Convert.ToString(tbl.Rows[row][4]);
88 |
89 |
90 | iborrowers.btnSave = true;
91 | iborrowers.btnDelete = true;
92 | iborrowers.btnDeleteAll = true;
93 | iborrowers.btnAdd = false;
94 | }
95 |
96 |
97 | public DataTable getLastRow()
98 | {
99 | DataTable tbl = new DataTable();
100 | tbl = BorrowersServices.getLastRow();
101 |
102 |
103 | return tbl;
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Presenter/CategoryPresenter.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Services;
2 | using Library_MVP.Models;
3 | using Library_MVP.Views.Interface;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Data;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 |
11 | namespace Library_MVP.Logic.Presenter
12 | {
13 | class CategoryPresenter
14 | {
15 | ICategory icateory;
16 | CategoryModel catModel = new CategoryModel();
17 |
18 | public CategoryPresenter(ICategory view)
19 | {
20 | this.icateory = view;
21 | }
22 |
23 | //connect bewteen model cat and interface cat
24 | private void connectBetweenModelInterface ()
25 | {
26 | catModel.ID = icateory.ID;
27 | catModel.CatName = icateory.CatName;
28 | }
29 |
30 | public bool CatInsert ()
31 | {
32 | connectBetweenModelInterface();
33 | return CategoryService.categoryInsert(catModel.ID , catModel.CatName);
34 | }
35 |
36 | public bool CatUpdate()
37 | {
38 | connectBetweenModelInterface();
39 | return CategoryService.categoryUpdate(catModel.ID, catModel.CatName);
40 | }
41 | public bool CatDelete()
42 | {
43 | connectBetweenModelInterface();
44 | return CategoryService.categoryDelete(catModel.ID);
45 | }
46 | public bool CatDeleteAll()
47 | {
48 | connectBetweenModelInterface();
49 | return CategoryService.categoryDeleteAll();
50 | }
51 |
52 |
53 | public void clearFileds()
54 | {
55 | connectBetweenModelInterface();
56 | icateory.ID =0;
57 | icateory.CatName = "";
58 | }
59 |
60 | public void ShowInGridView ()
61 | {
62 | icateory.dGVCat = CategoryService.getAllData();
63 |
64 | }
65 |
66 | public void AutoNumber()
67 | {
68 | string test = (CategoryService.getMaxID().Rows[0][0]).ToString();
69 | if (test == null || test == "")
70 | {
71 | icateory.ID = 1;
72 | }
73 | else
74 | {
75 | icateory.ID = Convert.ToInt32(CategoryService.getMaxID().Rows[0][0]) + 1;
76 | }
77 | icateory.CatName = "";
78 | icateory.btnSave = false;
79 | icateory.btnDelete = false;
80 | icateory.btnDeleteAll = false;
81 | icateory.btnAdd = true;
82 | ShowInGridView();
83 | }
84 |
85 |
86 | public void getRow(int row)
87 | {
88 | DataTable tbl = new DataTable();
89 | tbl = CategoryService.getAllData();
90 |
91 | icateory.ID = Convert.ToInt32(tbl.Rows[row][0]);
92 | icateory.CatName = Convert.ToString(tbl.Rows[row][1]);
93 |
94 | icateory.btnSave = true;
95 | icateory.btnDelete = true;
96 | icateory.btnDeleteAll = true;
97 | icateory.btnAdd = false;
98 | }
99 |
100 |
101 | public DataTable getLastRow()
102 | {
103 | DataTable tbl = new DataTable();
104 | tbl = CategoryService.getLastRow();
105 |
106 |
107 | return tbl;
108 | }
109 |
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Presenter/CountryPresenter.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Services;
2 | using Library_MVP.Models;
3 | using Library_MVP.Views.Interface;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Data;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 |
11 | namespace Library_MVP.Logic.Presenter
12 | {
13 | class CountryPresenter
14 | {
15 |
16 | ICountry icountry;
17 | CountryModel countryModel = new CountryModel();
18 |
19 | public CountryPresenter(ICountry view)
20 | {
21 | this.icountry = view;
22 | }
23 |
24 |
25 | //connect bewteen model cat and interface cat
26 | private void connectBetweenModelInterface()
27 | {
28 | countryModel.ID = icountry.ID;
29 | countryModel.CountryName = icountry.CountryName;
30 | }
31 |
32 |
33 | public bool countInsert()
34 | {
35 | connectBetweenModelInterface();
36 | bool check = CountryService.countryInsert(countryModel.ID, countryModel.CountryName);
37 | getAllData();
38 | AutoNumber();
39 | return check;
40 | }
41 |
42 | public bool countDelete()
43 | {
44 | connectBetweenModelInterface();
45 | bool check = CountryService.countryDelete(countryModel.ID);
46 | getAllData();
47 | AutoNumber();
48 | return check;
49 | }
50 |
51 | public bool countDeleteAll()
52 | {
53 | connectBetweenModelInterface();
54 | bool check = CountryService.countryDeleteAll();
55 | getAllData();
56 | AutoNumber();
57 | return check;
58 | }
59 |
60 | public bool countUpdate()
61 | {
62 | connectBetweenModelInterface();
63 | bool check = CountryService.countryUpdate(countryModel.ID, countryModel.CountryName);
64 | getAllData();
65 | AutoNumber();
66 | return check;
67 | }
68 |
69 |
70 |
71 | public void clearFiled()
72 | {
73 | icountry.ID = 0;
74 | icountry.CountryName = "";
75 | }
76 |
77 | public void getAllData()
78 | {
79 | //connectBetweenModelInterface();
80 |
81 | icountry.dataGridView = CountryService.getAllData();
82 | clearFiled();
83 | }
84 | public void AutoNumber()
85 | {
86 | string test = (CountryService.getMaxID().Rows[0][0]).ToString();
87 | if (test == null || test == "")
88 | {
89 | icountry.ID = 1;
90 | }
91 | else
92 | {
93 | icountry.ID = Convert.ToInt32(CountryService.getMaxID().Rows[0][0]) + 1;
94 | }
95 | icountry.CountryName = "";
96 | icountry.btnSave = false;
97 | icountry.btnDelete = false;
98 | icountry.btnDeleteAll = false;
99 | icountry.btnAdd = true;
100 |
101 | }
102 |
103 |
104 | public void getRow(int row)
105 | {
106 | DataTable tbl = new DataTable();
107 | tbl =CountryService.getAllData();
108 |
109 | icountry.ID =Convert.ToInt32( tbl.Rows[row][0]);
110 | icountry.CountryName = Convert.ToString(tbl.Rows[row][1]);
111 |
112 | icountry.btnSave = true;
113 | icountry.btnDelete = true;
114 | icountry.btnDeleteAll = true;
115 | icountry.btnAdd = false;
116 | }
117 |
118 |
119 | public DataTable getLastRow()
120 | {
121 | DataTable tbl = new DataTable();
122 | tbl = CountryService.getLastRow();
123 |
124 |
125 | return tbl;
126 | }
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Presenter/DarNashrPersenter.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Services;
2 | using Library_MVP.Models;
3 | using Library_MVP.Views.Interface;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Data;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 |
11 | namespace Library_MVP.Logic.Presenter
12 | {
13 | class DarNashrPersenter
14 | {
15 |
16 | IDarNashr iDarNashr;
17 | DarNasherModel darModels = new DarNasherModel();
18 |
19 | public DarNashrPersenter(IDarNashr view)
20 | {
21 | this.iDarNashr = view;
22 | }
23 |
24 |
25 | //connect bewteen model cat and interface cat
26 | private void connectBetweenModelInterface()
27 | {
28 | darModels.ID = iDarNashr.ID;
29 | darModels.DarName = iDarNashr.DarName;
30 | darModels.CountryID = iDarNashr.CountryID;
31 | }
32 |
33 | //this methoud to connect to services class to insert data in darnashr table
34 | public bool DarNashrInsert()
35 | {
36 | connectBetweenModelInterface();
37 | return DarNashrService.darInsert(darModels.ID, darModels.DarName, darModels.CountryID);
38 | }
39 | //this methoud to connect to services class to update data in authors table
40 | public bool DarnashrUpdate()
41 | {
42 | connectBetweenModelInterface();
43 | return DarNashrService.darUpdate(darModels.ID, darModels.DarName, darModels.CountryID);
44 | }
45 |
46 | //this methoud to connect to services class to delete Dar By ID
47 | public bool DarnashrDeleteID()
48 | {
49 | connectBetweenModelInterface();
50 | return DarNashrService.darDeleteID(darModels.ID);
51 | }
52 |
53 | //this methoud to connect to services class to delete Dar By ID
54 | public bool DarnashrDeleteAll()
55 | {
56 |
57 | return DarNashrService.darDeleteAll();
58 | }
59 | public void FillCbx()
60 | {
61 | iDarNashr.cbxCountry = DarNashrService.getAllDataCountry();
62 | iDarNashr.DarDisplayMember = "اسم الدولة";
63 | iDarNashr.DarValueMember = "رقم الدولة";
64 | }
65 | public void AutoNumber()
66 | {
67 | string val = Convert.ToString(DarNashrService.getDarMaxID().Rows[0][0]);
68 | if (val == null || val == "")
69 | {
70 | iDarNashr.ID = 1;
71 | }
72 | else
73 | {
74 | iDarNashr.ID = Convert.ToInt32(DarNashrService.getDarMaxID().Rows[0][0]) + 1;
75 | }
76 | iDarNashr.DarName = "";
77 |
78 | iDarNashr.selectdIndex = 0;
79 | iDarNashr.Dgv = DarNashrService.getAllDarData();
80 |
81 |
82 | iDarNashr.btnSave = false;
83 | iDarNashr.btnDelete = false;
84 | iDarNashr.btnDeleteAll = false;
85 | iDarNashr.btnAdd = true;
86 | }
87 |
88 |
89 |
90 | public void getRow(int row)
91 | {
92 | DataTable tbl = new DataTable();
93 | tbl.Clear();
94 | tbl = DarNashrService.getAllDarDataByID();
95 |
96 | iDarNashr.ID = Convert.ToInt32(tbl.Rows[row][0]);
97 | iDarNashr.DarName = Convert.ToString(tbl.Rows[row][1]);
98 | iDarNashr.selectdValue = Convert.ToInt32(tbl.Rows[row][2]);
99 |
100 | iDarNashr.btnSave = true;
101 | iDarNashr.btnDelete = true;
102 | iDarNashr.btnDeleteAll = true;
103 | iDarNashr.btnAdd = false;
104 | }
105 |
106 |
107 | public DataTable getLastRow()
108 | {
109 | DataTable tbl = new DataTable();
110 | tbl.Clear();
111 | tbl = DarNashrService.getLastRow();
112 |
113 |
114 | return tbl;
115 | }
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Services/AuthoresServices.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Data.SqlClient;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Library_MVP.Logic.Services
10 | {
11 | class AuthoresServices
12 | {
13 | //this methoud to add into authores table in DB
14 | static public bool authoresInsert(int id, string name , string date , int countryID)
15 | {
16 | return DBHelper.excuteData("AuthoresInsert", () => authoresParmaterInsert(id, name,date,countryID, DBHelper.command));
17 |
18 | }
19 |
20 | //this methoud to add insert paramter into stord prosedure
21 | private static void authoresParmaterInsert(int id, string name ,string date ,int countryID, SqlCommand command)
22 | {
23 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
24 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
25 | command.Parameters.Add("@date", SqlDbType.NVarChar).Value = date;
26 | command.Parameters.Add("@countryID", SqlDbType.Int).Value = countryID;
27 | }
28 |
29 |
30 | //this methoud to update into authores table in DB
31 | static public bool authoresUpdate(int id, string name, string date, int countryID)
32 | {
33 | return DBHelper.excuteData("AuthoresUpdate", () => authoresParmaterUpdate(id, name, date, countryID, DBHelper.command));
34 |
35 | }
36 |
37 | //this methoud to add update paramter into stord prosedure
38 | private static void authoresParmaterUpdate(int id, string name, string date, int countryID, SqlCommand command)
39 | {
40 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
41 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
42 | command.Parameters.Add("@date", SqlDbType.NVarChar).Value = date;
43 | command.Parameters.Add("@countryID", SqlDbType.Int).Value = countryID;
44 | }
45 |
46 | //this methoud to get all data to show in Cbx or return as table
47 | static public DataTable getAllData()
48 | {
49 | return DBHelper.getData("countryGetAll", () => { });
50 | }
51 | //this methoud to get all data to show in Cbx or return as table
52 | static public DataTable getAllAuthorData()
53 | {
54 | return DBHelper.getData("authorGetAll", () => { });
55 | }
56 |
57 | //this methoud to get all data to show in Cbx or return as table
58 | static public DataTable getAllAuthorDataCountryID()
59 | {
60 | return DBHelper.getData("authorGetAllCountryID", () => { });
61 | }
62 | //this methoud to get last row in table
63 | static public DataTable getLastRow()
64 | {
65 | return DBHelper.getData("authorGetLastRow", () => { });
66 | }
67 |
68 |
69 | //this methoud to get max id from Author Table
70 | static public DataTable getAuthorMaxID()
71 | {
72 | return DBHelper.getData("authorMaxID", () => { });
73 | }
74 |
75 | static public bool DeleteDeleteAuthor(int iD)
76 | {
77 |
78 | return DBHelper.excuteData("authorDelete", () => authorsParmaterDelete(iD, DBHelper.command));
79 |
80 | }
81 |
82 | //this methoud to add Delete paramter into stord prosedure
83 | private static void authorsParmaterDelete(int id, SqlCommand command)
84 | {
85 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
86 | }
87 |
88 |
89 | //this methoud to delete all author in table
90 | static public bool DeleteAuthorAll()
91 | {
92 | return DBHelper.excuteData("authorDeleteAll", () => { });
93 |
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Services/BookPlaceServeice.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Data.SqlClient;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Library_MVP.Logic.Services
10 | {
11 | class BookPlaceServeice
12 | {
13 | public static bool bookPlaceInsert(int id, string name)
14 | {
15 | return DBHelper.excuteData("bookPlaceInsert", () => bookPlaceParmaterInsert(id, name, DBHelper.command));
16 |
17 | }
18 |
19 | //this methoud to add insert paramter into stord prosedure
20 | private static void bookPlaceParmaterInsert(int id, string name, SqlCommand command)
21 | {
22 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
23 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
24 | }
25 |
26 |
27 | public static bool bookPlaceUpdate(int id, string name)
28 | {
29 | return DBHelper.excuteData("bookPlaceUpdate", () => bookPlaceParmaterUpdate(id, name, DBHelper.command));
30 |
31 | }
32 |
33 | //this methoud to update paramter into stord prosedure
34 | private static void bookPlaceParmaterUpdate(int id, string name, SqlCommand command)
35 | {
36 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
37 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
38 | }
39 |
40 |
41 | public static bool bookPlaceDeleteAll()
42 | {
43 | return DBHelper.excuteData("bookPlaceDeleteAll", () => { });
44 |
45 | }
46 |
47 |
48 |
49 | public static bool bookPlaceDelete(int id)
50 | {
51 | return DBHelper.excuteData("bookPlaceDelete", () => bookPlaceParmaterDelete(id, DBHelper.command));
52 |
53 | }
54 |
55 | //this methoud to delete paramter into stord prosedure
56 | private static void bookPlaceParmaterDelete(int id, SqlCommand command)
57 | {
58 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
59 |
60 | }
61 |
62 |
63 | //this methoud to get all data to show in DGV or return as table
64 | static public DataTable getAllData()
65 | {
66 | return DBHelper.getData("bookPlaceGetAll", () => { });
67 | }
68 |
69 |
70 | static public DataTable getMaxID()
71 | {
72 | return DBHelper.getData("bookPlaceMaxID", () => { });
73 | }
74 |
75 |
76 | //this methoud to get last row in table
77 | static public DataTable getLastRow()
78 | {
79 | return DBHelper.getData("bookPlaceGetLastRow", () => { });
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Services/BooksDataService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Data.SqlClient;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Library_MVP.Logic.Services
10 | {
11 | class BooksDataService
12 | {
13 |
14 | //this methoud to get all data to show in Cbx or return as table
15 | static public DataTable getAllDarNashrData()
16 | {
17 | return DBHelper.getData("DarNashrGetAll", () => { });
18 | }
19 |
20 | //this methoud to get all data to show in Cbx or return as table
21 | static public DataTable getAllCountryData()
22 | {
23 | return DBHelper.getData("countryGetAll", () => { });
24 | }
25 |
26 | //this methoud to get all data to show in Cbx or return as table
27 | static public DataTable getAllCategory()
28 | {
29 | return DBHelper.getData("categoryGetAll", () => { });
30 | }
31 |
32 |
33 | //this methoud to get all data to show in Cbx or return as table
34 | static public DataTable getAllBookPlace()
35 | {
36 | return DBHelper.getData("bookPlaceGetAll", () => { });
37 | }
38 | //this methoud to get all data to show in Cbx or return as table
39 | static public DataTable getAllAuthore()
40 | {
41 | return DBHelper.getData("authorGetAll", () => { });
42 | }
43 |
44 | //this methoud to get all data to show in Cbx or return as table
45 | static public DataTable getAllBooks()
46 | {
47 | return DBHelper.getData("booksDataGetAll", () => { });
48 | }
49 |
50 | //this methoud to get all data to show in Cbx or return as table
51 | static public DataTable getMaxBookID()
52 | {
53 | return DBHelper.getData("booksMaxID", () => { });
54 | }
55 |
56 |
57 | //this methoud to add into bookData table in DB
58 | static public bool bookDataInsert(int id, string name, int cat_ID, int author_ID, int country_ID, int darNashr_ID, string sub_Cat, string date, int page_number, int place_ID, string book_Statu, decimal book_Price, string notes)
59 | {
60 | return DBHelper.excuteData("bookDataInsert", () => bookDataParmaterInsert(id, name, cat_ID, author_ID, country_ID, darNashr_ID, sub_Cat, date, page_number, place_ID, book_Statu, book_Price, notes, DBHelper.command));
61 |
62 | }
63 |
64 | //this methoud to add insert paramter into stord prosedure
65 | private static void bookDataParmaterInsert(int id, string name, int cat_ID, int author_ID, int country_ID,int darNashr_ID,string sub_Cat ,string date ,int page_number ,int place_ID ,string book_Statu ,decimal book_Price ,string notes, SqlCommand command)
66 | {
67 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
68 | command.Parameters.Add("@book_name", SqlDbType.NVarChar).Value = name;
69 | command.Parameters.Add("@cat_ID", SqlDbType.Int).Value = cat_ID;
70 | command.Parameters.Add("@author_ID", SqlDbType.Int).Value = author_ID;
71 | command.Parameters.Add("@country_ID", SqlDbType.Int).Value = country_ID;
72 | command.Parameters.Add("@dar_NashrID", SqlDbType.Int).Value = darNashr_ID;
73 | command.Parameters.Add("@sub_Cat", SqlDbType.NVarChar).Value = sub_Cat;
74 | command.Parameters.Add("@date", SqlDbType.NVarChar).Value = date;
75 | command.Parameters.Add("@page_Number", SqlDbType.Int).Value = page_number;
76 | command.Parameters.Add("@place_ID", SqlDbType.Int).Value = place_ID;
77 | command.Parameters.Add("@book_Statu", SqlDbType.NVarChar).Value = book_Statu;
78 | command.Parameters.Add("@book_Price", SqlDbType.Real).Value = book_Price;
79 | command.Parameters.Add("@notes", SqlDbType.NVarChar).Value = notes;
80 | }
81 |
82 |
83 | //this methoud to add into bookData table in DB
84 | static public bool bookDataUpdate(int id, string name, int cat_ID, int author_ID, int country_ID, int darNashr_ID, string sub_Cat, string date, int page_number, int place_ID, string book_Statu, decimal book_Price, string notes)
85 | {
86 | return DBHelper.excuteData("bookDataUpdate", () => bookDataParmaterUpdate(id, name, cat_ID, author_ID, country_ID, darNashr_ID, sub_Cat, date, page_number, place_ID, book_Statu, book_Price, notes, DBHelper.command));
87 |
88 | }
89 |
90 | //this methoud to add insert paramter into stord prosedure
91 | private static void bookDataParmaterUpdate(int id, string name, int cat_ID, int author_ID, int country_ID, int darNashr_ID, string sub_Cat, string date, int page_number, int place_ID, string book_Statu, decimal book_Price, string notes, SqlCommand command)
92 | {
93 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
94 | command.Parameters.Add("@book_name", SqlDbType.NVarChar).Value = name;
95 | command.Parameters.Add("@cat_ID", SqlDbType.Int).Value = cat_ID;
96 | command.Parameters.Add("@author_ID", SqlDbType.Int).Value = author_ID;
97 | command.Parameters.Add("@country_ID", SqlDbType.Int).Value = country_ID;
98 | command.Parameters.Add("@dar_NashrID", SqlDbType.Int).Value = darNashr_ID;
99 | command.Parameters.Add("@sub_Cat", SqlDbType.NVarChar).Value = sub_Cat;
100 | command.Parameters.Add("@date", SqlDbType.NVarChar).Value = date;
101 | command.Parameters.Add("@page_Number", SqlDbType.Int).Value = page_number;
102 | command.Parameters.Add("@place_ID", SqlDbType.Int).Value = place_ID;
103 | command.Parameters.Add("@book_Statu", SqlDbType.NVarChar).Value = book_Statu;
104 | command.Parameters.Add("@book_Price", SqlDbType.Real).Value = book_Price;
105 | command.Parameters.Add("@notes", SqlDbType.NVarChar).Value = notes;
106 | }
107 | static public bool DeleteBookData(int iD)
108 | {
109 |
110 | return DBHelper.excuteData("bookDelete", () => bookDataParmaterDelete(iD, DBHelper.command));
111 |
112 | }
113 |
114 | //this methoud to add Delete paramter into stord prosedure
115 | private static void bookDataParmaterDelete(int id, SqlCommand command)
116 | {
117 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
118 | }
119 |
120 |
121 |
122 | static public bool DeleteBookDataAll()
123 | {
124 |
125 | return DBHelper.excuteData("bookDeleteAll", () => { });
126 |
127 | }
128 |
129 | internal static DataTable getAllbookDataDataID()
130 | {
131 | return DBHelper.getData("bookDataGetAllID", () => { });
132 | }
133 |
134 | //this methoud to get last row in table
135 | static public DataTable getLastRow()
136 | {
137 | return DBHelper.getData("bookDataGetLastRow", () => { });
138 | }
139 | }
140 | }
141 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Services/BooksSearchServices.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Data.SqlClient;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Library_MVP.Logic.Services
10 | {
11 | class BooksSearchServices
12 | {
13 | //this methoud to get all data to show in Cbx or return as table
14 | static public DataTable getAllBooks()
15 | {
16 | return DBHelper.getData("booksGetAll", () => { });
17 | }
18 |
19 | //this methoud to get all data to show in Cbx or return as table
20 | static public DataTable getAllBooksByID(int id)
21 | {
22 | return DBHelper.getData("booksGetAllByID", () => booksSearchID(id, DBHelper.command));
23 | }
24 |
25 |
26 | //this methoud to add insert paramter into stord prosedure
27 | private static void booksSearchID(int id, SqlCommand command)
28 | {
29 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
30 | }
31 |
32 |
33 | //this methoud to get all data to show in Cbx or return as table
34 | static public DataTable getAllBooksByCat(int catID)
35 | {
36 | return DBHelper.getData("booksGetAllByCat", () => booksSearchCat(catID, DBHelper.command));
37 | }
38 |
39 |
40 | //this methoud to add insert paramter into stord prosedure
41 | private static void booksSearchCat(int catID, SqlCommand command)
42 | {
43 | command.Parameters.Add("@catID", SqlDbType.Int).Value = catID;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Services/BorrowServices.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Library_MVP.Logic.Services
9 | {
10 | class BorrowServices
11 | {
12 |
13 | //this methoud to get all data to show in Cbx or return as table
14 | static public DataTable getAllDataBorrow()
15 | {
16 | return DBHelper.getData("borrowGetAll", () => { });
17 | }
18 |
19 | static public DataTable getMaxID()
20 | {
21 |
22 | return DBHelper.getData("borrowGetMaxID", () => { });
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Services/BorrowersServices.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Data.SqlClient;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Library_MVP.Logic.Services
10 | {
11 | class BorrowersServices
12 | {
13 |
14 | static public DataTable getMaxID()
15 | {
16 | return DBHelper.getData("borrowersMaxID", () => { });
17 | }
18 |
19 |
20 | public static bool borrowerInsert(int id, string name, string phone, string address, string notes)
21 | {
22 | return DBHelper.excuteData("borrowerInsert", () => borrowerParmaterInsert(id, name ,phone,address,notes, DBHelper.command));
23 |
24 | }
25 |
26 | //this methoud to add insert paramter into stord prosedure
27 | private static void borrowerParmaterInsert(int id, string name ,string phone ,string address,string notes, SqlCommand command)
28 | {
29 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
30 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
31 | command.Parameters.Add("@phone", SqlDbType.NVarChar).Value = phone;
32 | command.Parameters.Add("@address", SqlDbType.NVarChar).Value = address;
33 | command.Parameters.Add("@notes", SqlDbType.NVarChar).Value = notes;
34 | }
35 |
36 |
37 | public static bool borrowerUpdate(int id, string name, string phone, string address, string notes)
38 | {
39 | return DBHelper.excuteData("borrowerUpdate", () => borrowerParmaterUpdate(id, name, phone, address, notes, DBHelper.command));
40 |
41 | }
42 |
43 | //this methoud to add insert paramter into stord prosedure
44 | private static void borrowerParmaterUpdate(int id, string name, string phone, string address, string notes, SqlCommand command)
45 | {
46 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
47 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
48 | command.Parameters.Add("@phone", SqlDbType.NVarChar).Value = phone;
49 | command.Parameters.Add("@address", SqlDbType.NVarChar).Value = address;
50 | command.Parameters.Add("@notes", SqlDbType.NVarChar).Value = notes;
51 | }
52 |
53 |
54 |
55 | public static bool borrowerdelete(int id)
56 | {
57 | return DBHelper.excuteData("borroweDelete", () => borrowerParmaterdelete(id, DBHelper.command));
58 |
59 | }
60 |
61 | //this methoud to add insert paramter into stord prosedure
62 | private static void borrowerParmaterdelete(int id ,SqlCommand command)
63 | {
64 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
65 | }
66 |
67 |
68 |
69 | public static bool borrowerdeleteAll()
70 | {
71 | return DBHelper.excuteData("borroweDeleteAll", () => { });
72 |
73 | }
74 |
75 | public static DataTable getAllData()
76 | {
77 |
78 | return DBHelper.getData("borrowerGetAll", () => { });
79 | }
80 |
81 | static public DataTable getLastRow()
82 | {
83 | return DBHelper.getData("borrowersGetLastRow", () => { });
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Services/CategoryService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Data.SqlClient;
7 | using System.Data;
8 | namespace Library_MVP.Logic.Services
9 | {
10 | static class CategoryService
11 | {
12 | public static bool categoryInsert(int id ,string name)
13 | {
14 | return DBHelper.excuteData("categoryInsert", () => categoryParmaterInsert(id, name, DBHelper.command));
15 |
16 | }
17 |
18 | //this methoud to add insert paramter into stord prosedure
19 | private static void categoryParmaterInsert(int id ,string name ,SqlCommand command)
20 | {
21 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
22 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
23 | }
24 |
25 |
26 | public static bool categoryDelete(int id)
27 | {
28 | return DBHelper.excuteData("categoryDelete", () => categoryParmaterDelete(id, DBHelper.command));
29 |
30 | }
31 | //this methoud to delete paramter into stord prosedure
32 | private static void categoryParmaterDelete(int id, SqlCommand command)
33 | {
34 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
35 | }
36 | public static bool categoryUpdate(int id ,string name)
37 | {
38 | return DBHelper.excuteData("categoryUpdate", () => categoryParmaterUpdate(id, name, DBHelper.command));
39 |
40 | }
41 |
42 | //this methoud to update paramter into stord prosedure
43 | private static void categoryParmaterUpdate(int id, string name, SqlCommand command)
44 | {
45 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
46 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
47 | }
48 |
49 |
50 | public static bool categoryDeleteAll()
51 | {
52 | return DBHelper.excuteData("categoryDeleteAll", () => categoryParmaterDeleteAll());
53 |
54 | }
55 | //this methoud to delete All paramter into stord prosedure
56 | private static void categoryParmaterDeleteAll()
57 | {
58 |
59 | }
60 |
61 |
62 | //this methoud to get all data to show in DGV or return as table
63 | static public DataTable getAllData()
64 | {
65 | return DBHelper.getData("categoryGetAll", () => { });
66 | }
67 | //this methoud to get max ID in table
68 | static public DataTable getMaxID()
69 | {
70 | return DBHelper.getData("categoryMaxID", () => { });
71 | }
72 | //this methoud to get last row in table
73 | static public DataTable getLastRow()
74 | {
75 | return DBHelper.getData("categoryGetLastRow", () => { });
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Services/CountryService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Data;
7 | using System.Data.SqlClient;
8 |
9 | namespace Library_MVP.Logic.Services
10 | {
11 | static class CountryService
12 | {
13 | //this methoud to add into country table in DB
14 | static public bool countryInsert(int id, string name)
15 | {
16 | return DBHelper.excuteData("countryInsert", () => countryParmaterInsert(id, name, DBHelper.command));
17 |
18 | }
19 |
20 | //this methoud to add insert paramter into stord prosedure
21 | private static void countryParmaterInsert(int id, string name, SqlCommand command)
22 | {
23 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
24 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
25 | }
26 |
27 | //this methoud to update into country table in DB
28 | static public bool countryUpdate(int id, string name)
29 | {
30 | return DBHelper.excuteData("countryUpdate", () => countryParmaterUpdate(id, name, DBHelper.command));
31 |
32 | }
33 |
34 | //this methoud to add update paramter into stord prosedure
35 | private static void countryParmaterUpdate(int id, string name, SqlCommand command)
36 | {
37 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
38 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
39 | }
40 | static public bool countryDelete(int id)
41 | {
42 | return DBHelper.excuteData("countryDelete", () => countryParmaterDelete(id, DBHelper.command));
43 |
44 | }
45 |
46 | //this methoud to add Delete paramter into stord prosedure
47 | private static void countryParmaterDelete(int id, SqlCommand command)
48 | {
49 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
50 | }
51 |
52 | static public bool countryDeleteAll()
53 | {
54 | return DBHelper.excuteData("countryDeleteAll", () => countryParmaterDeleteAll());
55 |
56 | }
57 |
58 | //this methoud to add Delete All paramter into stord prosedure
59 | private static void countryParmaterDeleteAll()
60 | {
61 | }
62 |
63 |
64 | //this methoud to get all data to show in DGV or return as table
65 | static public DataTable getAllData()
66 | {
67 | return DBHelper.getData("countryGetAll", () => { });
68 | }
69 |
70 | //this methoud to get last row in table
71 | static public DataTable getLastRow()
72 | {
73 | return DBHelper.getData("countryGetLastRow", () => { });
74 | }
75 |
76 | //this methoud to get max ID in table
77 | static public DataTable getMaxID()
78 | {
79 | return DBHelper.getData("countryMaxID", () => { });
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Services/DBHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Data.SqlClient;
7 | using System.Data;
8 |
9 | namespace Library_MVP.Logic.Services
10 | {
11 | static public class DBHelper
12 | {
13 | public static SqlCommand command;
14 | //this methoud to get connection string from sql server
15 | private static SqlConnection getConnectionString ()
16 | {
17 | SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
18 | builder.DataSource = Properties.Settings.Default.ServerName;
19 | builder.InitialCatalog = Properties.Settings.Default.DBName;
20 | builder.IntegratedSecurity = true;
21 |
22 | return new SqlConnection (builder.ConnectionString);
23 | }
24 | //this methoud to make insert update delete and delete all in database in all program
25 | public static bool excuteData(string spName ,Action methoud)
26 | {
27 | using (SqlConnection connection = getConnectionString())
28 | {
29 | try
30 | {
31 | command = new SqlCommand(spName, connection);
32 | command.CommandType = CommandType.StoredProcedure;
33 | //to excute methoud that contain parmaters
34 | methoud.Invoke();
35 |
36 | connection.Open();
37 | command.ExecuteNonQuery();
38 | connection.Close();
39 | return true;
40 | }
41 | catch (Exception ex)
42 | {
43 | connection.Close();
44 | Console.WriteLine(ex.Message);
45 | return false;
46 | }
47 | finally
48 | {
49 | connection.Close();
50 |
51 | }
52 | }
53 | return false;
54 |
55 | }
56 |
57 | //this methoud to get any data in table or sp in database in all program
58 | public static DataTable getData(string spName, Action methoud)
59 | {
60 | DataTable tbl = new DataTable();
61 | SqlDataAdapter da;
62 | using (SqlConnection connection = getConnectionString())
63 | {
64 | try
65 | {
66 | command = new SqlCommand(spName, connection);
67 | command.CommandType = CommandType.StoredProcedure;
68 | //to excute methoud that contain parmaters
69 | methoud.Invoke();
70 | connection.Open();
71 |
72 | da = new SqlDataAdapter(command);
73 | da.Fill(tbl);
74 | da.Dispose();
75 | connection.Close();
76 | }
77 | catch (Exception ex)
78 | {
79 | connection.Close();
80 | Console.WriteLine(ex.Message);
81 | }
82 | finally
83 | {
84 | connection.Close();
85 | }
86 | }
87 | return tbl;
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Logic/Services/DarNashrService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Data.SqlClient;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Library_MVP.Logic.Services
10 | {
11 | class DarNashrService
12 | {
13 | //this methoud to add into darnashr table in DB
14 | static public bool darInsert(int id, string name, int countryID)
15 | {
16 | return DBHelper.excuteData("DarNashrInsert", () => darParmaterInsert(id, name, countryID, DBHelper.command));
17 |
18 | }
19 |
20 | //this methoud to add insert paramter into stord prosedure
21 | private static void darParmaterInsert(int id, string name, int countryID, SqlCommand command)
22 | {
23 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
24 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
25 | command.Parameters.Add("@countryID", SqlDbType.Int).Value = countryID;
26 | }
27 |
28 |
29 | //this methoud to update into darnashr table in DB
30 | static public bool darUpdate(int id, string name, int countryID)
31 | {
32 | return DBHelper.excuteData("DarnashrUpdate", () => darParmaterUpdate(id, name, countryID, DBHelper.command));
33 |
34 | }
35 |
36 | //this methoud to add update paramter into stord prosedure
37 | private static void darParmaterUpdate(int id, string name, int countryID, SqlCommand command)
38 | {
39 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
40 | command.Parameters.Add("@name", SqlDbType.NVarChar).Value = name;
41 | command.Parameters.Add("@countryID", SqlDbType.Int).Value = countryID;
42 | }
43 |
44 | //this methoud to get all data to show in Cbx or return as table
45 | static public DataTable getAllDataCountry()
46 | {
47 | return DBHelper.getData("countryGetAll", () => { });
48 | }
49 |
50 |
51 |
52 | //this methoud to delete into darnashr table in DB
53 | static public bool darDeleteID(int id)
54 | {
55 | return DBHelper.excuteData("DarnashrDelete", () => darDeleteIDParmater(id, DBHelper.command));
56 |
57 | }
58 |
59 | //this methoud to add update paramter into stord prosedure
60 | private static void darDeleteIDParmater(int id, SqlCommand command)
61 | {
62 | command.Parameters.Add("@id", SqlDbType.Int).Value = id;
63 | }
64 |
65 | //this methoud to delete All into darnashr table in DB
66 | static public bool darDeleteAll()
67 | {
68 | return DBHelper.excuteData("DarnashrDeleteAll", () => { });
69 |
70 | }
71 |
72 |
73 | //this methoud to get max id from Dar Table
74 | static public DataTable getDarMaxID()
75 | {
76 | return DBHelper.getData("DarnashrMaxID", () => { });
77 | }
78 |
79 |
80 | //this methoud to get last row in table
81 | static public DataTable getLastRow()
82 | {
83 | return DBHelper.getData("darNashrauthorGetLastRow", () => { });
84 | }
85 | //this methoud to get all data to show in Cbx or return as table
86 | static public DataTable getAllDarData()
87 | {
88 | return DBHelper.getData("DarNashrGetAll", () => { });
89 | }
90 |
91 | //this methoud to get all data to show in Cbx or return as table
92 | static public DataTable getAllDarDataByID()
93 | {
94 | return DBHelper.getData("DarNashrGetAllID", () => { });
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Models/AuthorsModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Models
8 | {
9 | class AuthorsModel
10 | {
11 | public int ID { get; set; }
12 | public string AuthorName { get; set; }
13 | public string AuthorDate { get; set; }
14 |
15 | public int CountryID { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Models/BookDataModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Models
8 | {
9 | class BookDataModel
10 | {
11 | public int ID { get; set; }
12 | public string BookName { get; set; }
13 | public int CatID { get; set; }
14 | public int AuthorID { get; set; }
15 | public int CountryID { get; set; }
16 | public int DarID { get; set; }
17 | public string SubCat { get; set; }
18 | public string Date { get; set; }
19 | public int PageNumbers { get; set; }
20 | public int PlcaeID { get; set; }
21 | public string BookStatu { get; set; }
22 | public decimal BookPrice { get; set; }
23 | public string Notes { get; set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Models/BookPlacesModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Models
8 | {
9 | class BookPlacesModel
10 | {
11 | public int ID { get; set; }
12 | public string CatName { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Models/BooksSearch.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Models
8 | {
9 | class BooksSearch
10 | {
11 | public int bookID { get; set; }
12 | public int catID { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Models/BorrowModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Models
8 | {
9 | class BorrowModel
10 | {
11 | public int ID { get; set; }
12 | public int BookID { get; set; }
13 | public int BorrowerID { get; set; }
14 |
15 | public string StartDate { get; set; }
16 | public string EndDate { get; set; }
17 | public string Notes { get; set; }
18 |
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Models/BorrowersModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Models
8 | {
9 | class BorrowersModel
10 | {
11 | public int ID { get; set; }
12 | public string Name { get; set; }
13 | public string Phone { get; set; }
14 |
15 | public string Address { get; set; }
16 |
17 | public string Notes { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Models/CategoryModel.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Services;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 |
9 | namespace Library_MVP.Models
10 | {
11 | public class CategoryModel
12 | {
13 | public int ID { get; set; }
14 | public string CatName { get; set; }
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Models/CountryModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Models
8 | {
9 | public class CountryModel
10 | {
11 | public int ID { get; set; }
12 | public string CountryName { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Models/DarNasherModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Models
8 | {
9 | class DarNasherModel
10 | {
11 | public int ID { get; set; }
12 |
13 | public string DarName { get; set; }
14 |
15 | public int CountryID { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Library_MVP
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// The main entry point for the application.
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Views.Forms.RibbonForm1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Library MVP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Library MVP")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("f1e797a6-fc59-45a4-b926-9b47c51ff0ec")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Library_MVP.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Library_MVP.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Library_MVP.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute(".\\SQLExpress")]
29 | public string ServerName {
30 | get {
31 | return ((string)(this["ServerName"]));
32 | }
33 | set {
34 | this["ServerName"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("Library")]
41 | public string DBName {
42 | get {
43 | return ((string)(this["DBName"]));
44 | }
45 | set {
46 | this["DBName"] = value;
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | .\SQLExpress
7 |
8 |
9 | Library
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Properties/licenses.licx:
--------------------------------------------------------------------------------
1 | DevExpress.Patch.InMemoryPatch, DevExpress.Patch.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7fc7bfca2443de66
2 | DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.1, Version=18.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
3 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_Authors.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Presenter;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace Library_MVP.Views.Forms
14 | {
15 | public partial class Frm_Authors : Form,IAuthors
16 | {
17 | AuthoresPresenter authorsPresenter;
18 | public int ID { get =>Convert.ToInt32( txtID.Text ); set => txtID.Text =value.ToString(); }
19 | public string AuthorName { get => txtName.Text; set =>txtName.Text =value; }
20 | public string AuthorDate { get => DtpDate.Text; set => DtpDate.Text =value; }
21 | public int CountryID { get => Convert.ToInt32(cbxCountry.SelectedValue); set => cbxCountry.SelectedValue = value; }
22 | object IAuthors.Dgv { get => Dgv.DataSource; set => Dgv.DataSource =value; }
23 | object IAuthors.cbxCountry { get => cbxCountry.DataSource; set => cbxCountry.DataSource=value; }
24 | object IAuthors.btnAdd { get => btnAdd.Enabled; set => btnAdd.Enabled = Convert.ToBoolean(value); }
25 | object IAuthors.btnNew { get => btnNew.Enabled; set => btnNew.Enabled = Convert.ToBoolean(value); }
26 | object IAuthors.btnSave { get => btnSave.Enabled; set => btnSave.Enabled = Convert.ToBoolean(value); }
27 | object IAuthors.btnDelete { get => btnDelete.Enabled; set => btnDelete.Enabled = Convert.ToBoolean(value); }
28 | object IAuthors.btnDeleteAll { get => btnDeleteAll.Enabled; set => btnDeleteAll.Enabled = Convert.ToBoolean(value); }
29 | public string AuthorDisplayMember { get => cbxCountry.DisplayMember; set => cbxCountry.DisplayMember =value; }
30 | public string AuthorValueMember { get => cbxCountry.ValueMember; set => cbxCountry.ValueMember=value; }
31 | public int selectdIndex { get => cbxCountry.SelectedIndex; set => cbxCountry.SelectedIndex = value; }
32 | public int selectdValue { get =>Convert.ToInt32( cbxCountry.SelectedValue); set => cbxCountry.SelectedValue =value; }
33 | public int ROW { get => row; set => row=value; }
34 |
35 | public int row;
36 | public Frm_Authors()
37 | {
38 | InitializeComponent();
39 | authorsPresenter = new AuthoresPresenter(this);
40 | }
41 |
42 | private void Frm_Authors_Load(object sender, EventArgs e)
43 | {
44 | authorsPresenter.FillCbx();
45 | authorsPresenter.AutoNumber();
46 |
47 | }
48 |
49 | private void btnAdd_Click(object sender, EventArgs e)
50 | {
51 | if (txtName.Text == "")
52 | {
53 | MessageBox.Show("من فضلك ادخل اسم المؤلف", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
54 | return;
55 | }
56 | bool check = authorsPresenter.AuthorsInsert();
57 | if (check)
58 | {
59 | MessageBox.Show("تم الاضافة");
60 | authorsPresenter.AutoNumber();
61 | }
62 | else
63 | {
64 | MessageBox.Show("لم يتم");
65 | }
66 | }
67 |
68 | private void groupBox1_Enter(object sender, EventArgs e)
69 | {
70 |
71 | }
72 |
73 | private void btnFirst_Click(object sender, EventArgs e)
74 | {
75 | row = 0;
76 | authorsPresenter.getRow(row);
77 | }
78 |
79 | private void btnPervios_Click(object sender, EventArgs e)
80 | {
81 | int countRow = Convert.ToInt32(authorsPresenter.getLastRow().Rows[0][0]) - 1;
82 | if (row == 0)
83 | {
84 | row = countRow;
85 | }
86 | else
87 | {
88 | row = row - 1;
89 | }
90 | authorsPresenter.getRow(row);
91 | }
92 |
93 | private void btnNext_Click(object sender, EventArgs e)
94 | {
95 | try
96 | {
97 | int countRow = Convert.ToInt32(authorsPresenter.getLastRow().Rows[0][0]);
98 |
99 | if (countRow == row)
100 | {
101 | row = 0;
102 | }
103 | else
104 | {
105 | row = row + 1;
106 | }
107 | authorsPresenter.getRow(row);
108 | }
109 | catch (Exception) { }
110 | }
111 |
112 | private void btnLast_Click(object sender, EventArgs e)
113 | {
114 | try
115 | {
116 | int countLastrow = Convert.ToInt32(authorsPresenter.getLastRow().Rows[0][0]) - 1;
117 |
118 | row = countLastrow;
119 | authorsPresenter.getRow(row);
120 | }
121 | catch (Exception ex) { MessageBox.Show(ex.Message); }
122 | }
123 |
124 | private void btnNew_Click(object sender, EventArgs e)
125 | {
126 | Frm_Authors_Load(null, null);
127 | }
128 |
129 | private void btnSave_Click(object sender, EventArgs e)
130 | {
131 | if (txtName.Text == "")
132 | {
133 | MessageBox.Show("من فضلك ادخل اسم المؤلف", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
134 | return;
135 | }
136 | bool check = authorsPresenter.AuthorsUpdate();
137 | if (check)
138 | {
139 | MessageBox.Show("تم التعديل");
140 | authorsPresenter.AutoNumber();
141 | }
142 | else
143 | {
144 | MessageBox.Show("لم يتم");
145 | }
146 | }
147 |
148 | private void btnDelete_Click(object sender, EventArgs e)
149 | {
150 | bool check = authorsPresenter.DeleteAuthor();
151 | if (check)
152 | {
153 | MessageBox.Show("تم المسح");
154 | }
155 | else
156 | {
157 | MessageBox.Show("لم يتم");
158 | }
159 | }
160 |
161 | private void btnDeleteAll_Click(object sender, EventArgs e)
162 | {
163 | bool check = authorsPresenter.DeleteAuthorAll();
164 | if (check)
165 | {
166 | MessageBox.Show("تم المسح");
167 | }
168 | else
169 | {
170 | MessageBox.Show("لم يتم");
171 | }
172 | }
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_BookPlace.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Presenter;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace Library_MVP.Views.Forms
14 | {
15 | public partial class Frm_BookPlace : Form ,IBookPlace
16 | {
17 | BookPlacePresenter bookPlacePresenter;
18 | public Frm_BookPlace()
19 | {
20 | InitializeComponent();
21 | bookPlacePresenter = new BookPlacePresenter(this);
22 | }
23 |
24 | public int ID { get => Convert.ToInt32(txtID.Text); set => txtID.Text = value.ToString(); }
25 | int IBookPlace.row { get => row; set => row = value; }
26 | public string CatName { get => Convert.ToString(txtName.Text); set => txtName.Text = value.ToString(); }
27 | public object dGVPlace { get => Dgv.DataSource; set => Dgv.DataSource = value; }
28 | object IBookPlace.btnAdd { get => btnAdd.Enabled; set => btnAdd.Enabled = Convert.ToBoolean(value); }
29 | object IBookPlace.btnNew { get => btnNew.Enabled; set => btnNew.Enabled = Convert.ToBoolean(value); }
30 | object IBookPlace.btnSave { get => btnSave.Enabled; set => btnSave.Enabled = Convert.ToBoolean(value); }
31 | object IBookPlace.btnDelete { get => btnDelete.Enabled; set => btnDelete.Enabled = Convert.ToBoolean(value); }
32 | object IBookPlace.btnDeleteAll { get => btnDeleteAll.Enabled; set => btnDeleteAll.Enabled = Convert.ToBoolean(value); }
33 | public int row;
34 | private void Frm_BookPlace_Load(object sender, EventArgs e)
35 | {
36 | bookPlacePresenter.AutoNumber();
37 | }
38 |
39 | private void btnAdd_Click(object sender, EventArgs e)
40 | {
41 | if (txtName.Text == "")
42 | {
43 | MessageBox.Show("من فضلك ادخل اسم المكان", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
44 | return;
45 | }
46 | bool check = bookPlacePresenter.BookPlaceInsert();
47 | if (check)
48 | {
49 | bookPlacePresenter.AutoNumber();
50 | MessageBox.Show("تم الاضافة");
51 | }
52 | else
53 | {
54 | MessageBox.Show("لم يتم");
55 | }
56 | }
57 |
58 | private void btnNew_Click(object sender, EventArgs e)
59 | {
60 | bookPlacePresenter.AutoNumber();
61 | }
62 |
63 | private void btnSave_Click(object sender, EventArgs e)
64 | {
65 | if (txtName.Text == "")
66 | {
67 | MessageBox.Show("من فضلك ادخل اسم المكان", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
68 | return;
69 | }
70 | bool check = bookPlacePresenter.BookPlaceUpdate();
71 | if (check)
72 | {
73 | bookPlacePresenter.AutoNumber();
74 | MessageBox.Show("تم التعديل");
75 | }
76 | else
77 | {
78 | MessageBox.Show("لم يتم");
79 | }
80 | }
81 |
82 | private void btnDeleteAll_Click(object sender, EventArgs e)
83 | {
84 |
85 | bool check = bookPlacePresenter.BookPlaceDeleteAll();
86 | if (check)
87 | {
88 | bookPlacePresenter.AutoNumber();
89 | MessageBox.Show("تم مسح كل البيانات");
90 | }
91 | else
92 | {
93 | MessageBox.Show("لم يتم المسح");
94 | }
95 | }
96 |
97 | private void btnDelete_Click(object sender, EventArgs e)
98 | {
99 | bool check = bookPlacePresenter.BookPlaceDelete();
100 | if (check)
101 | {
102 | bookPlacePresenter.AutoNumber();
103 | MessageBox.Show("تم مسح كل البيانات");
104 | }
105 | else
106 | {
107 | MessageBox.Show("لم يتم المسح");
108 | }
109 | }
110 |
111 | private void btnFirst_Click(object sender, EventArgs e)
112 | {
113 | row = 0;
114 | bookPlacePresenter.getRow(row);
115 | }
116 |
117 | private void btnPervios_Click(object sender, EventArgs e)
118 | {
119 |
120 | int countRow = Convert.ToInt32(bookPlacePresenter.getLastRow().Rows[0][0]) - 1;
121 | if (row == 0)
122 | {
123 | row = countRow;
124 | }
125 | else
126 | {
127 | row = row - 1;
128 | }
129 | bookPlacePresenter.getRow(row);
130 | }
131 |
132 | private void btnNext_Click(object sender, EventArgs e)
133 | {
134 | try
135 | {
136 | int countRow = Convert.ToInt32(bookPlacePresenter.getLastRow().Rows[0][0]);
137 |
138 | if (countRow == row)
139 | {
140 | row = 0;
141 | }
142 | else
143 | {
144 | row = row + 1;
145 | }
146 | bookPlacePresenter.getRow(row);
147 | }
148 | catch (Exception) { }
149 | }
150 |
151 | private void btnLast_Click(object sender, EventArgs e)
152 | {
153 | try
154 | {
155 | int countLastrow = Convert.ToInt32(bookPlacePresenter.getLastRow().Rows[0][0]) - 1;
156 |
157 | row = countLastrow;
158 | bookPlacePresenter.getRow(row);
159 | }
160 | catch (Exception ex) { MessageBox.Show(ex.Message); }
161 | }
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_BooksData.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Presenter;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace Library_MVP.Views.Forms
14 | {
15 | public partial class Frm_BooksData : Form , IBooksData
16 | {
17 | public int ROW { get => row; set => row=value; }
18 | public int ID { get => Convert.ToInt32(txtID.Text); set => txtID.Text = value.ToString(); }
19 | public string BookName { get => txtName.Text; set => txtName.Text =value; }
20 | public int CatID { get => Convert.ToInt32( cbxCat.SelectedValue); set => cbxCat.SelectedValue= value; }
21 | public int AuthorID { get => Convert.ToInt32(cbxAuthors.SelectedValue); set => cbxAuthors.SelectedValue =value; }
22 | public int CountryID { get => Convert.ToInt32(cbxCountry.SelectedValue); set => cbxCountry.SelectedValue = value; }
23 | public int DarID { get => Convert.ToInt32(cbxDarNashr.SelectedValue); set => cbxDarNashr.SelectedValue = value; }
24 | public string SubCat { get => txtSubCat.Text; set => txtSubCat.Text=value; }
25 | public string Date { get => DtpDate.Text; set => DtpDate.Text=value; }
26 | public int PageNumbers { get =>Convert.ToInt32( NudPagesNumber.Value); set => NudPagesNumber.Value =value; }
27 | public int PlcaeID { get => Convert.ToInt32(cbxPlaces.SelectedValue); set => cbxPlaces.SelectedValue=value; }
28 | public string BookStatu { get => txtBookStatu.Text; set => txtBookStatu.Text=value; }
29 | public decimal BookPrice { get => Convert.ToInt32(NudBookPrice.Value); set => NudBookPrice.Value = value; }
30 | public string Notes { get => txtNotes.Text; set => txtNotes.Text=value; }
31 |
32 |
33 | object IBooksData.cbxCountry { get => cbxCountry.DataSource; set => cbxCountry.DataSource=value; }
34 | object IBooksData.cbxCat { get => cbxCat.DataSource; set => cbxCat.DataSource =value; }
35 | public object cbxPlace { get => cbxPlaces.DataSource; set => cbxPlaces.DataSource=value; }
36 | object IBooksData.cbxDarNashr { get => cbxDarNashr.DataSource; set => cbxDarNashr.DataSource=value; }
37 | object IBooksData.cbxBooks { get => cbxBooks.DataSource; set => cbxBooks.DataSource=value; }
38 | public object cbxAuthores { get => cbxAuthors.DataSource; set => cbxAuthors.DataSource = value; }
39 |
40 | public string cbxCountryDisplayMember { get => cbxCountry.DisplayMember; set => cbxCountry.DisplayMember =value; }
41 | public string cbxCountryValueMember { get => cbxCountry.ValueMember; set => cbxCountry.ValueMember=value; }
42 | public string cbxCatDisplayMember { get => cbxCat.DisplayMember; set => cbxCat.DisplayMember=value; }
43 | public string cbxCatValueMember { get => cbxCat.ValueMember; set => cbxCat.ValueMember=value; }
44 | public string cbxPlaceDisplayMember { get => cbxPlaces.DisplayMember; set => cbxPlaces.DisplayMember=value; }
45 | public string cbxPlaceValueMember { get => cbxPlaces.ValueMember; set => cbxPlaces.ValueMember = value; }
46 | public string cbxDarNashrDisplayMember { get => cbxDarNashr.DisplayMember; set => cbxDarNashr.DisplayMember=value; }
47 | public string cbxDarNashrValueMember { get => cbxDarNashr.ValueMember; set => cbxDarNashr.ValueMember=value; }
48 | public string cbxBooksDisplayMember { get => cbxBooks.DisplayMember; set => cbxBooks.DisplayMember=value; }
49 | public string cbxBooksValueMember { get => cbxBooks.ValueMember; set => cbxBooks.ValueMember=value; }
50 | public int cbxCountryselectdIndex { get => cbxCountry.SelectedIndex; set => cbxCountry.SelectedIndex=value; }
51 | public int cbxCountryselectdValue { get =>Convert.ToInt32( cbxCountry.SelectedValue); set => cbxCountry.SelectedValue = value; }
52 | public int cbxCatselectdIndex { get => cbxCat.SelectedIndex; set => cbxCat.SelectedIndex=value; }
53 | public int cbxCatselectdValue { get => Convert.ToInt32(cbxCat.SelectedValue); set => cbxCat.SelectedValue=value; }
54 | public int cbxPlaceselectdIndex { get => cbxPlaces.SelectedIndex; set => cbxPlaces.SelectedIndex =value; }
55 | public int cbxPlaceselectdValue { get => Convert.ToInt32(cbxPlaces.SelectedValue); set => cbxPlaces.SelectedValue = value; }
56 | public int cbxDarNashrselectdIndex { get => cbxDarNashr.SelectedIndex; set => cbxDarNashr.SelectedIndex=value; }
57 | public int cbxDarNashrselectdValue { get => Convert.ToInt32(cbxDarNashr.SelectedValue); set => cbxDarNashr.SelectedValue=value; }
58 | public int cbxBooksselectdIndex { get => bookIndex; set => bookIndex = value; }
59 | public int cbxBooksselectdValue { get => Convert.ToInt32(cbxBooks.SelectedValue); set => cbxBooks.SelectedValue=value; }
60 |
61 |
62 | bool IBooksData.btnAdd { get => btnAdd.Enabled; set => btnAdd.Enabled = Convert.ToBoolean(value); }
63 | bool IBooksData.btnNew { get => btnNew.Enabled; set => btnNew.Enabled = Convert.ToBoolean(value); }
64 | bool IBooksData.btnSave { get => btnSave.Enabled; set => btnSave.Enabled = Convert.ToBoolean(value); }
65 | bool IBooksData.btnDelete { get => btnDelete.Enabled; set => btnDelete.Enabled = Convert.ToBoolean(value); }
66 | bool IBooksData.btnDeleteAll { get => btnDeleteAll.Enabled; set => btnDeleteAll.Enabled = Convert.ToBoolean(value); }
67 |
68 |
69 | public string cbxAuthoresValueMember { get =>cbxAuthors.ValueMember; set => cbxAuthors.ValueMember=value; }
70 | public string cbxAuthoresDisplayMember { get => cbxAuthors.DisplayMember; set => cbxAuthors.DisplayMember =value; }
71 |
72 | public int row = 0; public int bookIndex;
73 | BookDataPresenter bookDataPresenter;
74 | public Frm_BooksData()
75 | {
76 | InitializeComponent();
77 | bookDataPresenter = new BookDataPresenter(this);
78 | if (cbxBooks.Items.Count <= 0)
79 | {
80 | bookIndex = cbxBooks.SelectedIndex;
81 | }else
82 | {
83 | bookIndex = cbxBooks.SelectedIndex;
84 | }
85 | }
86 |
87 | private void textBox2_TextChanged(object sender, EventArgs e)
88 | {
89 |
90 | }
91 |
92 | private void label10_Click(object sender, EventArgs e)
93 | {
94 |
95 | }
96 |
97 | private void Frm_BooksData_Load(object sender, EventArgs e)
98 | {
99 | bookDataPresenter.FillCbxDarNashr();
100 | bookDataPresenter.FillCbxCountry();
101 | bookDataPresenter.FillCbxCategory();
102 | bookDataPresenter.FillCbxBookPlaces();
103 | bookDataPresenter.FillCbxAuthore();
104 | bookDataPresenter.FillCbxBooks();
105 |
106 | bookDataPresenter.AutoNumber();
107 | }
108 |
109 | private void btnNew_Click(object sender, EventArgs e)
110 | {
111 | Frm_BooksData_Load(null, null);
112 | }
113 |
114 | private void btnAdd_Click(object sender, EventArgs e)
115 | {
116 | if (txtName.Text == "")
117 | {
118 | MessageBox.Show("من فضلك ادخل اسم الكتاب", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
119 | return;
120 | }
121 | bool check = bookDataPresenter.BookDataInsert();
122 |
123 | if (check)
124 | {
125 | MessageBox.Show("تم الادخال بنجاح");
126 | bookDataPresenter.AutoNumber();
127 | }
128 | else
129 | {
130 | MessageBox.Show("خطا اثناء الادخال");
131 | }
132 | }
133 |
134 | private void btnDelete_Click(object sender, EventArgs e)
135 | {
136 | bool check = bookDataPresenter.DeleteBookData();
137 | if (check)
138 | {
139 | MessageBox.Show("تم المسح");
140 | }
141 | else
142 | {
143 | MessageBox.Show("لم يتم");
144 | }
145 | }
146 |
147 | private void btnDeleteAll_Click(object sender, EventArgs e)
148 | {
149 | bool check = bookDataPresenter.DeleteBookDataAll();
150 | if (check)
151 | {
152 | MessageBox.Show("تم المسح");
153 | }
154 | else
155 | {
156 | MessageBox.Show("لم يتم");
157 | }
158 | }
159 |
160 | private void btnFirst_Click(object sender, EventArgs e)
161 | {
162 | row = 0;
163 | bookDataPresenter.getRow(row);
164 | }
165 |
166 | private void btnLast_Click(object sender, EventArgs e)
167 | {
168 | try
169 | {
170 | int countLastrow = Convert.ToInt32(bookDataPresenter.getLastRow().Rows[0][0]) - 1;
171 |
172 | row = countLastrow;
173 | bookDataPresenter.getRow(row);
174 | }
175 | catch (Exception ex) { MessageBox.Show(ex.Message); }
176 | }
177 |
178 | private void btnPervios_Click(object sender, EventArgs e)
179 | {
180 | int countRow = Convert.ToInt32(bookDataPresenter.getLastRow().Rows[0][0]) - 1;
181 | if (row == 0)
182 | {
183 | row = countRow;
184 | }
185 | else
186 | {
187 | row = row - 1;
188 | }
189 | bookDataPresenter.getRow(row);
190 | }
191 |
192 | private void btnNext_Click(object sender, EventArgs e)
193 | {
194 | try
195 | {
196 | int countRow = Convert.ToInt32(bookDataPresenter.getLastRow().Rows[0][0]);
197 |
198 | if (countRow == row)
199 | {
200 | row = 0;
201 | }
202 | else
203 | {
204 | row = row + 1;
205 | }
206 | bookDataPresenter.getRow(row);
207 | }
208 | catch (Exception) { }
209 | }
210 |
211 | private void btnSave_Click(object sender, EventArgs e)
212 | {
213 | if (txtName.Text == "")
214 | {
215 | MessageBox.Show("من فضلك ادخل اسم الكتاب", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
216 | return;
217 | }
218 | bool check = bookDataPresenter.BookDataUpdate();
219 |
220 | if (check)
221 | {
222 | MessageBox.Show("تم التعديل بنجاح");
223 | bookDataPresenter.AutoNumber();
224 | }
225 | else
226 | {
227 | MessageBox.Show("خطا اثناء التعديل");
228 | }
229 | }
230 | }
231 | }
232 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_BooksSearch.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Library_MVP.Views.Forms
2 | {
3 | partial class Frm_BooksSearch
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Frm_BooksSearch));
33 | this.label1 = new System.Windows.Forms.Label();
34 | this.DGVSEARCH = new System.Windows.Forms.DataGridView();
35 | this.btnAdd = new DevExpress.XtraEditors.SimpleButton();
36 | this.rbtnAll = new System.Windows.Forms.RadioButton();
37 | this.rbtnOneBook = new System.Windows.Forms.RadioButton();
38 | this.cbxBooks = new System.Windows.Forms.ComboBox();
39 | this.cbxCat = new System.Windows.Forms.ComboBox();
40 | this.rbtnCat = new System.Windows.Forms.RadioButton();
41 | ((System.ComponentModel.ISupportInitialize)(this.DGVSEARCH)).BeginInit();
42 | this.SuspendLayout();
43 | //
44 | // label1
45 | //
46 | this.label1.AutoSize = true;
47 | this.label1.Font = new System.Drawing.Font("Droid Arabic Kufi", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
48 | this.label1.ForeColor = System.Drawing.Color.Red;
49 | this.label1.Location = new System.Drawing.Point(510, -7);
50 | this.label1.Name = "label1";
51 | this.label1.Size = new System.Drawing.Size(181, 46);
52 | this.label1.TabIndex = 0;
53 | this.label1.Text = "البحث عن الكتب";
54 | //
55 | // DGVSEARCH
56 | //
57 | this.DGVSEARCH.AllowUserToAddRows = false;
58 | this.DGVSEARCH.AllowUserToDeleteRows = false;
59 | this.DGVSEARCH.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
60 | this.DGVSEARCH.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
61 | this.DGVSEARCH.BackgroundColor = System.Drawing.Color.White;
62 | this.DGVSEARCH.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
63 | dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
64 | dataGridViewCellStyle1.BackColor = System.Drawing.Color.Yellow;
65 | dataGridViewCellStyle1.Font = new System.Drawing.Font("Droid Arabic Kufi", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
66 | dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
67 | dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
68 | dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
69 | dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
70 | this.DGVSEARCH.DefaultCellStyle = dataGridViewCellStyle1;
71 | this.DGVSEARCH.Location = new System.Drawing.Point(6, 128);
72 | this.DGVSEARCH.Name = "DGVSEARCH";
73 | this.DGVSEARCH.ReadOnly = true;
74 | this.DGVSEARCH.RowTemplate.DefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
75 | this.DGVSEARCH.RowTemplate.DefaultCellStyle.ForeColor = System.Drawing.Color.Black;
76 | this.DGVSEARCH.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
77 | this.DGVSEARCH.Size = new System.Drawing.Size(1181, 428);
78 | this.DGVSEARCH.TabIndex = 1;
79 | //
80 | // btnAdd
81 | //
82 | this.btnAdd.Appearance.Font = new System.Drawing.Font("Droid Arabic Kufi", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
83 | this.btnAdd.Appearance.Options.UseFont = true;
84 | this.btnAdd.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnAdd.ImageOptions.Image")));
85 | this.btnAdd.Location = new System.Drawing.Point(1036, 62);
86 | this.btnAdd.Name = "btnAdd";
87 | this.btnAdd.Size = new System.Drawing.Size(151, 60);
88 | this.btnAdd.TabIndex = 11;
89 | this.btnAdd.Text = "بحث";
90 | this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
91 | //
92 | // rbtnAll
93 | //
94 | this.rbtnAll.AutoSize = true;
95 | this.rbtnAll.Checked = true;
96 | this.rbtnAll.Location = new System.Drawing.Point(2, 83);
97 | this.rbtnAll.Name = "rbtnAll";
98 | this.rbtnAll.Size = new System.Drawing.Size(82, 29);
99 | this.rbtnAll.TabIndex = 12;
100 | this.rbtnAll.TabStop = true;
101 | this.rbtnAll.Text = "كل الكتب";
102 | this.rbtnAll.UseVisualStyleBackColor = true;
103 | //
104 | // rbtnOneBook
105 | //
106 | this.rbtnOneBook.AutoSize = true;
107 | this.rbtnOneBook.Location = new System.Drawing.Point(80, 83);
108 | this.rbtnOneBook.Name = "rbtnOneBook";
109 | this.rbtnOneBook.Size = new System.Drawing.Size(88, 29);
110 | this.rbtnOneBook.TabIndex = 13;
111 | this.rbtnOneBook.Text = "كتاب محدد";
112 | this.rbtnOneBook.UseVisualStyleBackColor = true;
113 | //
114 | // cbxBooks
115 | //
116 | this.cbxBooks.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
117 | this.cbxBooks.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
118 | this.cbxBooks.FormattingEnabled = true;
119 | this.cbxBooks.Location = new System.Drawing.Point(174, 82);
120 | this.cbxBooks.Name = "cbxBooks";
121 | this.cbxBooks.Size = new System.Drawing.Size(216, 33);
122 | this.cbxBooks.TabIndex = 46;
123 | //
124 | // cbxCat
125 | //
126 | this.cbxCat.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
127 | this.cbxCat.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
128 | this.cbxCat.FormattingEnabled = true;
129 | this.cbxCat.Location = new System.Drawing.Point(509, 82);
130 | this.cbxCat.Name = "cbxCat";
131 | this.cbxCat.Size = new System.Drawing.Size(182, 33);
132 | this.cbxCat.TabIndex = 48;
133 | //
134 | // rbtnCat
135 | //
136 | this.rbtnCat.AutoSize = true;
137 | this.rbtnCat.Location = new System.Drawing.Point(396, 82);
138 | this.rbtnCat.Name = "rbtnCat";
139 | this.rbtnCat.Size = new System.Drawing.Size(108, 29);
140 | this.rbtnCat.TabIndex = 49;
141 | this.rbtnCat.Text = "التصنيف العام";
142 | this.rbtnCat.UseVisualStyleBackColor = true;
143 | //
144 | // Frm_BooksSearch
145 | //
146 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
147 | this.ClientSize = new System.Drawing.Size(1196, 568);
148 | this.Controls.Add(this.rbtnCat);
149 | this.Controls.Add(this.cbxCat);
150 | this.Controls.Add(this.cbxBooks);
151 | this.Controls.Add(this.rbtnOneBook);
152 | this.Controls.Add(this.rbtnAll);
153 | this.Controls.Add(this.btnAdd);
154 | this.Controls.Add(this.DGVSEARCH);
155 | this.Controls.Add(this.label1);
156 | this.Font = new System.Drawing.Font("Droid Arabic Kufi", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
157 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
158 | this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
159 | this.MaximizeBox = false;
160 | this.Name = "Frm_BooksSearch";
161 | this.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
162 | this.RightToLeftLayout = true;
163 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
164 | this.Text = "بحث عن الكتب";
165 | this.Load += new System.EventHandler(this.Frm_BooksSearch_Load);
166 | ((System.ComponentModel.ISupportInitialize)(this.DGVSEARCH)).EndInit();
167 | this.ResumeLayout(false);
168 | this.PerformLayout();
169 |
170 | }
171 |
172 | #endregion
173 |
174 | private System.Windows.Forms.Label label1;
175 | private System.Windows.Forms.DataGridView DGVSEARCH;
176 | private DevExpress.XtraEditors.SimpleButton btnAdd;
177 | private System.Windows.Forms.RadioButton rbtnAll;
178 | private System.Windows.Forms.RadioButton rbtnOneBook;
179 | private System.Windows.Forms.ComboBox cbxBooks;
180 | private System.Windows.Forms.ComboBox cbxCat;
181 | private System.Windows.Forms.RadioButton rbtnCat;
182 | }
183 | }
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_BooksSearch.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Presenter;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace Library_MVP.Views.Forms
14 | {
15 | public partial class Frm_BooksSearch : Form ,IBooksSearch
16 | {
17 | BooksSearchPersenter booksPersenter;
18 | public Frm_BooksSearch()
19 | {
20 | InitializeComponent();
21 | booksPersenter = new BooksSearchPersenter(this);
22 | }
23 |
24 | public object dGVSearch { get => DGVSEARCH.DataSource; set => DGVSEARCH.DataSource = value; }
25 | public int bookID { get => Convert.ToInt32(cbxBooks.SelectedValue); set => cbxBooks.SelectedValue =Convert.ToInt32(value); }
26 | object IBooksSearch.cbxBooks { get => cbxBooks.DataSource; set => cbxBooks.DataSource =value; }
27 | public string cbxBooksDisplayMember { get => cbxBooks.DisplayMember; set => cbxBooks.DisplayMember =value; }
28 | public string cbxBooksValueMember { get => cbxBooks.ValueMember; set => cbxBooks.ValueMember=value; }
29 | object IBooksSearch.cbxCat { get => cbxCat.DataSource; set => cbxCat.DataSource =value; }
30 | public string cbxCatDisplayMember { get => cbxCat.DisplayMember; set => cbxCat.DisplayMember=value; }
31 | public string cbxCatValueMember { get => cbxCat.ValueMember; set => cbxCat.ValueMember =value; }
32 | public int catID { get => Convert.ToInt32(cbxCat.SelectedValue); set => cbxCat.SelectedValue=value; }
33 |
34 | private void Frm_BooksSearch_Load(object sender, EventArgs e)
35 | {
36 | booksPersenter.FillCbxBooks();
37 | booksPersenter.FillCbxCategory();
38 | }
39 |
40 | private void btnAdd_Click(object sender, EventArgs e)
41 | {
42 | if (rbtnAll.Checked == true)
43 | {
44 | booksPersenter.FillDGV();
45 | }else if (rbtnOneBook.Checked == true)
46 | {
47 | booksPersenter.FillDGVByID();
48 | }else if (rbtnCat.Checked == true)
49 | {
50 | booksPersenter.FillDGVByICat();
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_BooksSearch.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 |
123 | iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
124 | dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAmdEVYdFRpdGxlAEZpbmQ7QmFycztSaWJib247U3Rh
125 | bmRhcmQ7U2VhcmNou2WcCAAAAZ5JREFUWEfFlsFtwlAQREkDOXCmgtRgiWJQ2gjimA5ypIUoNeSUE7VQ
126 | gDODvKv53+vv7w/Chyet7JnZwdiGTd/3qxIefCY+dF0XsQMHcAYXcB3gzGM8R83Iq0tK+JAFvIB38Av6
127 | Gaihlh7P0CUlfBDzFnyCaFkJeui9qwA/Rb78DxzBHnAB4cxjPKdaem9XQpeU8IEmwEupgV/gTQ0Kzw0a
128 | 9TAj1Ef4ABNvJv3OGfyq4ghqBq35mLGLtBE+wMQ72kJ4aSc/eQ61g8f8h0gX4QNMfKws4KiiGugR/znS
129 | RPgAE59tC9irqAZ6xH+JNBE+wMQXjAVsVVQDPeK/RpoIH2iSgFUKrP4VrH4Trv4YPvRFBHhuEvNrEHnE
130 | q/gb+KIpLEPDyL0/RsYHSBbmTBUgXJCXaKFYolSALP1D8pMdMyZLzBUwlvwlO4HqEqMCrWTB1SXMn4S1
131 | kAeDqhLmT8Ja0FBhtoT5k7AWLDCgWML8SVgLDCswWcL8o8ClIGyOqMTJ/KPApSCsBi3B2f1JWAsMq4SL
132 | b8uJ+ZOwNQgPPo9+8w8imt94911hKQAAAABJRU5ErkJggg==
133 |
134 |
135 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_Borrow.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Presenter;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace Library_MVP.Views.Forms
14 | {
15 | public partial class Frm_Borrow : Form ,IBorrow
16 | {
17 | public int ID { get => Convert.ToInt32(txtID.Text); set => txtID.Text = value.ToString(); }
18 | public int BookID { get => Convert.ToInt32(cbxbooks.SelectedValue); set => cbxbooks.SelectedValue = value; }
19 | public int BorrowerID { get => Convert.ToInt32(cbxBorrower.SelectedValue); set => cbxBorrower.SelectedValue = value; }
20 | public string StartDate { get => DtpStart.Text; set => DtpStart.Text = value; }
21 | public string EndDate { get => DtpEnd.Text; set => DtpEnd.Text = value; }
22 | public string Notes { get => txtNotes.Text; set => txtNotes.Text = value; }
23 | public object cbxBorrowDatasource { get => cbxBorrower.DataSource; set => cbxBorrower.DataSource = value; }
24 | public string BorrowDisplayMember { get => cbxBorrower.DisplayMember; set => cbxBorrower.DisplayMember = value; }
25 | public string BorrowValueMember { get => cbxBorrower.ValueMember; set => cbxBorrower.ValueMember = value; }
26 | public int selectdIndexBorrow { get => cbxBorrower.SelectedIndex; set => cbxBorrower.SelectedIndex = value; }
27 | public object cbxBooksDatasource { get => cbxbooks.DataSource; set => cbxbooks.DataSource = value; }
28 | public string BookDisplayMember { get => cbxbooks.DisplayMember; set => cbxbooks.DisplayMember = value; }
29 | public string BookValueMember { get => cbxbooks.ValueMember; set => cbxbooks.ValueMember = value; }
30 | public int selectdIndexBook { get => cbxbooks.SelectedIndex; set => cbxbooks.SelectedIndex = value; }
31 | object IBorrow.btnAdd { get => btnAdd.Enabled; set => btnAdd.Enabled = Convert.ToBoolean(value); }
32 | object IBorrow.btnNew { get => btnNew.Enabled; set => btnNew.Enabled = Convert.ToBoolean(value); }
33 | object IBorrow.btnSave { get => btnSave.Enabled; set => btnSave.Enabled = Convert.ToBoolean(value); }
34 | object IBorrow.btnDelete { get => btnDelete.Enabled; set => btnDelete.Enabled = Convert.ToBoolean(value); }
35 | object IBorrow.btnDeleteAll { get => btnDeleteAll.Enabled; set => btnDeleteAll.Enabled = Convert.ToBoolean(value); }
36 | int IBorrow.ROW { get => row; set => row = value; }
37 | int row = 0;
38 |
39 | BorrowPersenter borrowPersenter;
40 | public Frm_Borrow()
41 | {
42 | InitializeComponent();
43 | borrowPersenter = new BorrowPersenter(this);
44 | }
45 |
46 |
47 |
48 | private void Frm_Borrow_Load(object sender, EventArgs e)
49 | {
50 | borrowPersenter.fillBooksCbx();
51 | borrowPersenter.fillBorrowerCbx();
52 |
53 | borrowPersenter.AutoNumber();
54 |
55 | }
56 |
57 | private void btnNew_Click(object sender, EventArgs e)
58 | {
59 | borrowPersenter.AutoNumber();
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_Borrowers.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Presenter;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace Library_MVP.Views.Forms
14 | {
15 | public partial class Frm_Borrowers : Form ,IBorrowers
16 | {
17 | BorrowersPersenter borrowersPresenter;
18 |
19 | public int ID { get => Convert.ToInt32(txtID.Text); set => txtID.Text = value.ToString(); }
20 | public string Phone { get => txtPhone.Text; set => txtPhone.Text = value; }
21 | public string Address { get => txtAddress.Text; set => txtAddress.Text = value; }
22 | public string Notes { get => txtNotes.Text; set => txtNotes.Text = value; }
23 | public string Name { get => txtName.Text; set => txtName.Text = value; }
24 | object IBorrowers.btnAdd { get => btnAdd.Enabled; set => btnAdd.Enabled = Convert.ToBoolean(value); }
25 | object IBorrowers.btnNew { get => btnNew.Enabled; set => btnNew.Enabled = Convert.ToBoolean(value); }
26 | object IBorrowers.btnSave { get => btnSave.Enabled; set => btnSave.Enabled = Convert.ToBoolean(value); }
27 | object IBorrowers.btnDelete { get => btnDelete.Enabled; set => btnDelete.Enabled = Convert.ToBoolean(value); }
28 | object IBorrowers.btnDeleteAll { get => btnDeleteAll.Enabled; set => btnDeleteAll.Enabled = Convert.ToBoolean(value); }
29 |
30 |
31 | int IBorrowers.row { get => row; set => row = value; }
32 |
33 | public int row = 0;
34 | public Frm_Borrowers()
35 | {
36 | InitializeComponent();
37 | borrowersPresenter = new BorrowersPersenter(this);
38 |
39 | }
40 |
41 | private void Frm_Borrowers_Load(object sender, EventArgs e)
42 | {
43 | borrowersPresenter.AutoNumber();
44 | }
45 |
46 | private void btnNew_Click(object sender, EventArgs e)
47 | {
48 | borrowersPresenter.AutoNumber();
49 | }
50 |
51 | private void btnAdd_Click(object sender, EventArgs e)
52 | {
53 | if (txtName.Text == "")
54 | {
55 | MessageBox.Show("من فضلك ادخل اسم المستعير", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
56 | return;
57 | }
58 | bool check = borrowersPresenter.BorrowerInsert();
59 | if (check)
60 | {
61 | borrowersPresenter.AutoNumber();
62 | MessageBox.Show("تم الاضافة");
63 | }
64 | else
65 | {
66 | MessageBox.Show("لم يتم");
67 | }
68 | }
69 |
70 | private void btnSave_Click(object sender, EventArgs e)
71 | {
72 | if (txtName.Text == "")
73 | {
74 | MessageBox.Show("من فضلك ادخل اسم المستعير", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
75 | return;
76 | }
77 | bool check = borrowersPresenter.BorrowerUpdate();
78 | if (check)
79 | {
80 | borrowersPresenter.AutoNumber();
81 | MessageBox.Show("تم التعديل");
82 | }
83 | else
84 | {
85 | MessageBox.Show("لم يتم");
86 | }
87 | }
88 |
89 | private void btnDelete_Click(object sender, EventArgs e)
90 | {
91 |
92 | bool check = borrowersPresenter.BorrowerDelete();
93 | if (check)
94 | {
95 | borrowersPresenter.AutoNumber();
96 | MessageBox.Show("تم المسح");
97 | }
98 | else
99 | {
100 | MessageBox.Show("لم يتم");
101 | }
102 | }
103 |
104 | private void btnDeleteAll_Click(object sender, EventArgs e)
105 | {
106 | bool check = borrowersPresenter.BorrowerDeleteAll();
107 | if (check)
108 | {
109 | borrowersPresenter.AutoNumber();
110 | MessageBox.Show("تم مسح الكل");
111 | }
112 | else
113 | {
114 | MessageBox.Show("لم يتم");
115 | }
116 | }
117 |
118 | private void btnFirst_Click(object sender, EventArgs e)
119 | {
120 | row = 0;
121 | borrowersPresenter.getRow(row);
122 | }
123 |
124 | private void btnPervios_Click(object sender, EventArgs e)
125 | {
126 | int countRow = Convert.ToInt32(borrowersPresenter.getLastRow().Rows[0][0]) - 1;
127 | if (row == 0)
128 | {
129 | row = countRow;
130 | }
131 | else
132 | {
133 | row = row - 1;
134 | }
135 | borrowersPresenter.getRow(row);
136 | }
137 |
138 | private void btnNext_Click(object sender, EventArgs e)
139 | {
140 | try
141 | {
142 | int countRow = Convert.ToInt32(borrowersPresenter.getLastRow().Rows[0][0]);
143 |
144 | if (countRow == row)
145 | {
146 | row = 0;
147 | }
148 | else
149 | {
150 | row = row + 1;
151 | }
152 | borrowersPresenter.getRow(row);
153 | }
154 | catch (Exception) { }
155 | }
156 |
157 | private void btnLast_Click(object sender, EventArgs e)
158 | {
159 | try
160 | {
161 | int countLastrow = Convert.ToInt32(borrowersPresenter.getLastRow().Rows[0][0]) - 1;
162 |
163 | row = countLastrow;
164 | borrowersPresenter.getRow(row);
165 | }
166 | catch (Exception ex) { MessageBox.Show(ex.Message); }
167 | }
168 | }
169 | }
170 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_Category.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Presenter;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace Library_MVP.Views.Forms
14 | {
15 | public partial class Frm_Category : Form ,ICategory
16 | {
17 | CategoryPresenter catPresenter;
18 |
19 | public int ID { get =>Convert.ToInt32( txtID.Text ); set => txtID.Text = value.ToString() ; }
20 | public string CatName { get => Convert.ToString(txtName.Text); set => txtName.Text = value.ToString(); }
21 | public object dGVCat { get => Dgv.DataSource; set => Dgv.DataSource = value; }
22 | object ICategory.btnAdd { get => btnAdd.Enabled; set => btnAdd.Enabled = Convert.ToBoolean(value); }
23 | object ICategory.btnNew { get => btnNew.Enabled; set => btnNew.Enabled = Convert.ToBoolean(value); }
24 | object ICategory.btnSave { get => btnSave.Enabled; set => btnSave.Enabled = Convert.ToBoolean(value); }
25 | object ICategory.btnDelete { get => btnDelete.Enabled; set => btnDelete.Enabled = Convert.ToBoolean(value); }
26 | object ICategory.btnDeleteAll { get => btnDeleteAll.Enabled; set => btnDeleteAll.Enabled = Convert.ToBoolean(value); }
27 | int ICategory.row { get => row; set => row =value; }
28 |
29 | public int row = 0;
30 | public Frm_Category()
31 | {
32 | InitializeComponent();
33 | catPresenter = new CategoryPresenter(this);
34 | }
35 |
36 | private void Frm_Category_Load(object sender, EventArgs e)
37 | {
38 |
39 | catPresenter.AutoNumber();
40 | }
41 |
42 | private void btnAdd_Click(object sender, EventArgs e)
43 | {
44 | if (txtName.Text == "")
45 | {
46 | MessageBox.Show("من فضلك ادخل اسم التصنيف", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
47 | return;
48 | }
49 | bool check = catPresenter.CatInsert();
50 | if (check)
51 | {
52 | catPresenter.AutoNumber();
53 | MessageBox.Show("تم الاضافة");
54 | }
55 | else
56 | {
57 | MessageBox.Show("لم يتم");
58 | }
59 | }
60 |
61 | private void btnSave_Click(object sender, EventArgs e)
62 | {
63 | if (txtName.Text == "")
64 | {
65 | MessageBox.Show("من فضلك ادخل اسم التصنيف", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
66 | return;
67 | }
68 | bool check = catPresenter.CatUpdate();
69 | if (check)
70 | {
71 | catPresenter.AutoNumber();
72 | MessageBox.Show("تم التعديل");
73 | }
74 | else
75 | {
76 | MessageBox.Show("لم يتم التعديل");
77 | }
78 | }
79 |
80 | private void btnDelete_Click(object sender, EventArgs e)
81 | {
82 | bool check = catPresenter.CatDelete();
83 | if (check)
84 | {
85 | catPresenter.AutoNumber();
86 | MessageBox.Show("تم المسح");
87 | }
88 | else
89 | {
90 | MessageBox.Show("لم يتم المسح");
91 | }
92 | }
93 |
94 | private void btnDeleteAll_Click(object sender, EventArgs e)
95 | {
96 | bool check = catPresenter.CatDeleteAll();
97 | if (check)
98 | {
99 | catPresenter.AutoNumber();
100 | MessageBox.Show("تم مسح كل البيانات");
101 | }
102 | else
103 | {
104 | MessageBox.Show("لم يتم المسح");
105 | }
106 | }
107 |
108 | private void btnNew_Click(object sender, EventArgs e)
109 | {
110 | catPresenter.clearFileds();
111 | catPresenter.AutoNumber();
112 | }
113 |
114 | private void btnFirst_Click(object sender, EventArgs e)
115 | {
116 | row = 0;
117 | catPresenter.getRow(row);
118 | }
119 |
120 | private void btnPervios_Click(object sender, EventArgs e)
121 | {
122 | int countRow = Convert.ToInt32(catPresenter.getLastRow().Rows[0][0]) - 1;
123 | if (row == 0)
124 | {
125 | row = countRow;
126 | }
127 | else
128 | {
129 | row = row - 1;
130 | }
131 | catPresenter.getRow(row);
132 | }
133 |
134 | private void btnNext_Click(object sender, EventArgs e)
135 | {
136 | try
137 | {
138 | int countRow = Convert.ToInt32(catPresenter.getLastRow().Rows[0][0]);
139 |
140 | if (countRow == row)
141 | {
142 | row = 0;
143 | }
144 | else
145 | {
146 | row = row + 1;
147 | }
148 | catPresenter.getRow(row);
149 | }
150 | catch (Exception) { }
151 | }
152 |
153 | private void btnLast_Click(object sender, EventArgs e)
154 | {
155 | try
156 | {
157 | int countLastrow = Convert.ToInt32(catPresenter.getLastRow().Rows[0][0]) - 1;
158 |
159 | row = countLastrow;
160 | catPresenter.getRow(row);
161 | }
162 | catch (Exception ex) { MessageBox.Show(ex.Message); }
163 | }
164 | }
165 | }
166 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_Country.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Presenter;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace Library_MVP.Views.Forms
14 | {
15 | public partial class Frm_Country : Form ,ICountry
16 | {
17 | CountryPresenter countryPresenter;
18 | public Frm_Country()
19 | {
20 | InitializeComponent();
21 | countryPresenter = new CountryPresenter(this);
22 | }
23 |
24 | public int ID { get => Convert.ToInt32(txtID.Text); set => txtID.Text =value.ToString(); }
25 | public string CountryName { get => txtName.Text; set => txtName.Text = value.ToString(); }
26 | public object dataGridView { get => Dgv.DataSource; set => Dgv.DataSource = value ; }
27 | int ICountry.row { get => row; set => row = value; }
28 | object ICountry.btnAdd { get => btnAdd.Enabled; set => btnAdd.Enabled =Convert.ToBoolean( value); }
29 | object ICountry.btnNew { get => btnNew.Enabled; set => btnNew.Enabled = Convert.ToBoolean(value); }
30 | object ICountry.btnSave { get => btnSave.Enabled; set => btnSave.Enabled = Convert.ToBoolean(value); }
31 | object ICountry.btnDelete { get => btnDelete.Enabled; set => btnDelete.Enabled = Convert.ToBoolean(value); }
32 | object ICountry.btnDeleteAll { get => btnDeleteAll.Enabled; set => btnDeleteAll.Enabled = Convert.ToBoolean(value); }
33 |
34 | int row = 0;
35 | private void btnAdd_Click(object sender, EventArgs e)
36 | {
37 | if(txtName.Text == "")
38 | {
39 | MessageBox.Show("من فضلك ادخل اسم الدولة" ,"تاكيد",MessageBoxButtons.OK ,MessageBoxIcon.Information);
40 | return;
41 | }
42 | bool check = countryPresenter.countInsert();
43 | if (check)
44 | {
45 | MessageBox.Show("تم الاضافة");
46 | }
47 | else
48 | {
49 | MessageBox.Show("لم يتم");
50 | }
51 | }
52 |
53 | private void btnSave_Click(object sender, EventArgs e)
54 | {
55 | if (txtName.Text == "")
56 | {
57 | MessageBox.Show("من فضلك ادخل اسم الدولة", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
58 | return;
59 | }
60 | bool check = countryPresenter.countUpdate();
61 | if (check)
62 | {
63 | MessageBox.Show("تم التعديل");
64 | }
65 | else
66 | {
67 | MessageBox.Show("لم يتم");
68 | }
69 | }
70 |
71 | private void btnDelete_Click(object sender, EventArgs e)
72 | {
73 | bool check = countryPresenter.countDelete();
74 | if (check)
75 | {
76 | MessageBox.Show("تم المسح");
77 | }
78 | else
79 | {
80 | MessageBox.Show("لم يتم");
81 | }
82 | }
83 |
84 | private void btnDeleteAll_Click(object sender, EventArgs e)
85 | {
86 | bool check = countryPresenter.countDeleteAll();
87 | if (check)
88 | {
89 | MessageBox.Show("تم المسح");
90 | }
91 | else
92 | {
93 | MessageBox.Show("لم يتم");
94 | }
95 | }
96 |
97 | private void btnNew_Click(object sender, EventArgs e)
98 | {
99 | countryPresenter.clearFiled();
100 | countryPresenter.AutoNumber();
101 | }
102 |
103 | private void Frm_Country_Load(object sender, EventArgs e)
104 | {
105 | countryPresenter.getAllData();
106 | countryPresenter.AutoNumber();
107 |
108 | }
109 |
110 | private void btnFirst_Click(object sender, EventArgs e)
111 | {
112 | row = 0;
113 | countryPresenter.getRow(row);
114 | }
115 |
116 | private void btnNext_Click(object sender, EventArgs e)
117 | { try
118 | {
119 | int countRow = Convert.ToInt32(countryPresenter.getLastRow().Rows[0][0]);
120 |
121 | if (countRow == row)
122 | {
123 | row = 0;
124 | }
125 | else
126 | {
127 | row = row + 1;
128 | }
129 | countryPresenter.getRow(row);
130 | }
131 | catch (Exception) { }
132 | }
133 |
134 | private void btnPervios_Click(object sender, EventArgs e)
135 | {
136 | int countRow = Convert.ToInt32(countryPresenter.getLastRow().Rows[0][0]) - 1;
137 | if (row == 0)
138 | {
139 | row = countRow;
140 | } else
141 | {
142 | row = row - 1;
143 | }
144 | countryPresenter.getRow(row);
145 | }
146 |
147 | private void btnLast_Click(object sender, EventArgs e)
148 | {
149 | try
150 | {
151 | int countLastrow = Convert.ToInt32(countryPresenter.getLastRow().Rows[0][0]) - 1;
152 |
153 | row = countLastrow;
154 | countryPresenter.getRow(row);
155 | }
156 | catch (Exception ex) { MessageBox.Show(ex.Message); }
157 | }
158 | }
159 | }
160 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/Frm_DarNashr.cs:
--------------------------------------------------------------------------------
1 | using Library_MVP.Logic.Presenter;
2 | using Library_MVP.Views.Interface;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Drawing;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace Library_MVP.Views.Forms
14 | {
15 | public partial class Frm_DarNashr : Form ,IDarNashr
16 | {
17 | DarNashrPersenter darPresenter;
18 | public Frm_DarNashr()
19 | {
20 | InitializeComponent();
21 | darPresenter = new DarNashrPersenter(this);
22 | }
23 | public int ID { get => Convert.ToInt32(txtID.Text); set => txtID.Text = value.ToString(); }
24 | public string DarName { get => txtName.Text; set => txtName.Text = value; }
25 | public int CountryID { get => Convert.ToInt32(cbxCountry.SelectedValue); set => cbxCountry.SelectedValue = value; }
26 | object IDarNashr.Dgv { get => Dgv.DataSource; set => Dgv.DataSource = value; }
27 | object IDarNashr.cbxCountry { get => cbxCountry.DataSource; set => cbxCountry.DataSource = value; }
28 | object IDarNashr.btnAdd { get => btnAdd.Enabled; set => btnAdd.Enabled = Convert.ToBoolean(value); }
29 | object IDarNashr.btnNew { get => btnNew.Enabled; set => btnNew.Enabled = Convert.ToBoolean(value); }
30 | object IDarNashr.btnSave { get => btnSave.Enabled; set => btnSave.Enabled = Convert.ToBoolean(value); }
31 | object IDarNashr.btnDelete { get => btnDelete.Enabled; set => btnDelete.Enabled = Convert.ToBoolean(value); }
32 | object IDarNashr.btnDeleteAll { get => btnDeleteAll.Enabled; set => btnDeleteAll.Enabled = Convert.ToBoolean(value); }
33 | public string DarDisplayMember { get => cbxCountry.DisplayMember; set => cbxCountry.DisplayMember = value; }
34 | public string DarValueMember { get => cbxCountry.ValueMember; set => cbxCountry.ValueMember = value; }
35 | public int selectdIndex { get => cbxCountry.SelectedIndex; set => cbxCountry.SelectedIndex = value; }
36 | public int selectdValue { get => Convert.ToInt32(cbxCountry.SelectedValue); set => cbxCountry.SelectedValue = value; }
37 | public int ROW { get => row; set => row = value; }
38 |
39 | public int row;
40 |
41 |
42 | private void Frm_DarNashr_Load(object sender, EventArgs e)
43 | {
44 | darPresenter.FillCbx();
45 | darPresenter.AutoNumber();
46 | }
47 |
48 | private void cbxCountry_SelectedIndexChanged(object sender, EventArgs e)
49 | {
50 |
51 | }
52 |
53 | private void btnNew_Click(object sender, EventArgs e)
54 | {
55 | darPresenter.AutoNumber();
56 | }
57 |
58 | private void btnAdd_Click(object sender, EventArgs e)
59 | {
60 |
61 |
62 |
63 | if (txtName.Text == "")
64 | {
65 | MessageBox.Show("من فضلك ادخل اسم الدار", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
66 | return;
67 | }
68 | bool check = darPresenter.DarNashrInsert();
69 | if (check)
70 | {
71 | MessageBox.Show("تم الاضافة");
72 | darPresenter.AutoNumber();
73 | }
74 | else
75 | {
76 | MessageBox.Show("لم يتم");
77 | }
78 | }
79 |
80 | private void btnSave_Click(object sender, EventArgs e)
81 | {
82 | if (txtName.Text == "")
83 | {
84 | MessageBox.Show("من فضلك ادخل اسم الدار", "تاكيد", MessageBoxButtons.OK, MessageBoxIcon.Information);
85 | return;
86 | }
87 | bool check = darPresenter.DarnashrUpdate();
88 | if (check)
89 | {
90 | MessageBox.Show("تم التعديل");
91 | darPresenter.AutoNumber();
92 | }
93 | else
94 | {
95 | MessageBox.Show("لم التعديل");
96 | }
97 | }
98 |
99 | private void btnDelete_Click(object sender, EventArgs e)
100 | {
101 | bool check = darPresenter.DarnashrDeleteID();
102 | if (check)
103 | {
104 | MessageBox.Show("تم المسح");
105 | darPresenter.AutoNumber();
106 | }
107 | else
108 | {
109 | MessageBox.Show("لم يتم المسح");
110 | }
111 | }
112 |
113 | private void btnDeleteAll_Click(object sender, EventArgs e)
114 | {
115 | bool check = darPresenter.DarnashrDeleteAll();
116 | if (check)
117 | {
118 | MessageBox.Show("تم المسح");
119 | darPresenter.AutoNumber();
120 | }
121 | else
122 | {
123 | MessageBox.Show("لم يتم المسح");
124 | }
125 | }
126 |
127 | private void btnFirst_Click(object sender, EventArgs e)
128 | {
129 | row = 0;
130 | darPresenter.getRow(row);
131 | }
132 |
133 | private void btnPervios_Click(object sender, EventArgs e)
134 | {
135 | int countRow = Convert.ToInt32(darPresenter.getLastRow().Rows[0][0]) - 1;
136 | if (row == 0)
137 | {
138 | row = countRow;
139 | }
140 | else
141 | {
142 | row = row - 1;
143 | }
144 | darPresenter.getRow(row);
145 | }
146 |
147 | private void btnNext_Click(object sender, EventArgs e)
148 | {
149 | try
150 | {
151 | int countRow = Convert.ToInt32(darPresenter.getLastRow().Rows[0][0]);
152 |
153 | if (countRow == row)
154 | {
155 | row = 0;
156 | }
157 | else
158 | {
159 | row = row + 1;
160 | }
161 | darPresenter.getRow(row);
162 | }
163 | catch (Exception) { }
164 | }
165 |
166 | private void btnLast_Click(object sender, EventArgs e)
167 | {
168 | try
169 | {
170 | int countLastrow = Convert.ToInt32(darPresenter.getLastRow().Rows[0][0]) - 1;
171 |
172 | row = countLastrow;
173 | darPresenter.getRow(row);
174 | }
175 | catch (Exception ex) { MessageBox.Show(ex.Message); }
176 | }
177 | }
178 | }
179 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Forms/RibbonForm1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Linq;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using DevExpress.XtraBars;
11 |
12 | namespace Library_MVP.Views.Forms
13 | {
14 | public partial class RibbonForm1 : DevExpress.XtraBars.Ribbon.RibbonForm
15 | {
16 | public RibbonForm1()
17 | {
18 | InitializeComponent();
19 | }
20 |
21 | private void barButtonItem2_ItemClick(object sender, ItemClickEventArgs e)
22 | {
23 | Frm_Category frm = new Frm_Category();
24 | frm.ShowDialog();
25 | }
26 |
27 | private void barButtonItem4_ItemClick(object sender, ItemClickEventArgs e)
28 | {
29 | Frm_BookPlace frm = new Frm_BookPlace();
30 | frm.ShowDialog();
31 | }
32 |
33 | private void barButtonItem5_ItemClick(object sender, ItemClickEventArgs e)
34 | {
35 | Frm_DarNashr frm = new Frm_DarNashr();
36 | frm.ShowDialog();
37 | }
38 |
39 | private void barButtonItem6_ItemClick(object sender, ItemClickEventArgs e)
40 | {
41 | Frm_Country frm = new Frm_Country();
42 | frm.ShowDialog();
43 | }
44 |
45 | private void barButtonItem3_ItemClick(object sender, ItemClickEventArgs e)
46 | {
47 | Frm_Authors frm = new Frm_Authors();
48 | frm.ShowDialog();
49 | }
50 |
51 | private void barButtonItem7_ItemClick(object sender, ItemClickEventArgs e)
52 | {
53 | Frm_BooksData frm = new Frm_BooksData();
54 | frm.ShowDialog();
55 | }
56 |
57 | private void barButtonItem8_ItemClick(object sender, ItemClickEventArgs e)
58 | {
59 | Frm_BooksSearch frm = new Frm_BooksSearch();
60 | frm.ShowDialog();
61 | }
62 |
63 | private void barButtonItem9_ItemClick(object sender, ItemClickEventArgs e)
64 | {
65 | Frm_Borrowers frm = new Frm_Borrowers();
66 | frm.ShowDialog();
67 | }
68 |
69 | private void barButtonItem10_ItemClick(object sender, ItemClickEventArgs e)
70 | {
71 | Frm_Borrow frm = new Frm_Borrow();
72 | frm.ShowDialog();
73 | }
74 | }
75 | }
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Interface/IAuthors.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Views.Interface
8 | {
9 | interface IAuthors
10 | {
11 | int ROW { get; set; }
12 | int ID { get; set; }
13 | string AuthorName { get; set; }
14 | string AuthorDate { get; set; }
15 | int CountryID { get; set; }
16 | object Dgv { get; set; }
17 | object cbxCountry { get; set; }
18 | object btnAdd { get; set; }
19 | object btnNew { get; set; }
20 | object btnSave { get; set; }
21 | object btnDelete { get; set; }
22 | object btnDeleteAll { get; set; }
23 | string AuthorDisplayMember { get; set; }
24 | string AuthorValueMember { get; set; }
25 | int selectdIndex { get; set; }
26 | int selectdValue { get; set; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Interface/IBookPlace.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Views.Interface
8 | {
9 | interface IBookPlace
10 | {
11 | int ID { get; set; }
12 | int row { get; set; }
13 | string CatName { get; set; }
14 | object dGVPlace { get; set; }
15 | object btnAdd { get; set; }
16 | object btnNew { get; set; }
17 | object btnSave { get; set; }
18 | object btnDelete { get; set; }
19 | object btnDeleteAll { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Interface/IBooksData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Views.Interface
8 | {
9 | interface IBooksData
10 | {
11 | int ROW { get; set; }
12 | int ID { get; set; }
13 | string BookName { get; set; }
14 | int CatID { get; set; }
15 | int AuthorID { get; set; }
16 | int CountryID { get; set; }
17 | int DarID { get; set; }
18 | string SubCat { get; set; }
19 | string Date { get; set; }
20 | int PageNumbers { get; set; }
21 | int PlcaeID { get; set; }
22 | string BookStatu { get; set; }
23 | decimal BookPrice { get; set; }
24 | string Notes { get; set; }
25 | //this variables to store cbxDataSource Properties
26 | object cbxCountry { get; set; }
27 | object cbxCat { get; set; }
28 | object cbxPlace { get; set; }
29 | object cbxDarNashr{ get; set; }
30 | object cbxBooks { get; set; }
31 | object cbxAuthores { get; set; }
32 |
33 | //this variables to store DisplayMember and Value Member in cbx
34 | string cbxCountryDisplayMember { get; set; }
35 | string cbxCountryValueMember { get; set; }
36 | string cbxCatDisplayMember { get; set; }
37 | string cbxCatValueMember { get; set; }
38 | string cbxPlaceDisplayMember { get; set; }
39 | string cbxPlaceValueMember { get; set; }
40 | string cbxDarNashrDisplayMember { get; set; }
41 | string cbxDarNashrValueMember { get; set; }
42 | string cbxBooksDisplayMember { get; set; }
43 | string cbxBooksValueMember { get; set; }
44 | string cbxAuthoresValueMember { get; set; }
45 | string cbxAuthoresDisplayMember { get; set; }
46 | //this variables to store selected value and selected index in cbx
47 | int cbxCountryselectdIndex { get; set; }
48 | int cbxCountryselectdValue { get; set; }
49 | int cbxCatselectdIndex { get; set; }
50 | int cbxCatselectdValue { get; set; }
51 | int cbxPlaceselectdIndex { get; set; }
52 | int cbxPlaceselectdValue { get; set; }
53 | int cbxDarNashrselectdIndex { get; set; }
54 | int cbxDarNashrselectdValue { get; set; }
55 | int cbxBooksselectdIndex { get; set; }
56 | int cbxBooksselectdValue { get; set; }
57 |
58 |
59 | bool btnAdd { get; set; }
60 | bool btnNew { get; set; }
61 | bool btnSave { get; set; }
62 | bool btnDelete { get; set; }
63 | bool btnDeleteAll { get; set; }
64 |
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Interface/IBooksSearch.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Views.Interface
8 | {
9 | interface IBooksSearch
10 | {
11 | object dGVSearch { get; set; }
12 | int bookID { get; set; }
13 | int catID { get; set; }
14 | object cbxBooks { get; set; }
15 |
16 | string cbxBooksDisplayMember { get; set; }
17 | string cbxBooksValueMember { get; set; }
18 |
19 |
20 | object cbxCat{ get; set; }
21 | string cbxCatDisplayMember { get; set; }
22 | string cbxCatValueMember { get; set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Interface/IBorrow.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Views.Interface
8 | {
9 | interface IBorrow
10 | {
11 | int ID { get; set; }
12 | int ROW { get; set; }
13 | int BookID { get; set; }
14 | int BorrowerID { get; set; }
15 |
16 | string StartDate { get; set; }
17 | string EndDate { get; set; }
18 | string Notes { get; set; }
19 |
20 |
21 | object btnAdd { get; set; }
22 | object btnNew { get; set; }
23 | object btnSave { get; set; }
24 | object btnDelete { get; set; }
25 | object btnDeleteAll { get; set; }
26 |
27 |
28 | object cbxBorrowDatasource { get; set; }
29 | string BorrowDisplayMember { get; set; }
30 | string BorrowValueMember { get; set; }
31 | int selectdIndexBorrow { get; set; }
32 |
33 |
34 | object cbxBooksDatasource { get; set; }
35 | string BookDisplayMember { get; set; }
36 | string BookValueMember { get; set; }
37 | int selectdIndexBook { get; set; }
38 |
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Interface/IBorrowers.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Views.Interface
8 | {
9 | interface IBorrowers
10 | {
11 | int ID { get; set; }
12 | int row { get; set; }
13 | string Name { get; set; }
14 | string Phone { get; set; }
15 |
16 | string Address { get; set; }
17 |
18 | string Notes { get; set; }
19 |
20 |
21 | object btnAdd { get; set; }
22 | object btnNew { get; set; }
23 | object btnSave { get; set; }
24 | object btnDelete { get; set; }
25 | object btnDeleteAll { get; set; }
26 |
27 |
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Interface/ICategory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Views.Interface
8 | {
9 | public interface ICategory
10 | {
11 | int ID { get; set; }
12 | int row { get; set; }
13 | string CatName { get; set; }
14 | object dGVCat { get; set; }
15 | object btnAdd { get; set; }
16 | object btnNew { get; set; }
17 | object btnSave { get; set; }
18 | object btnDelete { get; set; }
19 | object btnDeleteAll { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Interface/ICountry.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Views.Interface
8 | {
9 | public interface ICountry
10 | {
11 | int ID { get; set; }
12 | int row { get; set; }
13 | string CountryName { get; set; }
14 | object dataGridView { get; set; }
15 | object btnAdd { get; set; }
16 | object btnNew { get; set; }
17 | object btnSave { get; set; }
18 | object btnDelete { get; set; }
19 | object btnDeleteAll { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/Views/Interface/IDarNashr.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Library_MVP.Views.Interface
8 | {
9 | interface IDarNashr
10 | {
11 | int ROW { get; set; }
12 | int ID { get; set; }
13 | string DarName { get; set; }
14 | int CountryID { get; set; }
15 | object Dgv { get; set; }
16 | object cbxCountry { get; set; }
17 | object btnAdd { get; set; }
18 | object btnNew { get; set; }
19 | object btnSave { get; set; }
20 | object btnDelete { get; set; }
21 | object btnDeleteAll { get; set; }
22 | string DarDisplayMember { get; set; }
23 | string DarValueMember { get; set; }
24 | int selectdIndex { get; set; }
25 | int selectdValue { get; set; }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/DevExpress.Data.v18.1.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/DevExpress.Data.v18.1.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/DevExpress.Pdf.v18.1.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/DevExpress.Pdf.v18.1.Core.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/DevExpress.Printing.v18.1.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/DevExpress.Printing.v18.1.Core.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/DevExpress.Sparkline.v18.1.Core.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/DevExpress.Sparkline.v18.1.Core.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/DevExpress.Utils.v18.1.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/DevExpress.Utils.v18.1.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/DevExpress.XtraBars.v18.1.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/DevExpress.XtraBars.v18.1.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/DevExpress.XtraEditors.v18.1.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/DevExpress.XtraEditors.v18.1.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/Library MVP.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/Library MVP.exe
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/Library MVP.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | .\SQLExpress
15 |
16 |
17 | Library
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/Library MVP.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/Library MVP.pdb
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/de/DevExpress.Data.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/de/DevExpress.Data.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/de/DevExpress.Pdf.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/de/DevExpress.Pdf.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/de/DevExpress.Printing.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/de/DevExpress.Printing.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/de/DevExpress.Sparkline.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/de/DevExpress.Sparkline.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/de/DevExpress.Utils.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/de/DevExpress.Utils.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/de/DevExpress.XtraBars.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/de/DevExpress.XtraBars.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/de/DevExpress.XtraEditors.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/de/DevExpress.XtraEditors.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/es/DevExpress.Data.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/es/DevExpress.Data.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/es/DevExpress.Pdf.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/es/DevExpress.Pdf.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/es/DevExpress.Printing.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/es/DevExpress.Printing.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/es/DevExpress.Sparkline.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/es/DevExpress.Sparkline.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/es/DevExpress.Utils.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/es/DevExpress.Utils.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/es/DevExpress.XtraBars.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/es/DevExpress.XtraBars.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/es/DevExpress.XtraEditors.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/es/DevExpress.XtraEditors.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ja/DevExpress.Data.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ja/DevExpress.Data.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ja/DevExpress.Pdf.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ja/DevExpress.Pdf.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ja/DevExpress.Printing.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ja/DevExpress.Printing.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ja/DevExpress.Sparkline.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ja/DevExpress.Sparkline.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ja/DevExpress.Utils.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ja/DevExpress.Utils.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ja/DevExpress.XtraBars.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ja/DevExpress.XtraBars.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ja/DevExpress.XtraEditors.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ja/DevExpress.XtraEditors.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ru/DevExpress.Data.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ru/DevExpress.Data.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ru/DevExpress.Pdf.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ru/DevExpress.Pdf.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ru/DevExpress.Printing.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ru/DevExpress.Printing.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ru/DevExpress.Sparkline.v18.1.Core.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ru/DevExpress.Sparkline.v18.1.Core.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ru/DevExpress.Utils.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ru/DevExpress.Utils.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ru/DevExpress.XtraBars.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ru/DevExpress.XtraBars.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/bin/Debug/ru/DevExpress.XtraEditors.v18.1.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/bin/Debug/ru/DevExpress.XtraEditors.v18.1.resources.dll
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/DesignTimeResolveAssemblyReferences.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/DesignTimeResolveAssemblyReferences.cache
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library MVP.csproj.CopyComplete:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library MVP.csproj.CopyComplete
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library MVP.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 28c6e5d98ae177295969c06c1e9acfbc90946559
2 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library MVP.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\Library MVP.exe.config
2 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\Library MVP.exe
3 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\Library MVP.pdb
4 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library MVP.csprojResolveAssemblyReference.cache
5 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Properties.Resources.resources
6 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library MVP.csproj.GenerateResource.Cache
7 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library MVP.csproj.CoreCompileInputs.cache
8 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library MVP.exe
9 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library MVP.pdb
10 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Views.Forms.RibbonForm1.resources
11 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library MVP.exe.licenses
12 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.Data.v18.1.dll
13 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.Printing.v18.1.Core.dll
14 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.Utils.v18.1.dll
15 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.XtraBars.v18.1.dll
16 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.XtraEditors.v18.1.dll
17 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.Pdf.v18.1.Core.dll
18 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.Sparkline.v18.1.Core.dll
19 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.Data.v18.1.xml
20 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.Printing.v18.1.Core.xml
21 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.Utils.v18.1.xml
22 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.XtraBars.v18.1.xml
23 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.XtraEditors.v18.1.xml
24 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.Pdf.v18.1.Core.xml
25 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\DevExpress.Sparkline.v18.1.Core.xml
26 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\de\DevExpress.Data.v18.1.resources.dll
27 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\es\DevExpress.Data.v18.1.resources.dll
28 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ja\DevExpress.Data.v18.1.resources.dll
29 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ru\DevExpress.Data.v18.1.resources.dll
30 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\de\DevExpress.Printing.v18.1.Core.resources.dll
31 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\es\DevExpress.Printing.v18.1.Core.resources.dll
32 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ja\DevExpress.Printing.v18.1.Core.resources.dll
33 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ru\DevExpress.Printing.v18.1.Core.resources.dll
34 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\de\DevExpress.Utils.v18.1.resources.dll
35 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\es\DevExpress.Utils.v18.1.resources.dll
36 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ja\DevExpress.Utils.v18.1.resources.dll
37 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ru\DevExpress.Utils.v18.1.resources.dll
38 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\de\DevExpress.XtraBars.v18.1.resources.dll
39 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\es\DevExpress.XtraBars.v18.1.resources.dll
40 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ja\DevExpress.XtraBars.v18.1.resources.dll
41 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ru\DevExpress.XtraBars.v18.1.resources.dll
42 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\de\DevExpress.XtraEditors.v18.1.resources.dll
43 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\es\DevExpress.XtraEditors.v18.1.resources.dll
44 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ja\DevExpress.XtraEditors.v18.1.resources.dll
45 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ru\DevExpress.XtraEditors.v18.1.resources.dll
46 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\de\DevExpress.Pdf.v18.1.Core.resources.dll
47 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\es\DevExpress.Pdf.v18.1.Core.resources.dll
48 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ja\DevExpress.Pdf.v18.1.Core.resources.dll
49 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ru\DevExpress.Pdf.v18.1.Core.resources.dll
50 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\de\DevExpress.Sparkline.v18.1.Core.resources.dll
51 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\es\DevExpress.Sparkline.v18.1.Core.resources.dll
52 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ja\DevExpress.Sparkline.v18.1.Core.resources.dll
53 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\bin\Debug\ru\DevExpress.Sparkline.v18.1.Core.resources.dll
54 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Views.Forms.Frm_Category.resources
55 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Views.Forms.Frm_BookPlace.resources
56 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Views.Forms.Frm_DarNashr.resources
57 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Views.Forms.Frm_Authors.resources
58 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Views.Forms.Frm_Country.resources
59 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Views.Forms.Frm_BooksData.resources
60 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Views.Forms.Frm_BooksSearch.resources
61 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Views.Forms.Frm_Borrowers.resources
62 | E:\الدورة المتقدمة C#+SQL Server Useing MVP+Git\sorse code\Library MVP\Library MVP\obj\Debug\Library_MVP.Views.Forms.Frm_Borrow.resources
63 |
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library MVP.csproj.GenerateResource.Cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library MVP.csproj.GenerateResource.Cache
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library MVP.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library MVP.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library MVP.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library MVP.exe
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library MVP.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library MVP.pdb
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Properties.Resources.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Properties.Resources.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_Authors.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_Authors.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_BookPlace.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_BookPlace.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_BooksData.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_BooksData.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_BooksSearch.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_BooksSearch.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_Borrow.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_Borrow.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_Borrowers.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_Borrowers.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_Category.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_Category.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_Country.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_Country.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_DarNashr.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.Frm_DarNashr.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.RibbonForm1.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/Library_MVP.Views.Forms.RibbonForm1.resources
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/Library MVP/Library MVP/obj/Debug/library mvp.exe.licenses:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/Library MVP/Library MVP/obj/Debug/library mvp.exe.licenses
--------------------------------------------------------------------------------
/sqlscript.sql:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bakrgit/Library-MVP/17057805536f475ba3d0bcee64c8b121307d27de/sqlscript.sql
--------------------------------------------------------------------------------