diff --git a/2.ScriptingDB - QLTC/createDBQLTC.cmd b/2.ScriptingDB - QLTC/createDBQLTC.cmd new file mode 100644 index 0000000..3254dc7 --- /dev/null +++ b/2.ScriptingDB - QLTC/createDBQLTC.cmd @@ -0,0 +1 @@ +SQLCMD -S LAPTOP-OEP3MKUV\SQLSERVER -E -i createDBQLTC.sql \ No newline at end of file diff --git a/2.ScriptingDB - QLTC/createDBQLTC.sql b/2.ScriptingDB - QLTC/createDBQLTC.sql new file mode 100644 index 0000000..77872a5 Binary files /dev/null and b/2.ScriptingDB - QLTC/createDBQLTC.sql differ diff --git a/Project1/.vs/Project1/v15/.suo b/Project1/.vs/Project1/v15/.suo new file mode 100644 index 0000000..66c866b Binary files /dev/null and b/Project1/.vs/Project1/v15/.suo differ diff --git a/Project1/.vs/Project1/v15/Server/sqlite3/db.lock b/Project1/.vs/Project1/v15/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/Project1/.vs/Project1/v15/Server/sqlite3/storage.ide b/Project1/.vs/Project1/v15/Server/sqlite3/storage.ide new file mode 100644 index 0000000..b3a6ff4 Binary files /dev/null and b/Project1/.vs/Project1/v15/Server/sqlite3/storage.ide differ diff --git a/Project1/.vs/Project1/v15/Server/sqlite3/storage.ide-shm b/Project1/.vs/Project1/v15/Server/sqlite3/storage.ide-shm new file mode 100644 index 0000000..a04ec13 Binary files /dev/null and b/Project1/.vs/Project1/v15/Server/sqlite3/storage.ide-shm differ diff --git a/Project1/.vs/Project1/v15/Server/sqlite3/storage.ide-wal b/Project1/.vs/Project1/v15/Server/sqlite3/storage.ide-wal new file mode 100644 index 0000000..11f5cf5 Binary files /dev/null and b/Project1/.vs/Project1/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Project1/Project1.sln b/Project1/Project1.sln new file mode 100644 index 0000000..a9d6519 --- /dev/null +++ b/Project1/Project1.sln @@ -0,0 +1,50 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.572 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TreeDTO", "TreeDTO\TreeDTO.csproj", "{50F163AC-6F49-4BB6-878E-367E860916E3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TreeDAL", "TreeDAL\TreeDAL.csproj", "{79CBB65F-82B2-4B6B-A3CD-1D304E8A3593}" + ProjectSection(ProjectDependencies) = postProject + {50F163AC-6F49-4BB6-878E-367E860916E3} = {50F163AC-6F49-4BB6-878E-367E860916E3} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TreeBUS", "TreeBUS\TreeBUS.csproj", "{1C0BC645-0B59-4AD1-AFB4-814741A61083}" + ProjectSection(ProjectDependencies) = postProject + {79CBB65F-82B2-4B6B-A3CD-1D304E8A3593} = {79CBB65F-82B2-4B6B-A3CD-1D304E8A3593} + {50F163AC-6F49-4BB6-878E-367E860916E3} = {50F163AC-6F49-4BB6-878E-367E860916E3} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TreeGUI", "TreeGUI\TreeGUI.csproj", "{7F61A8FD-BE78-4A76-9DB3-D8D829466B26}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {50F163AC-6F49-4BB6-878E-367E860916E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50F163AC-6F49-4BB6-878E-367E860916E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50F163AC-6F49-4BB6-878E-367E860916E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50F163AC-6F49-4BB6-878E-367E860916E3}.Release|Any CPU.Build.0 = Release|Any CPU + {79CBB65F-82B2-4B6B-A3CD-1D304E8A3593}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79CBB65F-82B2-4B6B-A3CD-1D304E8A3593}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79CBB65F-82B2-4B6B-A3CD-1D304E8A3593}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79CBB65F-82B2-4B6B-A3CD-1D304E8A3593}.Release|Any CPU.Build.0 = Release|Any CPU + {1C0BC645-0B59-4AD1-AFB4-814741A61083}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C0BC645-0B59-4AD1-AFB4-814741A61083}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C0BC645-0B59-4AD1-AFB4-814741A61083}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C0BC645-0B59-4AD1-AFB4-814741A61083}.Release|Any CPU.Build.0 = Release|Any CPU + {7F61A8FD-BE78-4A76-9DB3-D8D829466B26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F61A8FD-BE78-4A76-9DB3-D8D829466B26}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F61A8FD-BE78-4A76-9DB3-D8D829466B26}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F61A8FD-BE78-4A76-9DB3-D8D829466B26}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {596B0D12-9980-4DC3-BF7C-C0A84C08AA81} + EndGlobalSection +EndGlobal diff --git a/Project1/TreeBUS/BCCSThangBUS.cs b/Project1/TreeBUS/BCCSThangBUS.cs new file mode 100644 index 0000000..20d8d55 --- /dev/null +++ b/Project1/TreeBUS/BCCSThangBUS.cs @@ -0,0 +1,29 @@ +using System; +using TreeDTO; +using TreeDAL; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class BCCSThangBUS + { + private BCCSThangDAL ChiphiDAL; + + public BCCSThangBUS() + { + ChiphiDAL = new BCCSThangDAL(); + } + public bool them(BCCSThangDTO thang) + { + bool result = ChiphiDAL.themChiPhi(thang); + return result; + } + public List select() + { + return ChiphiDAL.selectChiPhi(); + } + } +} diff --git a/Project1/TreeBUS/BCTinhTrangBUS.cs b/Project1/TreeBUS/BCTinhTrangBUS.cs new file mode 100644 index 0000000..6286e66 --- /dev/null +++ b/Project1/TreeBUS/BCTinhTrangBUS.cs @@ -0,0 +1,30 @@ +using System; +using TreeDTO; +using TreeDAL; +using System.Collections.Generic; + +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class BCTinhTrangBUS + { + private BCTinhTrangDAL tinhTrangDAL; + + public BCTinhTrangBUS() + { + tinhTrangDAL = new BCTinhTrangDAL(); + } + public bool them(BCTinhTrangDTO thang) + { + bool result = tinhTrangDAL.themBCTT(thang); + return result; + } + public List select() + { + return tinhTrangDAL.selectBCTT(); + } + } +} diff --git a/Project1/TreeBUS/BaoCaoBUS.cs b/Project1/TreeBUS/BaoCaoBUS.cs new file mode 100644 index 0000000..a664dec --- /dev/null +++ b/Project1/TreeBUS/BaoCaoBUS.cs @@ -0,0 +1,29 @@ +using TreeDTO; +using TreeDAL; +using System; + +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class BaoCaoBUS + { + private BaoCaoDAL bcDAL; + public BaoCaoBUS() + { + bcDAL = new BaoCaoDAL(); + + } + public void BCchamsoc(VattuDTO vattu) + { + bcDAL.BCchamsoc(vattu); + } + public void BCcay(CaycanhDTO tree) + { + bcDAL.BCcay(tree); + } + } +} diff --git a/Project1/TreeBUS/CayCanhBUS.cs b/Project1/TreeBUS/CayCanhBUS.cs new file mode 100644 index 0000000..0b603a8 --- /dev/null +++ b/Project1/TreeBUS/CayCanhBUS.cs @@ -0,0 +1,47 @@ +using TreeDTO; +using TreeDAL; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class CayCanhBUS + { + private CayCanhDAL CayDAL; + + public CayCanhBUS() + { + CayDAL = new CayCanhDAL(); + } + public bool them(CaycanhDTO cayCanh) + { + bool result = CayDAL.themCay(cayCanh); + return result; + } + + public bool xoaCay(CaycanhDTO cayCanh) + { + bool result = CayDAL.xoaCay(cayCanh); + return result; + } + + public bool suaCay(CaycanhDTO cayCanh) + { + bool result = CayDAL.suaCay(cayCanh); + return result; + } + + public List select() + { + return CayDAL.selectCay(); + } + public List selectByKeyWord(string sKeyword) + { + return CayDAL.selectByKeyWord(sKeyword); + } + } +} diff --git a/Project1/TreeBUS/ChamSocThangBUS.cs b/Project1/TreeBUS/ChamSocThangBUS.cs new file mode 100644 index 0000000..47e44f3 --- /dev/null +++ b/Project1/TreeBUS/ChamSocThangBUS.cs @@ -0,0 +1,25 @@ +using System; +using TreeDTO; +using TreeDAL; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class ChamSocThangBUS + { + private ChamSocThangDAL ThangDAL; + + public ChamSocThangBUS() + { + ThangDAL = new ChamSocThangDAL(); + } + public bool them(ChamSocThangDTO thang) + { + bool result = ThangDAL.themThang(thang); + return result; + } + } +} diff --git a/Project1/TreeBUS/DonViTinhBUS.cs b/Project1/TreeBUS/DonViTinhBUS.cs new file mode 100644 index 0000000..cc57db5 --- /dev/null +++ b/Project1/TreeBUS/DonViTinhBUS.cs @@ -0,0 +1,23 @@ +using System; +using TreeDAL; +using TreeDTO; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class DonViTinhBUS + { + private DonViTinhDAL DonviDal; + public DonViTinhBUS() + { + DonviDal = new DonViTinhDAL(); + } + public List selectDonVi() + { + return DonviDal.selectDonViTinh(); + } + } +} diff --git a/Project1/TreeBUS/GiaVatTuBUS.cs b/Project1/TreeBUS/GiaVatTuBUS.cs new file mode 100644 index 0000000..5aaa046 --- /dev/null +++ b/Project1/TreeBUS/GiaVatTuBUS.cs @@ -0,0 +1,40 @@ +using System; +using TreeDAL; +using TreeDTO; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class GiaVatTuBUS + { + private GiaVatTuDAL GVDal; + public GiaVatTuBUS() + { + GVDal = new GiaVatTuDAL(); + } + public bool themGia(GiaVatTuDTO gia) + { + bool result = GVDal.themGia(gia); + return result; + } + + public bool xoaGia(GiaVatTuDTO gia) + { + bool result = GVDal.xoaGia(gia); + return result; + } + + public bool suaGia(GiaVatTuDTO gia) + { + bool result = GVDal.suaGia(gia); + return result; + } + public List selectGiaVat() + { + return GVDal.selectGiaVat(); + } + } +} diff --git a/Project1/TreeBUS/LichChamSocBUS.cs b/Project1/TreeBUS/LichChamSocBUS.cs new file mode 100644 index 0000000..62e4a33 --- /dev/null +++ b/Project1/TreeBUS/LichChamSocBUS.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TreeDTO; +using TreeDAL; + + +namespace TreeBUS +{ + public class LichChamSocBUS + { + private LichChamSocDAL lichDAL; + public LichChamSocBUS() + { + lichDAL = new LichChamSocDAL(); + } + public bool themlich(LichchamsocDTO lich) + { + bool result = lichDAL.themLich(lich); + return result; + } + public List selectByKeyWord(string sKeyword) + { + return lichDAL.selectByKeyWord(sKeyword); + } + } +} diff --git a/Project1/TreeBUS/LoaiCayBUS.cs b/Project1/TreeBUS/LoaiCayBUS.cs new file mode 100644 index 0000000..29e8d1a --- /dev/null +++ b/Project1/TreeBUS/LoaiCayBUS.cs @@ -0,0 +1,24 @@ +using System; +using TreeDAL; +using TreeDTO; + +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class LoaiCayBUS + { + private LoaiCayDAL LCDal; + public LoaiCayBUS() + { + LCDal = new LoaiCayDAL(); + } + public List selectLoaiCay() + { + return LCDal.selectLoaiCay(); + } + } +} diff --git a/Project1/TreeBUS/PhieuMuaVatTuBUS.cs b/Project1/TreeBUS/PhieuMuaVatTuBUS.cs new file mode 100644 index 0000000..87a2641 --- /dev/null +++ b/Project1/TreeBUS/PhieuMuaVatTuBUS.cs @@ -0,0 +1,29 @@ +using TreeDTO; +using TreeDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class PhieuMuaVatTuBUS + { + private PhieuMuaVatTuDAL phieuDal; + public PhieuMuaVatTuBUS() + { + phieuDal = new PhieuMuaVatTuDAL(); + } + public bool themPhieu(PhieuMuaVatTuDTO phieu) + { + bool result = phieuDal.themPhieu(phieu); + return result; + } + + public List selectPhieu() + { + return phieuDal.selectPhieu(); + } + } +} diff --git a/Project1/TreeBUS/Properties/AssemblyInfo.cs b/Project1/TreeBUS/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e6aaa02 --- /dev/null +++ b/Project1/TreeBUS/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TreeBUS")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TreeBUS")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1c0bc645-0b59-4ad1-afb4-814741a61083")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Project1/TreeBUS/TTCayBUS.cs b/Project1/TreeBUS/TTCayBUS.cs new file mode 100644 index 0000000..3051152 --- /dev/null +++ b/Project1/TreeBUS/TTCayBUS.cs @@ -0,0 +1,24 @@ +using System; +using TreeDTO; +using TreeDAL; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class TTCayBUS + { + private TTrangDAL TTDAL; + public TTCayBUS() + { + TTDAL = new TTrangDAL(); + } + public bool themlich(TTCayDTO tt) + { + bool result = TTDAL.themTT(tt); + return result; + } + } +} diff --git a/Project1/TreeBUS/ThamSoBUS.cs b/Project1/TreeBUS/ThamSoBUS.cs new file mode 100644 index 0000000..f526625 --- /dev/null +++ b/Project1/TreeBUS/ThamSoBUS.cs @@ -0,0 +1,29 @@ +using TreeDTO; +using TreeDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class ThamSoBUS + { + private ThamSoDAL ThamsoDAL; + public ThamSoBUS() + { + ThamsoDAL = new ThamSoDAL(); + + } + public bool suaThamSo(ThamSoDTO ThamSo) + { + bool result = ThamsoDAL.suaThamSo(ThamSo); + return result; + } + public List selectThamSo() + { + return ThamsoDAL.selectThamSo(); + } + } +} diff --git a/Project1/TreeBUS/TinhTrangBUS.cs b/Project1/TreeBUS/TinhTrangBUS.cs new file mode 100644 index 0000000..62dc56d --- /dev/null +++ b/Project1/TreeBUS/TinhTrangBUS.cs @@ -0,0 +1,25 @@ +using TreeDTO; +using TreeDAL; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class TinhTrangBUS + { + private TinhTrangDAL TTDal; + public TinhTrangBUS() + { + TTDal = new TinhTrangDAL(); + } + public List selectTT() + { + return TTDal.selectTinhTrang(); + } + } + +} diff --git a/Project1/TreeBUS/TreeBUS.csproj b/Project1/TreeBUS/TreeBUS.csproj new file mode 100644 index 0000000..0c6924d --- /dev/null +++ b/Project1/TreeBUS/TreeBUS.csproj @@ -0,0 +1,72 @@ + + + + + Debug + AnyCPU + {1C0BC645-0B59-4AD1-AFB4-814741A61083} + Library + Properties + TreeBUS + TreeBUS + v4.6.1 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {79cbb65f-82b2-4b6b-a3cd-1d304e8a3593} + TreeDAL + + + {50f163ac-6f49-4bb6-878e-367e860916e3} + TreeDTO + + + + \ No newline at end of file diff --git a/Project1/TreeBUS/VattuBUS.cs b/Project1/TreeBUS/VattuBUS.cs new file mode 100644 index 0000000..c014c12 --- /dev/null +++ b/Project1/TreeBUS/VattuBUS.cs @@ -0,0 +1,42 @@ +using TreeDTO; +using TreeDAL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class VattuBUS + { + private VattuDAL vtDAL; + + public VattuBUS() + { + vtDAL = new VattuDAL(); + } + public bool themvattu(VattuDTO vattu) + { + bool result = vtDAL.themVatTu(vattu); + return result; + } + + public bool xoavattu(VattuDTO vattu) + { + bool result = vtDAL.xoaVatTu(vattu); + return result; + } + + public bool suavattu(VattuDTO vattu) + { + bool result = vtDAL.suaVatTu(vattu); + return result; + } + + public List selectvattu() + { + return vtDAL.selectVatTu(); + } + } +} diff --git a/Project1/TreeBUS/ViTriBUS.cs b/Project1/TreeBUS/ViTriBUS.cs new file mode 100644 index 0000000..a713517 --- /dev/null +++ b/Project1/TreeBUS/ViTriBUS.cs @@ -0,0 +1,40 @@ +using System; +using TreeDAL; +using TreeDTO; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class ViTriBUS + { + private ViTrDAL VTDal; + public ViTriBUS() + { + VTDal = new ViTrDAL(); + } + public bool themViTri(ViTriDTO viTri) + { + bool result = VTDal.themViTri(viTri); + return result; + } + + public bool xoaViTri(ViTriDTO viTri) + { + bool result = VTDal.xoaViTri(viTri); + return result; + } + + public bool suaViTri(ViTriDTO viTri) + { + bool result = VTDal.suaViTri(viTri); + return result; + } + public List selectVT() + { + return VTDal.selectViTri(); + } + } +} diff --git a/Project1/TreeBUS/bin/Debug/TreeBUS.dll b/Project1/TreeBUS/bin/Debug/TreeBUS.dll new file mode 100644 index 0000000..8b59ade Binary files /dev/null and b/Project1/TreeBUS/bin/Debug/TreeBUS.dll differ diff --git a/Project1/TreeBUS/bin/Debug/TreeBUS.pdb b/Project1/TreeBUS/bin/Debug/TreeBUS.pdb new file mode 100644 index 0000000..579eaae Binary files /dev/null and b/Project1/TreeBUS/bin/Debug/TreeBUS.pdb differ diff --git a/Project1/TreeBUS/bin/Debug/TreeDAL.dll b/Project1/TreeBUS/bin/Debug/TreeDAL.dll new file mode 100644 index 0000000..dbbe297 Binary files /dev/null and b/Project1/TreeBUS/bin/Debug/TreeDAL.dll differ diff --git a/Project1/TreeBUS/bin/Debug/TreeDAL.pdb b/Project1/TreeBUS/bin/Debug/TreeDAL.pdb new file mode 100644 index 0000000..968522b Binary files /dev/null and b/Project1/TreeBUS/bin/Debug/TreeDAL.pdb differ diff --git a/Project1/TreeBUS/bin/Debug/TreeDTO.dll b/Project1/TreeBUS/bin/Debug/TreeDTO.dll new file mode 100644 index 0000000..54b049d Binary files /dev/null and b/Project1/TreeBUS/bin/Debug/TreeDTO.dll differ diff --git a/Project1/TreeBUS/bin/Debug/TreeDTO.pdb b/Project1/TreeBUS/bin/Debug/TreeDTO.pdb new file mode 100644 index 0000000..9aa0d42 Binary files /dev/null and b/Project1/TreeBUS/bin/Debug/TreeDTO.pdb differ diff --git a/Project1/TreeBUS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Project1/TreeBUS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..fcc67f8 Binary files /dev/null and b/Project1/TreeBUS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Project1/TreeBUS/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Project1/TreeBUS/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeBUS/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Project1/TreeBUS/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeBUS/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Project1/TreeBUS/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeBUS/obj/Debug/TreeBUS.csproj.CopyComplete b/Project1/TreeBUS/obj/Debug/TreeBUS.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeBUS/obj/Debug/TreeBUS.csproj.CoreCompileInputs.cache b/Project1/TreeBUS/obj/Debug/TreeBUS.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..ad0b2eb --- /dev/null +++ b/Project1/TreeBUS/obj/Debug/TreeBUS.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c4fd6e4416fc784d53000a098cbfe08b24075c06 diff --git a/Project1/TreeBUS/obj/Debug/TreeBUS.csproj.FileListAbsolute.txt b/Project1/TreeBUS/obj/Debug/TreeBUS.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5eb56d1 --- /dev/null +++ b/Project1/TreeBUS/obj/Debug/TreeBUS.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\bin\Debug\TreeBUS.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\bin\Debug\TreeBUS.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\bin\Debug\TreeDAL.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\bin\Debug\TreeDTO.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\bin\Debug\TreeDAL.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\bin\Debug\TreeDTO.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\obj\Debug\TreeBUS.csprojAssemblyReference.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\obj\Debug\TreeBUS.csproj.CoreCompileInputs.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\obj\Debug\TreeBUS.csproj.CopyComplete +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\obj\Debug\TreeBUS.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeBUS\obj\Debug\TreeBUS.pdb diff --git a/Project1/TreeBUS/obj/Debug/TreeBUS.csprojAssemblyReference.cache b/Project1/TreeBUS/obj/Debug/TreeBUS.csprojAssemblyReference.cache new file mode 100644 index 0000000..5d3f7f4 Binary files /dev/null and b/Project1/TreeBUS/obj/Debug/TreeBUS.csprojAssemblyReference.cache differ diff --git a/Project1/TreeBUS/obj/Debug/TreeBUS.dll b/Project1/TreeBUS/obj/Debug/TreeBUS.dll new file mode 100644 index 0000000..8b59ade Binary files /dev/null and b/Project1/TreeBUS/obj/Debug/TreeBUS.dll differ diff --git a/Project1/TreeBUS/obj/Debug/TreeBUS.pdb b/Project1/TreeBUS/obj/Debug/TreeBUS.pdb new file mode 100644 index 0000000..579eaae Binary files /dev/null and b/Project1/TreeBUS/obj/Debug/TreeBUS.pdb differ diff --git a/Project1/TreeDAL/BCCSThangDAL.cs b/Project1/TreeDAL/BCCSThangDAL.cs new file mode 100644 index 0000000..bcbe4fa --- /dev/null +++ b/Project1/TreeDAL/BCCSThangDAL.cs @@ -0,0 +1,111 @@ +using System; +using TreeDTO; +using System.Configuration; +using System.Data.SqlClient; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class BCCSThangDAL + { + private string connectionString; + public BCCSThangDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + public bool themChiPhi(BCCSThangDTO thang) + { + string query = string.Empty; + query += "INSERT INTO [CTCHIPHICHAMSOCTHANG] ([mactchiphithang],[machiphithang],[mavattu],[sophieumua],[tongtrigia],[tyle]) "; + query += "VALUES (@mactchiphithang,@machiphithang,@mavattu,@sophieumua,@tongtrigia,@tyle)"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@mactchiphithang", thang.MaCTChiPhiThangPT); + cmd.Parameters.AddWithValue("@machiphithang", thang.MaChiPhiThangPT); + cmd.Parameters.AddWithValue("@mavattu", thang.MaVatTuPT); + cmd.Parameters.AddWithValue("@sophieumua", thang.SoPhieuMuaPT); + cmd.Parameters.AddWithValue("@tongtrigia", thang.TongTriGiaPT); + cmd.Parameters.AddWithValue("@tyle", thang.TyLePT); + + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + public List selectChiPhi() + { + string query = string.Empty; + query += "SELECT[mactchiphithang],[machiphithang],[mavattu],[sophieumua],[tongtrigia],[tyle]"; + query += "FROM [CTCHIPHICHAMSOCTHANG]"; + + List lsChiPhi = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + BCCSThangDTO chiphi = new BCCSThangDTO(); + chiphi.MaCTChiPhiThangPT = reader["mactchiphithang"].ToString(); + chiphi.MaChiPhiThangPT = reader["machiphithang"].ToString(); + chiphi.MaVatTuPT = int.Parse(reader["sophieumua"].ToString()); + chiphi.SoPhieuMuaPT = int.Parse(reader["ngayTrong"].ToString()); + chiphi.TongTriGiaPT= int.Parse(reader["tongtrigia"].ToString()); + chiphi.TyLePT = double.Parse(reader["tyle"].ToString()); + lsChiPhi.Add(chiphi); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsChiPhi; + } + } +} diff --git a/Project1/TreeDAL/BCTinhTrangDAL.cs b/Project1/TreeDAL/BCTinhTrangDAL.cs new file mode 100644 index 0000000..9ce01ed --- /dev/null +++ b/Project1/TreeDAL/BCTinhTrangDAL.cs @@ -0,0 +1,111 @@ +using System; +using TreeDTO; +using System.Configuration; +using System.Data.SqlClient; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class BCTinhTrangDAL + { + private string connectionString; + public BCTinhTrangDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + public bool themBCTT(BCTinhTrangDTO baocao) + { + string query = string.Empty; + query += "INSERT INTO [CTCHIPHICHAMSOCTHANG] ([macttinhtrangcay],[matinhtrangthang],[macay],[maloaicay],[matinhtrang]) "; + query += "VALUES (@macttinhtrangcay,@matinhtrangthang,@macay,@maloaicay,@matinhtrang)"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@macttinhtrangcay", baocao.MaCTTinhTrangCayPT); + cmd.Parameters.AddWithValue("@matinhtrangthang", baocao.MaTinhTrangThangPT); + cmd.Parameters.AddWithValue("@macay", baocao.MaCayPT); + cmd.Parameters.AddWithValue("@maloaicay", baocao.MaLoaiCayPT); + cmd.Parameters.AddWithValue("@matinhtrang", baocao.MaTinhTrangPT); + + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + public List selectBCTT() + { + string query = string.Empty; + query += "SELECT[mactchiphithang],[machiphithang],[mavattu],[sophieumua],[tongtrigia],[tyle]"; + query += "FROM [CTCHIPHICHAMSOCTHANG]"; + + List lsBaoCao = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + BCTinhTrangDTO BaoCao = new BCTinhTrangDTO(); + BaoCao.MaCTTinhTrangCayPT = reader["macttinhtrangcay"].ToString(); + BaoCao.MaTinhTrangThangPT = reader["matinhtrangthang"].ToString(); + BaoCao.MaCayPT = reader["macay"].ToString(); + BaoCao.MaLoaiCayPT = int.Parse(reader["maloaicay"].ToString()); + BaoCao.MaTinhTrangPT = int.Parse(reader["matinhtrang"].ToString()); + + lsBaoCao.Add(BaoCao); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsBaoCao; + } + } +} + diff --git a/Project1/TreeDAL/BaoCaoDAL.cs b/Project1/TreeDAL/BaoCaoDAL.cs new file mode 100644 index 0000000..3c68a44 --- /dev/null +++ b/Project1/TreeDAL/BaoCaoDAL.cs @@ -0,0 +1,41 @@ + +using TreeDTO; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlClient; + +using System; + +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class BaoCaoDAL + { + private string connectionStringBaoCao; + + public BaoCaoDAL() + { + connectionStringBaoCao = ConfigurationManager.AppSettings["ConnectionString"]; + } + + public string ConnectionStringBaoCao + { + get => connectionStringBaoCao; + set => connectionStringBaoCao = value; + } + //-------------------------------------------------------------------------------------------// + //Phuong Thuc + public void BCchamsoc(VattuDTO tree) + { + + } + public void BCcay(CaycanhDTO tree) + { + + } + + } +} diff --git a/Project1/TreeDAL/CayCanhDAL.cs b/Project1/TreeDAL/CayCanhDAL.cs new file mode 100644 index 0000000..322b7e5 --- /dev/null +++ b/Project1/TreeDAL/CayCanhDAL.cs @@ -0,0 +1,232 @@ +using TreeDTO; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlClient; + +using System; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class CayCanhDAL + { + private string connectionString; + public CayCanhDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + //-------------------------------------------------------------------------------------------// + //Phuong Thuc + + public bool themCay(CaycanhDTO tree) + { + string query = string.Empty; + query += "INSERT INTO [tblCayCanh] ([maCay],[tenCay],[maloaicay],[ngayTrong],[mavitri],[tinhTrang]) "; + query += "VALUES (@maCay,@tenCay,@maloaicay,@ngayTrong,@mavitri,@tinhTrang)"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@maCay", tree.MaCayCanhPT); + cmd.Parameters.AddWithValue("@tenCay", tree.TenCayPT); + cmd.Parameters.AddWithValue("@maloaicay", tree.MaLoaiCayCanhPT); + cmd.Parameters.AddWithValue("@ngayTrong", tree.NgayTrongPT); + cmd.Parameters.AddWithValue("@mavitri", tree.MaViTriPT); + cmd.Parameters.AddWithValue("@tinhTrang", tree.TinhTrangPT); + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + + public bool xoaCay(CaycanhDTO tree) + { + string query = string.Empty; + query += "DELETE FROM tblCayCanh WHERE [maCay] = @maCay"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@maCay", tree.MaCayCanhPT); + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + + } + return true; + } + + public bool suaCay(CaycanhDTO tree) + { + string query = string.Empty; + query += "UPDATE tblCayCanh SET [tenCay] = @tenCay, [maloaicay] = @maloaicay, [ngayTrong] = @ngayTrong, [mavitri] = @mavitri,[tinhTrang] = @tinhTrang WHERE [maCay] = @maCay"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@maCay", tree.MaCayCanhPT); + cmd.Parameters.AddWithValue("@tenCay", tree.TenCayPT); + cmd.Parameters.AddWithValue("@maloaicay", tree.MaLoaiCayCanhPT); + cmd.Parameters.AddWithValue("@ngayTrong", tree.NgayTrongPT); + cmd.Parameters.AddWithValue("@mavitri", tree.MaViTriPT); + cmd.Parameters.AddWithValue("@tinhTrang", tree.TinhTrangPT); + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + + public List selectCay() + { + string query = string.Empty; + query += "SELECT[maCay],[tenCay],[maloaicay],[ngayTrong],[mavitri],[tinhTrang]"; + query += "FROM [tblCayCanh]"; + + List lsCayCanh = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + CaycanhDTO cay = new CaycanhDTO(); + cay.MaCayCanhPT = reader["maCay"].ToString(); + cay.TenCayPT = reader["tenCay"].ToString(); + cay.MaLoaiCayCanhPT = int.Parse(reader["maloaicay"].ToString()); + cay.NgayTrongPT = DateTime.Parse(reader["ngayTrong"].ToString()); + cay.MaViTriPT = int.Parse(reader["mavitri"].ToString()); + cay.TinhTrangPT = int.Parse(reader["tinhTrang"].ToString()); + lsCayCanh.Add(cay); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsCayCanh; + } + public List selectByKeyWord(string sKeyword) + { + string query = string.Empty; + query += " SELECT [maCay],[tenCay],[maloaicay],[ngayTrong],[mavitri],[tinhTrang]"; + query += " FROM [tblCayCanh]"; + query += " WHERE ([maCay] LIKE CONCAT('%',@sKeyword,'%'))"; + + + List lsCayCanh = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@sKeyword", sKeyword); + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + CaycanhDTO cay = new CaycanhDTO(); + cay.MaCayCanhPT = reader["maCay"].ToString(); + cay.TenCayPT = reader["tenCay"].ToString(); + cay.MaLoaiCayCanhPT = int.Parse(reader["maloaicay"].ToString()); + cay.NgayTrongPT = DateTime.Parse(reader["ngayTrong"].ToString()); + cay.MaViTriPT = int.Parse(reader["mavitri"].ToString()); + cay.TinhTrangPT = int.Parse(reader["tinhTrang"].ToString()); + lsCayCanh.Add(cay); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsCayCanh; + } + } +} diff --git a/Project1/TreeDAL/ChamSocThangDAL.cs b/Project1/TreeDAL/ChamSocThangDAL.cs new file mode 100644 index 0000000..b44ec69 --- /dev/null +++ b/Project1/TreeDAL/ChamSocThangDAL.cs @@ -0,0 +1,58 @@ +using System; +using TreeDTO; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class ChamSocThangDAL + { + private string connectionString; + public ChamSocThangDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + public bool themThang(ChamSocThangDTO thang) + { + string query = string.Empty; + query += "INSERT INTO [CHIPHICHAMSOCTHANG] ([machiphithang],[thang]) "; + query += "VALUES (@machiphithang,@thang)"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@machiphithang", thang.MaChiPhiThangPT); + cmd.Parameters.AddWithValue("@thang", thang.ThangPT); + + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + } +} diff --git a/Project1/TreeDAL/DonViTinhDAL.cs b/Project1/TreeDAL/DonViTinhDAL.cs new file mode 100644 index 0000000..d6e18d9 --- /dev/null +++ b/Project1/TreeDAL/DonViTinhDAL.cs @@ -0,0 +1,73 @@ +using TreeDTO; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class DonViTinhDAL + { + private string connectionString; + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + + public DonViTinhDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + + public List selectDonViTinh() + { + string query = string.Empty; + query += "SELECT [madonvitinh], [tendonvitinh]"; + query += "FROM [DONVITINH]"; + + List lsDonViTinh = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + DonViTinhDTO DVT = new DonViTinhDTO(); + DVT.MaDonViTinhPT = int.Parse(reader["madonvitinh"].ToString()); + DVT.TenDonViTinhPT = reader["tendonvitinh"].ToString(); + lsDonViTinh.Add(DVT); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsDonViTinh; + } + } +} diff --git a/Project1/TreeDAL/GiaVatTuDAL.cs b/Project1/TreeDAL/GiaVatTuDAL.cs new file mode 100644 index 0000000..aa5675e --- /dev/null +++ b/Project1/TreeDAL/GiaVatTuDAL.cs @@ -0,0 +1,171 @@ +using TreeDTO; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class GiaVatTuDAL + { + private string connectionString; + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + + public GiaVatTuDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + + public bool themGia(GiaVatTuDTO gia) + { + string query = string.Empty; + query += "INSERT INTO [GIAVATTU] ([magiavattu],[giavattu],[mavattu]) "; + query += "VALUES (@magiavattu,@giavattu,@mavattu)"; + using (SqlConnection con = new SqlConnection(connectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@magiavattu", gia.MaGiaVatTuPT); + cmd.Parameters.AddWithValue("@giavattu", gia.GiaVatTuPT); + cmd.Parameters.AddWithValue("@mavattu", gia.MaVatTuPTGV); + + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + + public bool xoaGia(GiaVatTuDTO Gia) + { + string query = string.Empty; + query += "DELETE FROM GIAVATTU WHERE [mavattu] = @mavattu"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@mavattu", Gia.MaVatTuPTGV); + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + + } + return true; + } + + public bool suaGia(GiaVatTuDTO Gia) + { + string query = string.Empty; + query += "UPDATE GIAVATTU SET [magiavattu] = @magiavattu, [giavattu] = @giavattu WHERE [mavattu] = @mavattu"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@magiavattu", Gia.MaGiaVatTuPT); + cmd.Parameters.AddWithValue("@giavattu", Gia.GiaVatTuPT); + cmd.Parameters.AddWithValue("@mavattu", Gia.MaVatTuPTGV); + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + public List selectGiaVat() + { + string query = string.Empty; + query += "SELECT [magiavattu], [giavattu],[mavattu]"; + query += "FROM [GIAVATTU]"; + + List lsGiaVatTu = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + GiaVatTuDTO GVT = new GiaVatTuDTO(); + GVT.MaGiaVatTuPT = int.Parse(reader["magiavattu"].ToString()); + GVT.GiaVatTuPT = int.Parse(reader["giavattu"].ToString()); + GVT.MaVatTuPTGV = int.Parse(reader["mavattu"].ToString()); + lsGiaVatTu.Add(GVT); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsGiaVatTu; + } + + } +} diff --git a/Project1/TreeDAL/LichChamSocDAL.cs b/Project1/TreeDAL/LichChamSocDAL.cs new file mode 100644 index 0000000..118986c --- /dev/null +++ b/Project1/TreeDAL/LichChamSocDAL.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TreeDTO; +using System.Configuration; +using System.Data.SqlClient; + +namespace TreeDAL +{ + public class LichChamSocDAL + { + private string connectionString; + + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + public LichChamSocDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + public bool themLich(LichchamsocDTO lich) + { + string query = string.Empty; + query += "INSERT INTO [LICHCHAMSOC] ([machamsoc],[thoigian],[mavattu],[madonvitinh],[soluong],[ghichu],[macay],[ngaylaplich])"; + query += "VALUES (@machamsoc,@thoigian,@mavattu,@madonvitinh,@soluong,@ghichu,@macay,@ngaylaplich)"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@machamsoc", lich.MaChamSocPT); + cmd.Parameters.AddWithValue("@thoigian", lich.ThoiGianPT); + cmd.Parameters.AddWithValue("@mavattu", lich.MaVatTuPT); + cmd.Parameters.AddWithValue("@madonvitinh", lich.MaDonViTinhPT); + cmd.Parameters.AddWithValue("@soluong", lich.SoLuongPT); + cmd.Parameters.AddWithValue("@ghichu", lich.GhiChuPT); + cmd.Parameters.AddWithValue("@macay", lich.MaCayPT); + cmd.Parameters.AddWithValue("@ngaylaplich", lich.NgayLapLichPT); + + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + public List selectByKeyWord(string sKeyword) + { + + string query = string.Empty; + query += " SELECT [machamsoc],[thoigian],[mavattu],[madonvitinh],[soluong],[ghichu],[macay],[ngaylaplich]"; + query += " FROM [LICHCHAMSOC]"; + query += " WHERE ([macay] LIKE CONCAT('%',@sKeyword,'%'))"; + + + + List lsLich = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@sKeyword", sKeyword); + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + LichchamsocDTO lich = new LichchamsocDTO(); + lich.MaChamSocPT = reader["machamsoc"].ToString(); + lich.MaVatTuPT = int.Parse(reader["mavattu"].ToString()); + lich.MaDonViTinhPT = int.Parse(reader["madonvitinh"].ToString()); + lich.SoLuongPT = int.Parse(reader["soluong"].ToString()); + lich.ThoiGianPT = long.Parse(reader["thoigian"].ToString()); + lich.GhiChuPT = reader["ghichu"].ToString(); + lich.MaCayPT = reader["macay"].ToString(); + lich.NgayLapLichPT = DateTime.Parse(reader["ngaylaplich"].ToString()); + lsLich.Add(lich); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsLich; + } + } +} diff --git a/Project1/TreeDAL/LoaiCayDAL.cs b/Project1/TreeDAL/LoaiCayDAL.cs new file mode 100644 index 0000000..da55847 --- /dev/null +++ b/Project1/TreeDAL/LoaiCayDAL.cs @@ -0,0 +1,75 @@ +using TreeDTO; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class LoaiCayDAL + { + private string connectionString; + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + + public LoaiCayDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + //Phuong Thuc + + + public List selectLoaiCay() + { + string query = string.Empty; + query += "SELECT [maloaicay], [tenloaicay]"; + query += "FROM [LOAICAY]"; + + List lsLoaiCay = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + LoaiCayDTO LC = new LoaiCayDTO(); + LC.MaLoaiCayPT = int.Parse(reader["maloaicay"].ToString()); + LC.TenLoaiCayPT = reader["tenloaicay"].ToString(); + lsLoaiCay.Add(LC); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsLoaiCay; + } + } +} diff --git a/Project1/TreeDAL/PhieuMuaVatTuDAL.cs b/Project1/TreeDAL/PhieuMuaVatTuDAL.cs new file mode 100644 index 0000000..bf0d56e --- /dev/null +++ b/Project1/TreeDAL/PhieuMuaVatTuDAL.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TreeDTO; +using System.Configuration; +using System.Data.SqlClient; + +namespace TreeDAL +{ + public class PhieuMuaVatTuDAL + { + private string connectionString; + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + public PhieuMuaVatTuDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + public bool themPhieu(PhieuMuaVatTuDTO phieu) + { + string query = string.Empty; + query += "INSERT INTO [PHIEUMUAVATTU] ([maphieumua],[mavattu],[madonvitinh],[diachimua],[soluong],[sotien],[ngaymua])"; + query += "VALUES (@maphieumua,@mavattu,@madonvitinh,@diachimua,@soluong,@sotien,@ngaymua)"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@maphieumua", phieu.PhieuMuaVatTuPT); + cmd.Parameters.AddWithValue("@mavattu", phieu.MaVatTuPT); + cmd.Parameters.AddWithValue("@madonvitinh", phieu.MaDonViTinhPT); + cmd.Parameters.AddWithValue("@diachimua", phieu.DiaChiMuaPT); + cmd.Parameters.AddWithValue("@soluong", phieu.SoLuongPT); + cmd.Parameters.AddWithValue("@sotien", phieu.SoTienPT); + cmd.Parameters.AddWithValue("@ngaymua", phieu.NgayMuaPT); + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + public List selectPhieu() + { + string query = string.Empty; + query += "SELECT[maphieumua],[mavattu],[madonvitinh],[diachimua],[soluong],[sotien],[ngaymua]"; + query += "FROM [PHIEUMUAVATTU]"; + + List lsPhieuMua = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + PhieuMuaVatTuDTO phieu = new PhieuMuaVatTuDTO(); + phieu.PhieuMuaVatTuPT = reader["maphieumua"].ToString(); + phieu.MaVatTuPT = int.Parse(reader["mavattu"].ToString()); + phieu.MaDonViTinhPT = int.Parse(reader["madonvitinh"].ToString()); + phieu.DiaChiMuaPT = reader["diachimua"].ToString(); + phieu.SoLuongPT = int.Parse(reader["soluong"].ToString()); + phieu.SoTienPT = int.Parse(reader["sotien"].ToString()); + phieu.NgayMuaPT = DateTime.Parse(reader["ngaymua"].ToString()); + lsPhieuMua.Add(phieu); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsPhieuMua; + } + } +} diff --git a/Project1/TreeDAL/Properties/AssemblyInfo.cs b/Project1/TreeDAL/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f0374a3 --- /dev/null +++ b/Project1/TreeDAL/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TreeDAL")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TreeDAL")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("79cbb65f-82b2-4b6b-a3cd-1d304e8a3593")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Project1/TreeDAL/TTCayDAL.cs b/Project1/TreeDAL/TTCayDAL.cs new file mode 100644 index 0000000..e57e009 --- /dev/null +++ b/Project1/TreeDAL/TTCayDAL.cs @@ -0,0 +1,60 @@ +using System; +using TreeDTO; +using System.Configuration; +using System.Data.SqlClient; + +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class TTrangDAL + { + private string connectionString; + public TTrangDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + public bool themTT(TTCayDTO TT) + { + string query = string.Empty; + query += "INSERT INTO [TINHTRANGCAYCANH] ([matinhtrangthang],[thangtt]) "; + query += "VALUES (@matinhtrangthang,@thangtt)"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@machiphithang", TT.MaTinhTrangThangPT); + cmd.Parameters.AddWithValue("@thang", TT.ThangTTPT); + + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + } +} + diff --git a/Project1/TreeDAL/ThamSoDAL.cs b/Project1/TreeDAL/ThamSoDAL.cs new file mode 100644 index 0000000..1659fc7 --- /dev/null +++ b/Project1/TreeDAL/ThamSoDAL.cs @@ -0,0 +1,103 @@ +using TreeDTO; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlClient; + +using System; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +namespace TreeDAL +{ + public class ThamSoDAL + { + private string connectionString; + public ThamSoDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + public bool suaThamSo(ThamSoDTO thamso) + { + string query = string.Empty; + query += "UPDATE THAMSO SET [SoLuongCayCanhToiDa] = @SoLuongCayCanhToiDa, [SoTienMuaToiDa] = @SoTienMuaToiDa"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@SoTienMuaToiDa", thamso.SoTienToiDaPT); + cmd.Parameters.AddWithValue("@SoLuongCayCanhToiDa", thamso.SoCayToiDaPT); + + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + + public List selectThamSo() + { + string query = string.Empty; + query += "SELECT[SoTienMuaToiDa],[SoLuongCayCanhToiDa]"; + query += "FROM [THAMSO]"; + + List lsThamSo = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + ThamSoDTO thamSo = new ThamSoDTO(); + thamSo.SoTienToiDaPT = int.Parse(reader["SoTienMuaToiDa"].ToString()); + thamSo.SoCayToiDaPT = int.Parse(reader["SoLuongCayCanhToiDa"].ToString()); + lsThamSo.Add(thamSo); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsThamSo; + } + } +} diff --git a/Project1/TreeDAL/TinhTrangDAL.cs b/Project1/TreeDAL/TinhTrangDAL.cs new file mode 100644 index 0000000..b2dda22 --- /dev/null +++ b/Project1/TreeDAL/TinhTrangDAL.cs @@ -0,0 +1,74 @@ +using System; +using TreeDTO; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class TinhTrangDAL + { + private string connectionString; + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + + public TinhTrangDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + public List selectTinhTrang() + { + string query = string.Empty; + query += "SELECT [matinhtrang], [tentinhtrang]"; + query += "FROM [TINHTRANG]"; + + List lsTinhTrang = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + TinhTrangDTO TT = new TinhTrangDTO(); + TT.MaTinhTrangPT = int.Parse(reader["matinhtrang"].ToString()); + TT.TenTinhTrangPT = reader["tentinhtrang"].ToString(); + lsTinhTrang.Add(TT); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsTinhTrang; + + + } + } +} diff --git a/Project1/TreeDAL/TreeDAL.csproj b/Project1/TreeDAL/TreeDAL.csproj new file mode 100644 index 0000000..e1cd1fb --- /dev/null +++ b/Project1/TreeDAL/TreeDAL.csproj @@ -0,0 +1,70 @@ + + + + + Debug + AnyCPU + {79CBB65F-82B2-4B6B-A3CD-1D304E8A3593} + Library + Properties + TreeDAL + TreeDAL + v4.6.1 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {50f163ac-6f49-4bb6-878e-367e860916e3} + TreeDTO + + + + \ No newline at end of file diff --git a/Project1/TreeDAL/VattuDAL.cs b/Project1/TreeDAL/VattuDAL.cs new file mode 100644 index 0000000..778bbf4 --- /dev/null +++ b/Project1/TreeDAL/VattuDAL.cs @@ -0,0 +1,172 @@ +using TreeDTO; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class VattuDAL + { + private string connectionStringVattu; + + public VattuDAL() + { + connectionStringVattu = ConfigurationManager.AppSettings["ConnectionString"]; + } + + public string ConnectionStringVattu + { + get => connectionStringVattu; + set => connectionStringVattu = value; + } + //-------------------------------------------------------------------------------------------// + //Phuong Thuc + public bool themVatTu(VattuDTO vattu) + { + string query = string.Empty; + query += "INSERT INTO [VATTU] ([mavattu],[tenvattu],[diachiban]) "; + query += "VALUES (@mavattu,@tenvattu,@diachiban)"; + using (SqlConnection con = new SqlConnection(ConnectionStringVattu)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@mavattu", vattu.MaVatTuPT); + cmd.Parameters.AddWithValue("@tenvattu", vattu.TenVatTuPT); + cmd.Parameters.AddWithValue("@diachiban", vattu.DiaChiBanPT); + + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + public bool xoaVatTu(VattuDTO vattu) + { + string query = string.Empty; + query += "DELETE FROM VATTU WHERE [mavattu] = @mavattu"; + using (SqlConnection con = new SqlConnection(ConnectionStringVattu)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@mavattu", vattu.MaVatTuPT); + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + + } + return true; + } + public bool suaVatTu(VattuDTO vattu) + { + string query = string.Empty; + query += "UPDATE VATTU SET [tenvattu] = @tenvattu, [diachiban] = @diachiban WHERE [mavattu] = @mavattu"; + using (SqlConnection con = new SqlConnection(ConnectionStringVattu)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@mavattu", vattu.MaVatTuPT); + cmd.Parameters.AddWithValue("@tenvattu", vattu.TenVatTuPT); + cmd.Parameters.AddWithValue("@diachiban", vattu.DiaChiBanPT); + + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + + public List selectVatTu() + { + string query = string.Empty; + query += "SELECT[mavattu],[tenvattu],[diachiban]"; + query += "FROM [VATTU]"; + + List lsVattu = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionStringVattu)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + VattuDTO vattu = new VattuDTO(); + vattu.MaVatTuPT = int.Parse(reader["mavattu"].ToString()); + vattu.TenVatTuPT = reader["tenvattu"].ToString(); + vattu.DiaChiBanPT = reader["diachiban"].ToString(); + lsVattu.Add(vattu); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsVattu; + } + } +} + diff --git a/Project1/TreeDAL/ViTrDAL.cs b/Project1/TreeDAL/ViTrDAL.cs new file mode 100644 index 0000000..953bc00 --- /dev/null +++ b/Project1/TreeDAL/ViTrDAL.cs @@ -0,0 +1,175 @@ +using TreeDTO; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data.SqlClient; + + +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDAL +{ + public class ViTrDAL + { + private string connectionString; + + public string ConnectionString + { + get { return connectionString; } + set { connectionString = value; } + } + + public ViTrDAL() + { + connectionString = ConfigurationManager.AppSettings["ConnectionString"]; + } + //Phuong Thuc + + public bool themViTri(ViTriDTO vitri) + { + string query = string.Empty; + query += "INSERT INTO [VITRI] ([mavitri],[tenvitri],[soluong])"; + query += "VALUES (@mavitri,@tenvitri,@soluong)"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@mavitri", vitri.MaViTriPT); + cmd.Parameters.AddWithValue("@tenvitri", vitri.TenViTriPT); + cmd.Parameters.AddWithValue("@soluong", vitri.SoLuongPT); + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + + public bool xoaViTri(ViTriDTO vitri) + { + string query = string.Empty; + query += "DELETE FROM VITRI WHERE [mavitri] = @mavitri"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@mavitri", vitri.MaViTriPT); + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + + } + return true; + } + + public bool suaViTri(ViTriDTO vitri) + { + string query = string.Empty; + query += "UPDATE VITRI SET [mavitri] = @mavitri, [tenvitri] = @tenvitri, [soluong] = @soluong WHERE [mavitri] = @mavitri"; + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + cmd.Parameters.AddWithValue("@mavitri", vitri.MaViTriPT); + cmd.Parameters.AddWithValue("@tenvitri", vitri.TenViTriPT); + cmd.Parameters.AddWithValue("@soluong", vitri.SoLuongPT); + try + { + con.Open(); + cmd.ExecuteNonQuery(); + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return false; + } + } + } + return true; + } + + public List selectViTri() + { + string query = string.Empty; + query += "SELECT [mavitri], [tenvitri],[soluong]"; + query += "FROM [VITRI]"; + + List lsViTri = new List(); + + using (SqlConnection con = new SqlConnection(ConnectionString)) + { + + using (SqlCommand cmd = new SqlCommand()) + { + cmd.Connection = con; + cmd.CommandType = System.Data.CommandType.Text; + cmd.CommandText = query; + + try + { + con.Open(); + SqlDataReader reader = null; + reader = cmd.ExecuteReader(); + if (reader.HasRows == true) + { + while (reader.Read()) + { + ViTriDTO VT = new ViTriDTO(); + VT.MaViTriPT = int.Parse(reader["mavitri"].ToString()); + VT.TenViTriPT = reader["tenvitri"].ToString(); + VT.SoLuongPT = int.Parse(reader["soluong"].ToString()); + lsViTri.Add(VT); + } + } + + con.Close(); + con.Dispose(); + } + catch (Exception ex) + { + con.Close(); + return null; + } + } + } + return lsViTri; + + + } + } +} diff --git a/Project1/TreeDAL/ViTriBUS.cs b/Project1/TreeDAL/ViTriBUS.cs new file mode 100644 index 0000000..a713517 --- /dev/null +++ b/Project1/TreeDAL/ViTriBUS.cs @@ -0,0 +1,40 @@ +using System; +using TreeDAL; +using TreeDTO; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeBUS +{ + public class ViTriBUS + { + private ViTrDAL VTDal; + public ViTriBUS() + { + VTDal = new ViTrDAL(); + } + public bool themViTri(ViTriDTO viTri) + { + bool result = VTDal.themViTri(viTri); + return result; + } + + public bool xoaViTri(ViTriDTO viTri) + { + bool result = VTDal.xoaViTri(viTri); + return result; + } + + public bool suaViTri(ViTriDTO viTri) + { + bool result = VTDal.suaViTri(viTri); + return result; + } + public List selectVT() + { + return VTDal.selectViTri(); + } + } +} diff --git a/Project1/TreeDAL/bin/Debug/TreeDAL.dll b/Project1/TreeDAL/bin/Debug/TreeDAL.dll new file mode 100644 index 0000000..dbbe297 Binary files /dev/null and b/Project1/TreeDAL/bin/Debug/TreeDAL.dll differ diff --git a/Project1/TreeDAL/bin/Debug/TreeDAL.pdb b/Project1/TreeDAL/bin/Debug/TreeDAL.pdb new file mode 100644 index 0000000..968522b Binary files /dev/null and b/Project1/TreeDAL/bin/Debug/TreeDAL.pdb differ diff --git a/Project1/TreeDAL/bin/Debug/TreeDTO.dll b/Project1/TreeDAL/bin/Debug/TreeDTO.dll new file mode 100644 index 0000000..54b049d Binary files /dev/null and b/Project1/TreeDAL/bin/Debug/TreeDTO.dll differ diff --git a/Project1/TreeDAL/bin/Debug/TreeDTO.pdb b/Project1/TreeDAL/bin/Debug/TreeDTO.pdb new file mode 100644 index 0000000..9aa0d42 Binary files /dev/null and b/Project1/TreeDAL/bin/Debug/TreeDTO.pdb differ diff --git a/Project1/TreeDAL/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Project1/TreeDAL/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..8865555 Binary files /dev/null and b/Project1/TreeDAL/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Project1/TreeDAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Project1/TreeDAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..1f7c070 Binary files /dev/null and b/Project1/TreeDAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Project1/TreeDAL/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Project1/TreeDAL/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeDAL/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Project1/TreeDAL/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeDAL/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Project1/TreeDAL/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeDAL/obj/Debug/TreeDAL.csproj.CopyComplete b/Project1/TreeDAL/obj/Debug/TreeDAL.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeDAL/obj/Debug/TreeDAL.csproj.CoreCompileInputs.cache b/Project1/TreeDAL/obj/Debug/TreeDAL.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..7da0149 --- /dev/null +++ b/Project1/TreeDAL/obj/Debug/TreeDAL.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c53af2a8acb0483911b303c6a33e4ec5c74bc890 diff --git a/Project1/TreeDAL/obj/Debug/TreeDAL.csproj.FileListAbsolute.txt b/Project1/TreeDAL/obj/Debug/TreeDAL.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..50b4dec --- /dev/null +++ b/Project1/TreeDAL/obj/Debug/TreeDAL.csproj.FileListAbsolute.txt @@ -0,0 +1,9 @@ +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDAL\obj\Debug\TreeDAL.csprojAssemblyReference.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDAL\obj\Debug\TreeDAL.csproj.CoreCompileInputs.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDAL\bin\Debug\TreeDAL.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDAL\bin\Debug\TreeDAL.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDAL\obj\Debug\TreeDAL.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDAL\obj\Debug\TreeDAL.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDAL\bin\Debug\TreeDTO.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDAL\bin\Debug\TreeDTO.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDAL\obj\Debug\TreeDAL.csproj.CopyComplete diff --git a/Project1/TreeDAL/obj/Debug/TreeDAL.csprojAssemblyReference.cache b/Project1/TreeDAL/obj/Debug/TreeDAL.csprojAssemblyReference.cache new file mode 100644 index 0000000..c15ba2e Binary files /dev/null and b/Project1/TreeDAL/obj/Debug/TreeDAL.csprojAssemblyReference.cache differ diff --git a/Project1/TreeDAL/obj/Debug/TreeDAL.dll b/Project1/TreeDAL/obj/Debug/TreeDAL.dll new file mode 100644 index 0000000..dbbe297 Binary files /dev/null and b/Project1/TreeDAL/obj/Debug/TreeDAL.dll differ diff --git a/Project1/TreeDAL/obj/Debug/TreeDAL.pdb b/Project1/TreeDAL/obj/Debug/TreeDAL.pdb new file mode 100644 index 0000000..968522b Binary files /dev/null and b/Project1/TreeDAL/obj/Debug/TreeDAL.pdb differ diff --git a/Project1/TreeDTO/BCCSThangDTO.cs b/Project1/TreeDTO/BCCSThangDTO.cs new file mode 100644 index 0000000..85034bd --- /dev/null +++ b/Project1/TreeDTO/BCCSThangDTO.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class BCCSThangDTO + { + private string mactchiphithang; + private string machiphithang; + private string tenvattu; + private int mavattu; + private int sophieumua; + private long tongtrigia; + private double tyle; + public string MaCTChiPhiThangPT + { + get => mactchiphithang; + set => mactchiphithang = value; + } + public string TenVatTuPT + { + get => tenvattu; + set => tenvattu = value; + } + public string MaChiPhiThangPT + { + get => machiphithang; + set => machiphithang = value; + } + public int MaVatTuPT + { + get => mavattu; + set => mavattu = value; + } + public int SoPhieuMuaPT + { + get => sophieumua; + set => sophieumua = value; + } + public long TongTriGiaPT + { + get => tongtrigia; + set => tongtrigia = value; + } + public double TyLePT + { + get => tyle; + set => tyle = value; + } + } +} diff --git a/Project1/TreeDTO/BCTinhTrangDTO.cs b/Project1/TreeDTO/BCTinhTrangDTO.cs new file mode 100644 index 0000000..8c522f7 --- /dev/null +++ b/Project1/TreeDTO/BCTinhTrangDTO.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class BCTinhTrangDTO + { + private string macttinhtrangcay; + private string matinhtrangthang; + private string macay; + private int maloaicay; + private int matinhtrang; + private DateTime ngaytrong; + private string tenloaicay; + private string tentinhtrang; + private string tencay; + public DateTime NgaytrongPT + { + get => ngaytrong; + set => ngaytrong = value; + } + public string TenLoaiCayPT + { + get => tenloaicay; + set => tenloaicay = value; + } + public string TenTinhTrangPT + { + get => tentinhtrang; + set => tentinhtrang = value; + } + public string TenCayPT + { + get => tencay; + set => tencay = value; + } + public string MaCTTinhTrangCayPT + { + get => macttinhtrangcay; + set => macttinhtrangcay = value; + } + public string MaTinhTrangThangPT + { + get => matinhtrangthang; + set => matinhtrangthang = value; + } + public string MaCayPT + { + get => macay; + set => macay = value; + } + public int MaLoaiCayPT + { + get => maloaicay; + set => maloaicay = value; + } + public int MaTinhTrangPT + { + get => matinhtrang; + set => matinhtrang = value; + } + } +} diff --git a/Project1/TreeDTO/BaoCaoDTO.cs b/Project1/TreeDTO/BaoCaoDTO.cs new file mode 100644 index 0000000..3592565 --- /dev/null +++ b/Project1/TreeDTO/BaoCaoDTO.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class BaoCaoDTO + { + //-------------------------------------------------------------------------// + //Thuoc Tinh + //private int maVatTu; Can Thiet + + + private int soPhieuMua; + + private long tongGiaTriVatTu; + private int tyle; + + + //----------------------------------------------------------------------------// + //Phuong Thuc + //public int Ma { get => ma; set => ma = value; } + + public int SoPhieuMuaPT + { + get => soPhieuMua; + set => soPhieuMua = value; + } + public long TongGiaTriVatTuPT + { + get => tongGiaTriVatTu; + set => tongGiaTriVatTu = value; + } + public int tylePT + { + get => tyle; + set => tyle = value; + } + } +} diff --git a/Project1/TreeDTO/CaycanhDTO.cs b/Project1/TreeDTO/CaycanhDTO.cs new file mode 100644 index 0000000..562278c --- /dev/null +++ b/Project1/TreeDTO/CaycanhDTO.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class CaycanhDTO + { + +//-------------------------------------------------------------------------// +//Thuoc Tinh + private string maCayCanh; //Can Thiet + private string tenCay; + private int tinhTrang; + private DateTime ngayTrong; + private int maloaiCayCanh; + private int mavitri; + private string tenloai; + private string tenvt; + private string tentt; + + //----------------------------------------------------------------------------// + //Phuong Thuc + public string TenTinhTrangPT + { + get => tentt; + set => tentt = value; + } + public string TenLoaiPT + { + get => tenloai; + set => tenloai = value; + } + public string TenViTriPT + { + get => tenvt; + set => tenvt = value; + } + + public string MaCayCanhPT + { + get => maCayCanh; + set => maCayCanh = value; + } + public string TenCayPT { + get => tenCay; + set => tenCay = value; + } + public int TinhTrangPT { + get => tinhTrang; + set => tinhTrang = value; + } + public DateTime NgayTrongPT { + get => ngayTrong; + set => ngayTrong = value; + } + + public int MaLoaiCayCanhPT + { + get => maloaiCayCanh; + set => maloaiCayCanh = value; + } + public int MaViTriPT + { + get => mavitri; + set => mavitri = value; + } + + } +} diff --git a/Project1/TreeDTO/ChamSocThangDTO.cs b/Project1/TreeDTO/ChamSocThangDTO.cs new file mode 100644 index 0000000..0bca1be --- /dev/null +++ b/Project1/TreeDTO/ChamSocThangDTO.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class ChamSocThangDTO + { + private string machiphithang; + private DateTime thang; + public string MaChiPhiThangPT + { + get => machiphithang; + set => machiphithang = value; + } + public DateTime ThangPT + { + get => thang; + set => thang = value; + } + } +} diff --git a/Project1/TreeDTO/DonViTinhDTO.cs b/Project1/TreeDTO/DonViTinhDTO.cs new file mode 100644 index 0000000..f4cd441 --- /dev/null +++ b/Project1/TreeDTO/DonViTinhDTO.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class DonViTinhDTO + { + + private int madonvitinh; + private string tendonvitinh; + + public int MaDonViTinhPT + { + get => madonvitinh; + set => madonvitinh = value; + } + public string TenDonViTinhPT + { + get => tendonvitinh; + set => tendonvitinh = value; + } + } +} diff --git a/Project1/TreeDTO/GiaVatTuDTO.cs b/Project1/TreeDTO/GiaVatTuDTO.cs new file mode 100644 index 0000000..601fe4f --- /dev/null +++ b/Project1/TreeDTO/GiaVatTuDTO.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class GiaVatTuDTO + { + private int magiavattu; + private int giavattu; + private int mavattu; + + + public int MaGiaVatTuPT + { + get => magiavattu; + set => magiavattu = value; + } + public int MaVatTuPTGV + { + get => mavattu; + set => mavattu = value; + } + public int GiaVatTuPT + { + get => giavattu; + set => giavattu = value; + } + + } +} diff --git a/Project1/TreeDTO/LichchamsocDTO.cs b/Project1/TreeDTO/LichchamsocDTO.cs new file mode 100644 index 0000000..72ef895 --- /dev/null +++ b/Project1/TreeDTO/LichchamsocDTO.cs @@ -0,0 +1,82 @@ +using System; +using TreeDTO; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class LichchamsocDTO + { + private string machamsoc; + private long thoigian; + private TimeSpan thoigianconvert; + private string tenvattu; + private string donvitinh; + private int mavattu; + private int madonvitinh; + private int soluong; + private string ghichu; + private string macay; + private DateTime ngaylaplich; + + + public string MaChamSocPT + { + get => machamsoc; + set => machamsoc = value; + } + public long ThoiGianPT + { + get => thoigian; + set => thoigian = value; + } + public int MaVatTuPT + { + get => mavattu; + set => mavattu = value; + } + public int MaDonViTinhPT + { + get => madonvitinh; + set => madonvitinh = value; + } + public int SoLuongPT + { + get => soluong; + set => soluong = value; + } + public string GhiChuPT + { + get => ghichu; + set => ghichu = value; + } + + public string MaCayPT + { + get => macay; + set => macay = value; + } + public DateTime NgayLapLichPT + { + get => ngaylaplich; + set => ngaylaplich = value; + } + public TimeSpan ThoiGianConvertPT + { + get => TimeSpan.FromTicks(thoigian); + set => thoigianconvert =TimeSpan.FromTicks(thoigian); + } + public string TenVatTuPT + { + get => tenvattu; + set => tenvattu = value; + } + public string DonViTinhPT + { + get => donvitinh; + set => donvitinh = value; + } + } +} diff --git a/Project1/TreeDTO/LoaiCayDTO.cs b/Project1/TreeDTO/LoaiCayDTO.cs new file mode 100644 index 0000000..f578b25 --- /dev/null +++ b/Project1/TreeDTO/LoaiCayDTO.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class LoaiCayDTO + { + private int maLoaiCay; + + public int MaLoaiCayPT + { + get { return maLoaiCay; } + set { maLoaiCay = value; } + } + private string tenLoaiCay; + + public string TenLoaiCayPT + { + get { return tenLoaiCay; } + set { tenLoaiCay = value; } + } + } +} diff --git a/Project1/TreeDTO/PhieuMuaVatTuDTO.cs b/Project1/TreeDTO/PhieuMuaVatTuDTO.cs new file mode 100644 index 0000000..b0fc1c6 --- /dev/null +++ b/Project1/TreeDTO/PhieuMuaVatTuDTO.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class PhieuMuaVatTuDTO + { + private string phieumuavattu; + private int mavattu; + private int madonvitinh; + private string diachimua; + private int soluong; + private int sotien; + private DateTime ngaymua; + + + + public string PhieuMuaVatTuPT + { + get => phieumuavattu; + set => phieumuavattu = value; + } + public int MaVatTuPT + { + get => mavattu; + set => mavattu = value; + } + public int MaDonViTinhPT + { + get => madonvitinh; + set => madonvitinh = value; + } + public string DiaChiMuaPT + { + get => diachimua; + set => diachimua = value; + } + public int SoLuongPT + { + get => soluong; + set => soluong = value; + } + public int SoTienPT + { + get => sotien; + set => sotien = value; + } + public DateTime NgayMuaPT + { + get => ngaymua; + set => ngaymua = value; + } + + } +} diff --git a/Project1/TreeDTO/Properties/AssemblyInfo.cs b/Project1/TreeDTO/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e439999 --- /dev/null +++ b/Project1/TreeDTO/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TreeDTO")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TreeDTO")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("50f163ac-6f49-4bb6-878e-367e860916e3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Project1/TreeDTO/TTCayDTO.cs b/Project1/TreeDTO/TTCayDTO.cs new file mode 100644 index 0000000..f2212da --- /dev/null +++ b/Project1/TreeDTO/TTCayDTO.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class TTCayDTO + { + private string matinhtrangthang; + private DateTime thangtt; + public string MaTinhTrangThangPT + { + get => matinhtrangthang; + set => matinhtrangthang = value; + } + public DateTime ThangTTPT + { + get => thangtt; + set => thangtt = value; + } + } +} diff --git a/Project1/TreeDTO/ThamSoDTO.cs b/Project1/TreeDTO/ThamSoDTO.cs new file mode 100644 index 0000000..2fa4e86 --- /dev/null +++ b/Project1/TreeDTO/ThamSoDTO.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class ThamSoDTO + { + private int sotientoida; + private int socaytoida; + public int SoTienToiDaPT + { + get => sotientoida; + set => sotientoida = value; + } + public int SoCayToiDaPT + { + get => socaytoida; + set => socaytoida = value; + } + } +} diff --git a/Project1/TreeDTO/TinhTrangDTO.cs b/Project1/TreeDTO/TinhTrangDTO.cs new file mode 100644 index 0000000..a1ae0e8 --- /dev/null +++ b/Project1/TreeDTO/TinhTrangDTO.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class TinhTrangDTO + { + private int maTinhTrang; + + public int MaTinhTrangPT + { + get { return maTinhTrang; } + set { maTinhTrang = value; } + } + private string tenTinhTrang; + + public string TenTinhTrangPT + { + get { return tenTinhTrang; } + set { tenTinhTrang = value; } + } + } +} diff --git a/Project1/TreeDTO/TreeDTO.csproj b/Project1/TreeDTO/TreeDTO.csproj new file mode 100644 index 0000000..b50faf4 --- /dev/null +++ b/Project1/TreeDTO/TreeDTO.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {50F163AC-6F49-4BB6-878E-367E860916E3} + Library + Properties + TreeDTO + TreeDTO + v4.6.1 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project1/TreeDTO/VattuDTO.cs b/Project1/TreeDTO/VattuDTO.cs new file mode 100644 index 0000000..d670ae8 --- /dev/null +++ b/Project1/TreeDTO/VattuDTO.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class VattuDTO + { + //-------------------------------------------------------------------------// + //Thuoc Tinh + + private int mavattu; + private string tenvattu; + private string diachiban; + + + + //----------------------------------------------------------------------------// + //Phuong Thuc + public string TenVatTuPT + { + get => tenvattu; + set => tenvattu = value; + } + public int MaVatTuPT + { + get => mavattu; + set => mavattu = value; + } + public string DiaChiBanPT + { + get => diachiban; + set => diachiban = value; + } + } +} + diff --git a/Project1/TreeDTO/ViTriDTO.cs b/Project1/TreeDTO/ViTriDTO.cs new file mode 100644 index 0000000..7001f78 --- /dev/null +++ b/Project1/TreeDTO/ViTriDTO.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TreeDTO +{ + public class ViTriDTO + { + private int maViTri; + private string tenViTri; + private int soluong; + public int MaViTriPT + { + get { return maViTri; } + set { maViTri = value; } + } + public int SoLuongPT + { + get { return soluong; } + set { soluong = value; } + } + + public string TenViTriPT + { + get { return tenViTri; } + set { tenViTri = value; } + } + } +} diff --git a/Project1/TreeDTO/bin/Debug/TreeDTO.dll b/Project1/TreeDTO/bin/Debug/TreeDTO.dll new file mode 100644 index 0000000..54b049d Binary files /dev/null and b/Project1/TreeDTO/bin/Debug/TreeDTO.dll differ diff --git a/Project1/TreeDTO/bin/Debug/TreeDTO.pdb b/Project1/TreeDTO/bin/Debug/TreeDTO.pdb new file mode 100644 index 0000000..9aa0d42 Binary files /dev/null and b/Project1/TreeDTO/bin/Debug/TreeDTO.pdb differ diff --git a/Project1/TreeDTO/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Project1/TreeDTO/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..e3f892b Binary files /dev/null and b/Project1/TreeDTO/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Project1/TreeDTO/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Project1/TreeDTO/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeDTO/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Project1/TreeDTO/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeDTO/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Project1/TreeDTO/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeDTO/obj/Debug/TreeDTO.csproj.CoreCompileInputs.cache b/Project1/TreeDTO/obj/Debug/TreeDTO.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..fe66d9c --- /dev/null +++ b/Project1/TreeDTO/obj/Debug/TreeDTO.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +db7bd09f2e50802e21e4a5c00842fda4531182fa diff --git a/Project1/TreeDTO/obj/Debug/TreeDTO.csproj.FileListAbsolute.txt b/Project1/TreeDTO/obj/Debug/TreeDTO.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5c26961 --- /dev/null +++ b/Project1/TreeDTO/obj/Debug/TreeDTO.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDTO\obj\Debug\TreeDTO.csproj.CoreCompileInputs.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDTO\bin\Debug\TreeDTO.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDTO\bin\Debug\TreeDTO.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDTO\obj\Debug\TreeDTO.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDTO\obj\Debug\TreeDTO.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeDTO\obj\Debug\TreeDTO.csprojAssemblyReference.cache diff --git a/Project1/TreeDTO/obj/Debug/TreeDTO.csprojAssemblyReference.cache b/Project1/TreeDTO/obj/Debug/TreeDTO.csprojAssemblyReference.cache new file mode 100644 index 0000000..ba9dbda Binary files /dev/null and b/Project1/TreeDTO/obj/Debug/TreeDTO.csprojAssemblyReference.cache differ diff --git a/Project1/TreeDTO/obj/Debug/TreeDTO.dll b/Project1/TreeDTO/obj/Debug/TreeDTO.dll new file mode 100644 index 0000000..54b049d Binary files /dev/null and b/Project1/TreeDTO/obj/Debug/TreeDTO.dll differ diff --git a/Project1/TreeDTO/obj/Debug/TreeDTO.pdb b/Project1/TreeDTO/obj/Debug/TreeDTO.pdb new file mode 100644 index 0000000..9aa0d42 Binary files /dev/null and b/Project1/TreeDTO/obj/Debug/TreeDTO.pdb differ diff --git a/Project1/TreeGUI/.vs/TreeGUI/v15/.suo b/Project1/TreeGUI/.vs/TreeGUI/v15/.suo new file mode 100644 index 0000000..4c6d622 Binary files /dev/null and b/Project1/TreeGUI/.vs/TreeGUI/v15/.suo differ diff --git a/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/db.lock b/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/storage.ide b/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/storage.ide new file mode 100644 index 0000000..56758a8 Binary files /dev/null and b/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/storage.ide differ diff --git a/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/storage.ide-shm b/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/storage.ide-shm new file mode 100644 index 0000000..ab74ace Binary files /dev/null and b/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/storage.ide-shm differ diff --git a/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/storage.ide-wal b/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/storage.ide-wal new file mode 100644 index 0000000..55a5c61 Binary files /dev/null and b/Project1/TreeGUI/.vs/TreeGUI/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Project1/TreeGUI/App.config b/Project1/TreeGUI/App.config new file mode 100644 index 0000000..ffb0228 --- /dev/null +++ b/Project1/TreeGUI/App.config @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project1/TreeGUI/BaoCao.Designer.cs b/Project1/TreeGUI/BaoCao.Designer.cs new file mode 100644 index 0000000..e5b0a07 --- /dev/null +++ b/Project1/TreeGUI/BaoCao.Designer.cs @@ -0,0 +1,91 @@ +namespace Project1 +{ + partial class UserControl1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.TTCayCanh = new System.Windows.Forms.Button(); + this.ChamSoc = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.TTCayCanh); + this.panel1.Controls.Add(this.ChamSoc); + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1085, 614); + this.panel1.TabIndex = 0; + this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); + // + // TTCayCanh + // + this.TTCayCanh.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TTCayCanh.Location = new System.Drawing.Point(581, 258); + this.TTCayCanh.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.TTCayCanh.Name = "TTCayCanh"; + this.TTCayCanh.Size = new System.Drawing.Size(312, 62); + this.TTCayCanh.TabIndex = 1; + this.TTCayCanh.Text = "Báo Cáo Trình Trạng Cây Cảnh"; + this.TTCayCanh.UseVisualStyleBackColor = true; + this.TTCayCanh.Click += new System.EventHandler(this.TTCayCanh_Click); + // + // ChamSoc + // + this.ChamSoc.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ChamSoc.Location = new System.Drawing.Point(193, 258); + this.ChamSoc.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.ChamSoc.Name = "ChamSoc"; + this.ChamSoc.Size = new System.Drawing.Size(312, 62); + this.ChamSoc.TabIndex = 0; + this.ChamSoc.Text = "Báo Cáo Chi Phí Chăm Sóc"; + this.ChamSoc.UseVisualStyleBackColor = true; + this.ChamSoc.Click += new System.EventHandler(this.ChamSoc_Click); + // + // UserControl1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.panel1); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Name = "UserControl1"; + this.Size = new System.Drawing.Size(1085, 614); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button TTCayCanh; + private System.Windows.Forms.Button ChamSoc; + } +} diff --git a/Project1/TreeGUI/BaoCao.cs b/Project1/TreeGUI/BaoCao.cs new file mode 100644 index 0000000..5a590a7 --- /dev/null +++ b/Project1/TreeGUI/BaoCao.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class UserControl1 : UserControl + { + public UserControl1() + { + InitializeComponent(); + } + + private void panel1_Paint(object sender, PaintEventArgs e) + { + + } + + private void ChamSoc_Click(object sender, EventArgs e) + { + BcChamSoc baocao = new BcChamSoc(); + baocao.ShowDialog(); + } + + private void TTCayCanh_Click(object sender, EventArgs e) + { + TTCayCanh bbCayCanh = new TTCayCanh(); + bbCayCanh.ShowDialog(); + } + } +} diff --git a/Project1/TreeGUI/BaoCao.resx b/Project1/TreeGUI/BaoCao.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Project1/TreeGUI/BaoCao.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Project1/TreeGUI/BcChamSoc.Designer.cs b/Project1/TreeGUI/BcChamSoc.Designer.cs new file mode 100644 index 0000000..c3d7148 --- /dev/null +++ b/Project1/TreeGUI/BcChamSoc.Designer.cs @@ -0,0 +1,152 @@ +namespace Project1 +{ + partial class BcChamSoc + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BcChamSoc)); + this.panelMain = new System.Windows.Forms.Panel(); + this.namLB = new System.Windows.Forms.Label(); + this.yearBT = new System.Windows.Forms.TextBox(); + this.monthBT = new System.Windows.Forms.TextBox(); + this.timKiemBT = new System.Windows.Forms.Button(); + this.dataChamSoc = new System.Windows.Forms.DataGridView(); + this.TieuDe = new System.Windows.Forms.Label(); + this.thangLB = new System.Windows.Forms.Label(); + this.panelMain.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataChamSoc)).BeginInit(); + this.SuspendLayout(); + // + // panelMain + // + this.panelMain.Controls.Add(this.namLB); + this.panelMain.Controls.Add(this.yearBT); + this.panelMain.Controls.Add(this.monthBT); + this.panelMain.Controls.Add(this.timKiemBT); + this.panelMain.Controls.Add(this.dataChamSoc); + this.panelMain.Controls.Add(this.TieuDe); + this.panelMain.Controls.Add(this.thangLB); + this.panelMain.Location = new System.Drawing.Point(0, 16); + this.panelMain.Margin = new System.Windows.Forms.Padding(4); + this.panelMain.Name = "panelMain"; + this.panelMain.Size = new System.Drawing.Size(934, 522); + this.panelMain.TabIndex = 4; + // + // namLB + // + this.namLB.AutoSize = true; + this.namLB.Location = new System.Drawing.Point(405, 63); + this.namLB.Name = "namLB"; + this.namLB.Size = new System.Drawing.Size(41, 17); + this.namLB.TabIndex = 10; + this.namLB.Text = "Năm:"; + // + // yearBT + // + this.yearBT.Location = new System.Drawing.Point(452, 60); + this.yearBT.Name = "yearBT"; + this.yearBT.Size = new System.Drawing.Size(95, 22); + this.yearBT.TabIndex = 9; + // + // monthBT + // + this.monthBT.Location = new System.Drawing.Point(298, 60); + this.monthBT.Name = "monthBT"; + this.monthBT.Size = new System.Drawing.Size(89, 22); + this.monthBT.TabIndex = 8; + // + // timKiemBT + // + this.timKiemBT.Location = new System.Drawing.Point(567, 57); + this.timKiemBT.Name = "timKiemBT"; + this.timKiemBT.Size = new System.Drawing.Size(100, 29); + this.timKiemBT.TabIndex = 7; + this.timKiemBT.Text = "Tìm Kiếm"; + this.timKiemBT.UseVisualStyleBackColor = true; + this.timKiemBT.Click += new System.EventHandler(this.timKiemBT_Click); + // + // dataChamSoc + // + this.dataChamSoc.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataChamSoc.Location = new System.Drawing.Point(3, 92); + this.dataChamSoc.Name = "dataChamSoc"; + this.dataChamSoc.RowTemplate.Height = 24; + this.dataChamSoc.Size = new System.Drawing.Size(930, 427); + this.dataChamSoc.TabIndex = 6; + // + // TieuDe + // + this.TieuDe.AutoSize = true; + this.TieuDe.Font = new System.Drawing.Font("Calibri", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TieuDe.Location = new System.Drawing.Point(249, 14); + this.TieuDe.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.TieuDe.Name = "TieuDe"; + this.TieuDe.Size = new System.Drawing.Size(418, 45); + this.TieuDe.TabIndex = 5; + this.TieuDe.Text = "Báo Cáo Chi Phí Chăm Sóc"; + // + // thangLB + // + this.thangLB.AutoSize = true; + this.thangLB.Location = new System.Drawing.Point(238, 63); + this.thangLB.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.thangLB.Name = "thangLB"; + this.thangLB.Size = new System.Drawing.Size(53, 17); + this.thangLB.TabIndex = 3; + this.thangLB.Text = "Tháng:"; + // + // BcChamSoc + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(935, 536); + this.Controls.Add(this.panelMain); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "BcChamSoc"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Báo Cáo Chi Phí Chăm Sóc"; + this.Load += new System.EventHandler(this.BcChamSoc_Load); + this.panelMain.ResumeLayout(false); + this.panelMain.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataChamSoc)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panelMain; + private System.Windows.Forms.Label TieuDe; + private System.Windows.Forms.Label thangLB; + private System.Windows.Forms.DataGridView dataChamSoc; + private System.Windows.Forms.Label namLB; + private System.Windows.Forms.TextBox yearBT; + private System.Windows.Forms.TextBox monthBT; + private System.Windows.Forms.Button timKiemBT; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/BcChamSoc.cs b/Project1/TreeGUI/BcChamSoc.cs new file mode 100644 index 0000000..487f77b --- /dev/null +++ b/Project1/TreeGUI/BcChamSoc.cs @@ -0,0 +1,164 @@ +using System; +using TreeBUS; +using TreeDTO; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class BcChamSoc : Form + { + private PhieuMuaVatTuBUS phieumuaBUS; + private VattuBUS vattuBus; + private DonViTinhBUS DonViTinhBus; + private GiaVatTuBUS GiaVatTuBus; + List BaoCao; + List listVatTu; + List ListPhieuMua,Result; + + + public BcChamSoc() + { + InitializeComponent(); + } + private void BcChamSoc_Load(object sender, EventArgs e) + { + vattuBus = new VattuBUS(); + listVatTu = vattuBus.selectvattu(); + + phieumuaBUS = new PhieuMuaVatTuBUS(); + ListPhieuMua = phieumuaBUS.selectPhieu(); + BaoCao = new List(); + //XuLySoLieu(); + } + + + private void timKiemBT_Click(object sender, EventArgs e) + { + + bool result = XuLySoLieu(); + if(result == false) + { + MessageBox.Show("Vui lòng Kiểm tra dữ liệu"); + } + else + { + loadData_Vao_GridView(BaoCao); + } + } + private bool XuLySoLieu() + { + + BaoCao = new List(); + Result = new List(); + int count = 0, i = 0, number = 0 ; + if (yearBT.Text == "" || monthBT.Text == "") + { + return false; + } + else if(int.Parse(yearBT.Text) < 0) + { + return false; + } + else if (int.Parse(monthBT.Text)<0 || int.Parse(monthBT.Text)>= 12) + { + return false; + } + + DateTime ngayTim = new DateTime(int.Parse(yearBT.Text), int.Parse(monthBT.Text),1); + + + for (i = 0; i< ListPhieuMua.Count(); i++) + { + if(ListPhieuMua[i].NgayMuaPT.Month == ngayTim.Month && ListPhieuMua[i].NgayMuaPT.Year == ngayTim.Year) + { + Result.Add(ListPhieuMua[i]); + } + + } + if (Result == null || Result.Count == 0) + { + return false; + } + count = Result.Count(); + number = listVatTu.Count(); + for (i = 0; i < listVatTu.Count(); i++) + { + BCCSThangDTO Temp = new BCCSThangDTO(); + Temp.MaCTChiPhiThangPT = monthBT.Text + yearBT.Text + (i).ToString(); + Temp.MaChiPhiThangPT = monthBT.Text + yearBT.Text + i.ToString(); + Temp.TenVatTuPT = listVatTu[i].TenVatTuPT; + Temp.MaVatTuPT = listVatTu[i].MaVatTuPT; + for(number = 0; number < Result.Count(); number++) + { + if(Result[number].MaVatTuPT == Temp.MaVatTuPT) + { + Temp.SoPhieuMuaPT++; + Temp.TongTriGiaPT = Temp.TongTriGiaPT+ Result[number].SoTienPT; + } + + } + Temp.TyLePT = Convert.ToDouble(Temp.SoPhieuMuaPT) / count; + if(Temp.SoPhieuMuaPT != 0 && Temp.TongTriGiaPT != 0) + { + BaoCao.Add(Temp); + } + + Temp = null; + } + return true; + } + + + private void loadData_Vao_GridView(List listBaoCao) + { + if (listBaoCao == null || listBaoCao.Count == 0) + { + MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); + return; + } + + dataChamSoc.Columns.Clear(); + dataChamSoc.DataSource = null; + + dataChamSoc.AutoGenerateColumns = false; + dataChamSoc.AllowUserToAddRows = false; + dataChamSoc.DataSource = listBaoCao; + + + DataGridViewTextBoxColumn clVatTu = new DataGridViewTextBoxColumn(); + clVatTu.Name = "VatTu"; + clVatTu.HeaderText = "Vật Tư"; + clVatTu.DataPropertyName = "TenVatTuPT"; + dataChamSoc.Columns.Add(clVatTu); + + DataGridViewTextBoxColumn clSoPhieu = new DataGridViewTextBoxColumn(); + clSoPhieu.Name = "SoPhieu"; + clSoPhieu.HeaderText = "Số Phiếu Mua"; + clSoPhieu.DataPropertyName = "SoPhieuMuaPT"; + + dataChamSoc.Columns.Add(clSoPhieu); + + DataGridViewTextBoxColumn clTongGiaTri = new DataGridViewTextBoxColumn(); + clTongGiaTri.Name = "TongGiaTri"; + clTongGiaTri.HeaderText = "Tổng Giá Trị"; + clTongGiaTri.DataPropertyName = "TongTriGiaPT"; + dataChamSoc.Columns.Add(clTongGiaTri); + + DataGridViewTextBoxColumn clTyLe = new DataGridViewTextBoxColumn(); + clTyLe.Name = "TyLe"; + clTyLe.HeaderText = "Tỷ Lệ"; + clTyLe.DataPropertyName = "TyLePT"; + dataChamSoc.Columns.Add(clTyLe); + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[dataChamSoc.DataSource]; + myCurrencyManager.Refresh(); + } + } +} diff --git a/Project1/TreeGUI/BcChamSoc.resx b/Project1/TreeGUI/BcChamSoc.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/BcChamSoc.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAA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KRGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/LenLich.Designer.cs b/Project1/TreeGUI/LenLich.Designer.cs new file mode 100644 index 0000000..08db0df --- /dev/null +++ b/Project1/TreeGUI/LenLich.Designer.cs @@ -0,0 +1,332 @@ +namespace Project1 +{ + partial class LenLich + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LenLich)); + this.MaChamSocLB = new System.Windows.Forms.Label(); + this.ThoiGianLB = new System.Windows.Forms.Label(); + this.VatTuLB = new System.Windows.Forms.Label(); + this.DonviLB = new System.Windows.Forms.Label(); + this.SoluongLB = new System.Windows.Forms.Label(); + this.GhiChuLB = new System.Windows.Forms.Label(); + this.maChamSocTB = new System.Windows.Forms.TextBox(); + this.gioTB = new System.Windows.Forms.TextBox(); + this.soLuongTB = new System.Windows.Forms.TextBox(); + this.ghiChuTB = new System.Windows.Forms.TextBox(); + this.maCayTB = new System.Windows.Forms.TextBox(); + this.maCayLB = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.TimeH = new System.Windows.Forms.Label(); + this.TimeM = new System.Windows.Forms.Label(); + this.PhutTB = new System.Windows.Forms.TextBox(); + this.timKiem = new System.Windows.Forms.Button(); + this.LenLichBT = new System.Windows.Forms.Button(); + this.HuyBT = new System.Windows.Forms.Button(); + this.comboBoxMaVatTu = new System.Windows.Forms.ComboBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.comboBoxDonVi = new System.Windows.Forms.ComboBox(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // MaChamSocLB + // + this.MaChamSocLB.AutoSize = true; + this.MaChamSocLB.Location = new System.Drawing.Point(100, 135); + this.MaChamSocLB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.MaChamSocLB.Name = "MaChamSocLB"; + this.MaChamSocLB.Size = new System.Drawing.Size(77, 13); + this.MaChamSocLB.TabIndex = 0; + this.MaChamSocLB.Text = "Mã Chăm Sóc:"; + // + // ThoiGianLB + // + this.ThoiGianLB.AutoSize = true; + this.ThoiGianLB.Location = new System.Drawing.Point(99, 165); + this.ThoiGianLB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.ThoiGianLB.Name = "ThoiGianLB"; + this.ThoiGianLB.Size = new System.Drawing.Size(56, 13); + this.ThoiGianLB.TabIndex = 1; + this.ThoiGianLB.Text = "Thời Gian:"; + // + // VatTuLB + // + this.VatTuLB.AutoSize = true; + this.VatTuLB.Location = new System.Drawing.Point(99, 199); + this.VatTuLB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.VatTuLB.Name = "VatTuLB"; + this.VatTuLB.Size = new System.Drawing.Size(42, 13); + this.VatTuLB.TabIndex = 2; + this.VatTuLB.Text = "Vật Tư:"; + // + // DonviLB + // + this.DonviLB.AutoSize = true; + this.DonviLB.Location = new System.Drawing.Point(99, 235); + this.DonviLB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.DonviLB.Name = "DonviLB"; + this.DonviLB.Size = new System.Drawing.Size(42, 13); + this.DonviLB.TabIndex = 3; + this.DonviLB.Text = "Đơn Vị:"; + // + // SoluongLB + // + this.SoluongLB.AutoSize = true; + this.SoluongLB.Location = new System.Drawing.Point(99, 272); + this.SoluongLB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.SoluongLB.Name = "SoluongLB"; + this.SoluongLB.Size = new System.Drawing.Size(52, 13); + this.SoluongLB.TabIndex = 4; + this.SoluongLB.Text = "Số lương:"; + // + // GhiChuLB + // + this.GhiChuLB.AutoSize = true; + this.GhiChuLB.Location = new System.Drawing.Point(99, 308); + this.GhiChuLB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.GhiChuLB.Name = "GhiChuLB"; + this.GhiChuLB.Size = new System.Drawing.Size(45, 13); + this.GhiChuLB.TabIndex = 5; + this.GhiChuLB.Text = "Ghi Chú"; + // + // maChamSocTB + // + this.maChamSocTB.Location = new System.Drawing.Point(201, 135); + this.maChamSocTB.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.maChamSocTB.Name = "maChamSocTB"; + this.maChamSocTB.Size = new System.Drawing.Size(264, 20); + this.maChamSocTB.TabIndex = 6; + // + // gioTB + // + this.gioTB.Location = new System.Drawing.Point(201, 165); + this.gioTB.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.gioTB.Name = "gioTB"; + this.gioTB.Size = new System.Drawing.Size(36, 20); + this.gioTB.TabIndex = 7; + // + // soLuongTB + // + this.soLuongTB.Location = new System.Drawing.Point(201, 272); + this.soLuongTB.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.soLuongTB.Name = "soLuongTB"; + this.soLuongTB.Size = new System.Drawing.Size(264, 20); + this.soLuongTB.TabIndex = 10; + // + // ghiChuTB + // + this.ghiChuTB.Location = new System.Drawing.Point(201, 304); + this.ghiChuTB.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.ghiChuTB.Name = "ghiChuTB"; + this.ghiChuTB.Size = new System.Drawing.Size(264, 20); + this.ghiChuTB.TabIndex = 11; + // + // maCayTB + // + this.maCayTB.Location = new System.Drawing.Point(201, 75); + this.maCayTB.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.maCayTB.Name = "maCayTB"; + this.maCayTB.Size = new System.Drawing.Size(264, 20); + this.maCayTB.TabIndex = 14; + // + // maCayLB + // + this.maCayLB.AutoSize = true; + this.maCayLB.Location = new System.Drawing.Point(99, 77); + this.maCayLB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.maCayLB.Name = "maCayLB"; + this.maCayLB.Size = new System.Drawing.Size(46, 13); + this.maCayLB.TabIndex = 12; + this.maCayLB.Text = "Mã Cây:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Calibri", 25.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(160, 7); + this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(279, 42); + this.label3.TabIndex = 16; + this.label3.Text = "Lên Lịch Chăm Sóc"; + // + // TimeH + // + this.TimeH.AutoSize = true; + this.TimeH.Location = new System.Drawing.Point(240, 167); + this.TimeH.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.TimeH.Name = "TimeH"; + this.TimeH.Size = new System.Drawing.Size(23, 13); + this.TimeH.TabIndex = 17; + this.TimeH.Text = "Giờ"; + // + // TimeM + // + this.TimeM.AutoSize = true; + this.TimeM.Location = new System.Drawing.Point(315, 167); + this.TimeM.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.TimeM.Name = "TimeM"; + this.TimeM.Size = new System.Drawing.Size(29, 13); + this.TimeM.TabIndex = 19; + this.TimeM.Text = "Phút"; + // + // PhutTB + // + this.PhutTB.Location = new System.Drawing.Point(276, 165); + this.PhutTB.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.PhutTB.Name = "PhutTB"; + this.PhutTB.Size = new System.Drawing.Size(36, 20); + this.PhutTB.TabIndex = 18; + // + // timKiem + // + this.timKiem.Location = new System.Drawing.Point(242, 98); + this.timKiem.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.timKiem.Name = "timKiem"; + this.timKiem.Size = new System.Drawing.Size(88, 28); + this.timKiem.TabIndex = 22; + this.timKiem.Text = "Tìm Kiếm Cây"; + this.timKiem.UseVisualStyleBackColor = true; + this.timKiem.Click += new System.EventHandler(this.timKiem_Click); + // + // LenLichBT + // + this.LenLichBT.Location = new System.Drawing.Point(127, 338); + this.LenLichBT.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.LenLichBT.Name = "LenLichBT"; + this.LenLichBT.Size = new System.Drawing.Size(125, 42); + this.LenLichBT.TabIndex = 23; + this.LenLichBT.Text = "Đồng Ý"; + this.LenLichBT.UseVisualStyleBackColor = true; + this.LenLichBT.Click += new System.EventHandler(this.LenLichBT_Click); + // + // HuyBT + // + this.HuyBT.Location = new System.Drawing.Point(310, 338); + this.HuyBT.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.HuyBT.Name = "HuyBT"; + this.HuyBT.Size = new System.Drawing.Size(125, 42); + this.HuyBT.TabIndex = 24; + this.HuyBT.Text = "Hủy"; + this.HuyBT.UseVisualStyleBackColor = true; + this.HuyBT.Click += new System.EventHandler(this.HuyBT_Click); + // + // comboBoxMaVatTu + // + this.comboBoxMaVatTu.FormattingEnabled = true; + this.comboBoxMaVatTu.Location = new System.Drawing.Point(201, 199); + this.comboBoxMaVatTu.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.comboBoxMaVatTu.Name = "comboBoxMaVatTu"; + this.comboBoxMaVatTu.Size = new System.Drawing.Size(264, 21); + this.comboBoxMaVatTu.TabIndex = 25; + this.comboBoxMaVatTu.SelectionChangeCommitted += new System.EventHandler(this.comboBoxMaVatTu_SelectedIndexChanged); + // + // panel1 + // + this.panel1.Controls.Add(this.comboBoxDonVi); + this.panel1.Controls.Add(this.comboBoxMaVatTu); + this.panel1.Controls.Add(this.HuyBT); + this.panel1.Controls.Add(this.LenLichBT); + this.panel1.Controls.Add(this.timKiem); + this.panel1.Controls.Add(this.TimeM); + this.panel1.Controls.Add(this.PhutTB); + this.panel1.Controls.Add(this.TimeH); + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.maCayTB); + this.panel1.Controls.Add(this.maCayLB); + this.panel1.Controls.Add(this.ghiChuTB); + this.panel1.Controls.Add(this.soLuongTB); + this.panel1.Controls.Add(this.gioTB); + this.panel1.Controls.Add(this.maChamSocTB); + this.panel1.Controls.Add(this.GhiChuLB); + this.panel1.Controls.Add(this.SoluongLB); + this.panel1.Controls.Add(this.DonviLB); + this.panel1.Controls.Add(this.VatTuLB); + this.panel1.Controls.Add(this.ThoiGianLB); + this.panel1.Controls.Add(this.MaChamSocLB); + this.panel1.Location = new System.Drawing.Point(2, 0); + this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(598, 396); + this.panel1.TabIndex = 26; + // + // comboBoxDonVi + // + this.comboBoxDonVi.FormattingEnabled = true; + this.comboBoxDonVi.Location = new System.Drawing.Point(201, 235); + this.comboBoxDonVi.Margin = new System.Windows.Forms.Padding(2); + this.comboBoxDonVi.Name = "comboBoxDonVi"; + this.comboBoxDonVi.Size = new System.Drawing.Size(264, 21); + this.comboBoxDonVi.TabIndex = 26; + // + // LenLich + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(600, 396); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Name = "LenLich"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Lên Lịch"; + this.Load += new System.EventHandler(this.LenLich_Load); + this.Leave += new System.EventHandler(this.HuyBT_Click); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label MaChamSocLB; + private System.Windows.Forms.Label ThoiGianLB; + private System.Windows.Forms.Label VatTuLB; + private System.Windows.Forms.Label DonviLB; + private System.Windows.Forms.Label SoluongLB; + private System.Windows.Forms.Label GhiChuLB; + private System.Windows.Forms.TextBox maChamSocTB; + private System.Windows.Forms.TextBox gioTB; + private System.Windows.Forms.TextBox soLuongTB; + private System.Windows.Forms.TextBox ghiChuTB; + private System.Windows.Forms.TextBox maCayTB; + private System.Windows.Forms.Label maCayLB; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label TimeH; + private System.Windows.Forms.Label TimeM; + private System.Windows.Forms.TextBox PhutTB; + private System.Windows.Forms.Button timKiem; + private System.Windows.Forms.Button LenLichBT; + private System.Windows.Forms.Button HuyBT; + private System.Windows.Forms.ComboBox comboBoxMaVatTu; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.ComboBox comboBoxDonVi; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/LenLich.cs b/Project1/TreeGUI/LenLich.cs new file mode 100644 index 0000000..db25d40 --- /dev/null +++ b/Project1/TreeGUI/LenLich.cs @@ -0,0 +1,189 @@ +using System; +using TreeBUS; +using TreeDTO; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class LenLich : Form + { + private VattuBUS vattuBus; + private LichChamSocBUS lichBus; + private CayCanhBUS cayBus; + private DonViTinhBUS DonViTinhBus; + List listDonVi; + List listVatTu; + int selectedLoaiVatTu; + public LenLich() + { + InitializeComponent(); + } + private void LenLich_Load(object sender, EventArgs e) + { + lichBus = new LichChamSocBUS(); + vattuBus = new VattuBUS(); + + cayBus = new CayCanhBUS(); + DonViTinhBus = new DonViTinhBUS(); + listDonVi = DonViTinhBus.selectDonVi(); + listVatTu = vattuBus.selectvattu(); + //selectedLoaiVatTu = int.Parse(comboBoxMaVatTu.SelectedValue.ToString()); + + maChamSocTB.ReadOnly = true; + gioTB.ReadOnly = true; + PhutTB.ReadOnly = true; + soLuongTB.ReadOnly = true; + ghiChuTB.ReadOnly = true; + soLuongTB.ReadOnly = true; + + } + private void loadMaVatTu_Combobox() + { + List listViTri = vattuBus.selectvattu(); + + if (listViTri == null) + { + MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); + return; + } + comboBoxMaVatTu.DataSource = new BindingSource(listViTri, String.Empty); + comboBoxMaVatTu.DisplayMember = "TenVatTuPT"; + comboBoxMaVatTu.ValueMember = "MaVatTuPT"; + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[comboBoxMaVatTu.DataSource]; + myCurrencyManager.Refresh(); + + if (comboBoxMaVatTu.Items.Count > 0) + { + comboBoxMaVatTu.ResetText(); + } + } + + private void Donvi_Combobox() + { + List listDonVi = DonViTinhBus.selectDonVi(); + + if (listDonVi == null) + { + MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); + return; + } + comboBoxDonVi.DataSource = new BindingSource(listDonVi, String.Empty); + comboBoxDonVi.DisplayMember = "TenDonViTinhPT"; + comboBoxDonVi.ValueMember = "MaDonViTinhPT"; + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[comboBoxDonVi.DataSource]; + myCurrencyManager.Refresh(); + + if (comboBoxDonVi.Items.Count > 0) + { + comboBoxDonVi.ResetText(); + } + } + private void comboBoxMaVatTu_SelectedIndexChanged(object sender, EventArgs e) + { + selectedLoaiVatTu = int.Parse(comboBoxMaVatTu.SelectedValue.ToString()); + + } + + + private void HuyBT_Click(object sender, EventArgs e) + { + this.Hide(); + } + + private void timKiem_Click(object sender, EventArgs e) + { + int i = 0,finder = 0; + string sKeyword = maCayTB.Text.Trim(); + List listcayCanh = cayBus.selectByKeyWord(sKeyword); + + for (i = 0 ;i< listcayCanh.Count(); i ++ ) + { + if (listcayCanh[i].MaCayCanhPT == sKeyword) + { + finder = i; + break; + } + else + { + finder = -1; + } + } + if (listcayCanh == null) + { + finder = -1; + } + if (finder != -1) + { + MessageBox.Show("Có cây cần tìm trong danh sách"); + maChamSocTB.ReadOnly = false; + gioTB.ReadOnly = false; + PhutTB.ReadOnly = false; + soLuongTB.ReadOnly = false; + ghiChuTB.ReadOnly = false; + soLuongTB.ReadOnly = false; + loadMaVatTu_Combobox(); + Donvi_Combobox(); + } + else + { + MessageBox.Show("Không có cây cần tìm trong danh sách. Vui lòng kiểm tra lại trong danh sách"); + maChamSocTB.ReadOnly = true; + gioTB.ReadOnly = true; + PhutTB.ReadOnly = true; + + soLuongTB.ReadOnly = true; + ghiChuTB.ReadOnly = true; + soLuongTB.ReadOnly = true; + } + + + + } + private void LenLichBT_Click(object sender, EventArgs e) + { + if(gioTB.Text == "" + || PhutTB.Text == "" + ||maChamSocTB.Text == "" + ||maCayTB.Text == "" + ||ghiChuTB.Text == "" + ||soLuongTB.Text == "") + { + MessageBox.Show("Vui Lòng nhập đây đủ thông tin trước khi thực hiện"); + return; + } + //1. Map data from GUI + DateTime ngaylap = new DateTime(); + ngaylap = DateTime.Now; + TimeSpan time = new TimeSpan(int.Parse(gioTB.Text.ToString()), int.Parse(PhutTB.Text.ToString()),0); + long timeticks = time.Ticks; + LichchamsocDTO lichDTO = new LichchamsocDTO(); + lichDTO.MaChamSocPT = maChamSocTB.Text; + lichDTO.MaCayPT = maCayTB.Text; + lichDTO.GhiChuPT = ghiChuTB.Text; + lichDTO.MaVatTuPT = int.Parse(comboBoxMaVatTu.SelectedValue.ToString()); + lichDTO.SoLuongPT = int.Parse(soLuongTB.Text.ToString()); + lichDTO.NgayLapLichPT = ngaylap; + lichDTO.MaDonViTinhPT = listDonVi[selectedLoaiVatTu-1].MaDonViTinhPT; + lichDTO.ThoiGianPT = timeticks; + //lichDTO.DonViTinhPT = listDonVi[selectedLoaiVatTu - 1].TenDonViTinhPT; + //lichDTO.TenVatTuPT = listVatTu[selectedLoaiVatTu - 1].TenVatTuPT; + //2. Kiểm tra data hợp lệ or not + + //3. Thêm vào DB + bool result = lichBus.themlich(lichDTO); + if (result == false) + MessageBox.Show("Thêm Lịch thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Thêm Lịch thành công"); + } + } +} diff --git a/Project1/TreeGUI/LenLich.resx b/Project1/TreeGUI/LenLich.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/LenLich.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuGEac7hhGnO4 + YRpzuGEac7hhGk2iI8NNoiPWTaIj002iI9JNoiPSTaIj002iJM9ksErFc7lh1HK4YdNyuGHScrhh0nK4 + YdJyuGHTc7lh1WioWcxHdD/RRG8900RvPdJ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AAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/LichCS.Designer.cs b/Project1/TreeGUI/LichCS.Designer.cs new file mode 100644 index 0000000..adc429c --- /dev/null +++ b/Project1/TreeGUI/LichCS.Designer.cs @@ -0,0 +1,154 @@ +namespace Project1 +{ + partial class LichCS + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LichCS)); + this.panel1 = new System.Windows.Forms.Panel(); + this.timkiemBT = new System.Windows.Forms.Button(); + this.dgvLich = new System.Windows.Forms.DataGridView(); + this.dateTimeLaplich = new System.Windows.Forms.DateTimePicker(); + this.labelTieuDe = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.maCayCanhtb = new System.Windows.Forms.TextBox(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvLich)).BeginInit(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.timkiemBT); + this.panel1.Controls.Add(this.dgvLich); + this.panel1.Controls.Add(this.dateTimeLaplich); + this.panel1.Controls.Add(this.labelTieuDe); + this.panel1.Controls.Add(this.label4); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.maCayCanhtb); + this.panel1.Location = new System.Drawing.Point(0, 13); + this.panel1.Margin = new System.Windows.Forms.Padding(4); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(993, 565); + this.panel1.TabIndex = 4; + // + // timkiemBT + // + this.timkiemBT.Location = new System.Drawing.Point(353, 93); + this.timkiemBT.Name = "timkiemBT"; + this.timkiemBT.Size = new System.Drawing.Size(244, 30); + this.timkiemBT.TabIndex = 8; + this.timkiemBT.Text = "Tìm Kiếm"; + this.timkiemBT.UseVisualStyleBackColor = true; + this.timkiemBT.Click += new System.EventHandler(this.timkiemBT_Click); + // + // dgvLich + // + this.dgvLich.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvLich.Location = new System.Drawing.Point(3, 129); + this.dgvLich.Name = "dgvLich"; + this.dgvLich.RowTemplate.Height = 24; + this.dgvLich.Size = new System.Drawing.Size(987, 436); + this.dgvLich.TabIndex = 7; + // + // dateTimeLaplich + // + this.dateTimeLaplich.Location = new System.Drawing.Point(619, 65); + this.dateTimeLaplich.Name = "dateTimeLaplich"; + this.dateTimeLaplich.Size = new System.Drawing.Size(350, 22); + this.dateTimeLaplich.TabIndex = 6; + // + // labelTieuDe + // + this.labelTieuDe.AutoSize = true; + this.labelTieuDe.Font = new System.Drawing.Font("Calibri", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelTieuDe.Location = new System.Drawing.Point(360, 15); + this.labelTieuDe.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTieuDe.Name = "labelTieuDe"; + this.labelTieuDe.Size = new System.Drawing.Size(237, 45); + this.labelTieuDe.TabIndex = 5; + this.labelTieuDe.Text = "Lịch Chăm Sóc"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(22, 66); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(96, 17); + this.label4.TabIndex = 2; + this.label4.Text = "Mã Cây Cảnh:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(509, 66); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(103, 17); + this.label2.TabIndex = 3; + this.label2.Text = "Ngày Lập Lịch:"; + // + // maCayCanhtb + // + this.maCayCanhtb.Location = new System.Drawing.Point(126, 65); + this.maCayCanhtb.Margin = new System.Windows.Forms.Padding(4); + this.maCayCanhtb.Name = "maCayCanhtb"; + this.maCayCanhtb.Size = new System.Drawing.Size(334, 22); + this.maCayCanhtb.TabIndex = 0; + // + // LichCS + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(994, 581); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "LichCS"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Lịch Chăm Sóc"; + this.Load += new System.EventHandler(this.LichCS_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvLich)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label labelTieuDe; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox maCayCanhtb; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.DateTimePicker dateTimeLaplich; + private System.Windows.Forms.Button timkiemBT; + private System.Windows.Forms.DataGridView dgvLich; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/LichCS.cs b/Project1/TreeGUI/LichCS.cs new file mode 100644 index 0000000..5096a59 --- /dev/null +++ b/Project1/TreeGUI/LichCS.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using TreeBUS; +using TreeDTO; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class LichCS : Form + { + private VattuBUS vattuBus; + private LichChamSocBUS lichBus; + private CayCanhBUS cayBus; + private DonViTinhBUS DonViTinhBus; + List listDonVi; + List listVatTu; + + public LichCS() + { + InitializeComponent(); + } + + private void LichCS_Load(object sender, EventArgs e) + { + vattuBus = new VattuBUS(); + lichBus = new LichChamSocBUS(); + cayBus = new CayCanhBUS(); + DonViTinhBus = new DonViTinhBUS(); + listDonVi = DonViTinhBus.selectDonVi(); + listVatTu = vattuBus.selectvattu(); + } + + private void timkiemBT_Click(object sender, EventArgs e) + { + int i = 0; + if(maCayCanhtb.Text == "") + { + MessageBox.Show("Vui Lòng nhập dữ liệu trước khi thực hiện"); + return; + } + string sKeyword = maCayCanhtb.Text.Trim(); + DateTime ngaytrong = dateTimeLaplich.Value; + List listlich = lichBus.selectByKeyWord(sKeyword); + List result = new List(); + for(i = 0; i < listlich.Count; i++) + { + if (listlich[i].MaCayPT != sKeyword) + { + listlich.RemoveAt(i); + } + if (ngaytrong.Date == listlich[i].NgayLapLichPT) + { + listlich[i].TenVatTuPT = listVatTu[listlich[i].MaVatTuPT - 1].TenVatTuPT; + listlich[i].DonViTinhPT = listDonVi[listlich[i].MaDonViTinhPT - 1].TenDonViTinhPT; + result.Add(listlich[i]); + } + } + + + + loadData_Vao_GridView(result); + + + } + + private void loadData_Vao_GridView(List listLich) + { + if (listLich == null||listLich.Count == 0) + { + MessageBox.Show("Có lỗi khi lấy lịch từ DataBase"); + return; + } + + dgvLich.Columns.Clear(); + dgvLich.DataSource = null; + + dgvLich.AutoGenerateColumns = false; + dgvLich.AllowUserToAddRows = false; + dgvLich.DataSource = listLich; + + + DataGridViewTextBoxColumn clThoiGian = new DataGridViewTextBoxColumn(); + clThoiGian.Name = "ThoiGian"; + clThoiGian.HeaderText = "Thời Gian"; + clThoiGian.DataPropertyName = "ThoiGianConvertPT"; + dgvLich.Columns.Add(clThoiGian); + + DataGridViewTextBoxColumn clVatTu = new DataGridViewTextBoxColumn(); + clVatTu.Name = "VatTu"; + clVatTu.HeaderText = "Vật Tư"; + clVatTu.DataPropertyName = "TenVatTuPT"; + + dgvLich.Columns.Add(clVatTu); + + DataGridViewTextBoxColumn clDonViTinh = new DataGridViewTextBoxColumn(); + clDonViTinh.Name = "DonViTinh"; + clDonViTinh.HeaderText = "Đơn Vị Tính"; + clDonViTinh.DataPropertyName = "DonViTinhPT"; + dgvLich.Columns.Add(clDonViTinh); + + DataGridViewTextBoxColumn clSoLuong = new DataGridViewTextBoxColumn(); + clSoLuong.Name = "SoLuong"; + clSoLuong.HeaderText = "Số Lượng"; + clSoLuong.DataPropertyName = "SoLuongPT"; + dgvLich.Columns.Add(clSoLuong); + + DataGridViewTextBoxColumn clGhiChu = new DataGridViewTextBoxColumn(); + clGhiChu.Name = "GhiChu"; + clGhiChu.HeaderText = "Ghi Chú"; + clGhiChu.DataPropertyName = "GhiChuPT"; + dgvLich.Columns.Add(clGhiChu); + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[dgvLich.DataSource]; + myCurrencyManager.Refresh(); + } + } +} diff --git a/Project1/TreeGUI/LichCS.resx b/Project1/TreeGUI/LichCS.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/LichCS.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAA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KR + GqlykRpIc5IcAnKRGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/LichChamsoc.resx b/Project1/TreeGUI/LichChamsoc.resx new file mode 100644 index 0000000..ad53752 --- /dev/null +++ b/Project1/TreeGUI/LichChamsoc.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Project1/TreeGUI/MainWindow.Designer.cs b/Project1/TreeGUI/MainWindow.Designer.cs new file mode 100644 index 0000000..704b935 --- /dev/null +++ b/Project1/TreeGUI/MainWindow.Designer.cs @@ -0,0 +1,261 @@ +namespace Project1 +{ + partial class MainWindow + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow)); + this.panel1 = new System.Windows.Forms.Panel(); + this.Minimize = new System.Windows.Forms.Button(); + this.SidePanel = new System.Windows.Forms.Panel(); + this.Shutdown = new System.Windows.Forms.Button(); + this.buttonVatTu = new System.Windows.Forms.Button(); + this.setting = new System.Windows.Forms.Button(); + this.buttonCayCanh = new System.Windows.Forms.Button(); + this.buttonBaoCao = new System.Windows.Forms.Button(); + this.panel3 = new System.Windows.Forms.Panel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.panel4 = new System.Windows.Forms.Panel(); + this.userControl11 = new Project1.UserControl1(); + this.vattu1 = new Project1.Vattu(); + this.quanLyCayCanh1 = new Project1.QuanLyCayCanh(); + this.panel1.SuspendLayout(); + this.panel3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.panel4.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.SystemColors.WindowFrame; + this.panel1.Controls.Add(this.Minimize); + this.panel1.Controls.Add(this.SidePanel); + this.panel1.Controls.Add(this.Shutdown); + this.panel1.Controls.Add(this.buttonVatTu); + this.panel1.Controls.Add(this.setting); + this.panel1.Controls.Add(this.buttonCayCanh); + this.panel1.Controls.Add(this.buttonBaoCao); + this.panel1.Controls.Add(this.panel3); + this.panel1.Dock = System.Windows.Forms.DockStyle.Left; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(175, 499); + this.panel1.TabIndex = 0; + // + // Minimize + // + this.Minimize.FlatAppearance.BorderSize = 0; + this.Minimize.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Minimize.Image = ((System.Drawing.Image)(resources.GetObject("Minimize.Image"))); + this.Minimize.Location = new System.Drawing.Point(64, 3); + this.Minimize.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Minimize.Name = "Minimize"; + this.Minimize.Size = new System.Drawing.Size(45, 40); + this.Minimize.TabIndex = 7; + this.Minimize.UseVisualStyleBackColor = true; + this.Minimize.Click += new System.EventHandler(this.Minimize_Click); + // + // SidePanel + // + this.SidePanel.BackColor = System.Drawing.SystemColors.Highlight; + this.SidePanel.ForeColor = System.Drawing.SystemColors.Menu; + this.SidePanel.Location = new System.Drawing.Point(3, 222); + this.SidePanel.Name = "SidePanel"; + this.SidePanel.Size = new System.Drawing.Size(7, 46); + this.SidePanel.TabIndex = 3; + // + // Shutdown + // + this.Shutdown.FlatAppearance.BorderSize = 0; + this.Shutdown.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Shutdown.Image = ((System.Drawing.Image)(resources.GetObject("Shutdown.Image"))); + this.Shutdown.Location = new System.Drawing.Point(6, 3); + this.Shutdown.Name = "Shutdown"; + this.Shutdown.Size = new System.Drawing.Size(45, 40); + this.Shutdown.TabIndex = 1; + this.Shutdown.UseVisualStyleBackColor = true; + this.Shutdown.Click += new System.EventHandler(this.button2_Click); + // + // buttonVatTu + // + this.buttonVatTu.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.buttonVatTu.FlatAppearance.BorderSize = 0; + this.buttonVatTu.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonVatTu.Font = new System.Drawing.Font("Calibri", 11.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonVatTu.ForeColor = System.Drawing.Color.White; + this.buttonVatTu.Image = ((System.Drawing.Image)(resources.GetObject("buttonVatTu.Image"))); + this.buttonVatTu.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.buttonVatTu.Location = new System.Drawing.Point(12, 216); + this.buttonVatTu.Name = "buttonVatTu"; + this.buttonVatTu.Size = new System.Drawing.Size(163, 46); + this.buttonVatTu.TabIndex = 6; + this.buttonVatTu.Text = "Vật Tư"; + this.buttonVatTu.UseVisualStyleBackColor = true; + this.buttonVatTu.Click += new System.EventHandler(this.buttonVatTu_Click); + // + // setting + // + this.setting.FlatAppearance.BorderSize = 0; + this.setting.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.setting.Image = ((System.Drawing.Image)(resources.GetObject("setting.Image"))); + this.setting.Location = new System.Drawing.Point(122, 3); + this.setting.Name = "setting"; + this.setting.Size = new System.Drawing.Size(45, 40); + this.setting.TabIndex = 0; + this.setting.UseVisualStyleBackColor = true; + this.setting.Click += new System.EventHandler(this.setting_Click); + // + // buttonCayCanh + // + this.buttonCayCanh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCayCanh.FlatAppearance.BorderSize = 0; + this.buttonCayCanh.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonCayCanh.Font = new System.Drawing.Font("Calibri", 11.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonCayCanh.ForeColor = System.Drawing.Color.White; + this.buttonCayCanh.Image = ((System.Drawing.Image)(resources.GetObject("buttonCayCanh.Image"))); + this.buttonCayCanh.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.buttonCayCanh.Location = new System.Drawing.Point(12, 164); + this.buttonCayCanh.Name = "buttonCayCanh"; + this.buttonCayCanh.Size = new System.Drawing.Size(162, 46); + this.buttonCayCanh.TabIndex = 5; + this.buttonCayCanh.Text = "Cây Cảnh"; + this.buttonCayCanh.UseVisualStyleBackColor = true; + this.buttonCayCanh.Click += new System.EventHandler(this.buttonCayCanh_Click); + // + // buttonBaoCao + // + this.buttonBaoCao.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.buttonBaoCao.FlatAppearance.BorderSize = 0; + this.buttonBaoCao.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonBaoCao.Font = new System.Drawing.Font("Calibri", 11.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonBaoCao.ForeColor = System.Drawing.Color.White; + this.buttonBaoCao.Image = ((System.Drawing.Image)(resources.GetObject("buttonBaoCao.Image"))); + this.buttonBaoCao.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.buttonBaoCao.Location = new System.Drawing.Point(12, 263); + this.buttonBaoCao.Name = "buttonBaoCao"; + this.buttonBaoCao.Size = new System.Drawing.Size(162, 46); + this.buttonBaoCao.TabIndex = 4; + this.buttonBaoCao.Text = "Lập Báo Cáo"; + this.buttonBaoCao.UseVisualStyleBackColor = true; + this.buttonBaoCao.Click += new System.EventHandler(this.buttonBaoCao_Click); + // + // panel3 + // + this.panel3.Controls.Add(this.pictureBox1); + this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel3.Location = new System.Drawing.Point(0, 324); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(175, 175); + this.panel3.TabIndex = 0; + // + // pictureBox1 + // + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(6, 3); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(165, 165); + this.pictureBox1.TabIndex = 4; + this.pictureBox1.TabStop = false; + this.pictureBox1.WaitOnLoad = true; + this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); + // + // panel4 + // + this.panel4.Controls.Add(this.userControl11); + this.panel4.Controls.Add(this.vattu1); + this.panel4.Controls.Add(this.quanLyCayCanh1); + this.panel4.Location = new System.Drawing.Point(175, 0); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(814, 499); + this.panel4.TabIndex = 3; + // + // userControl11 + // + this.userControl11.Location = new System.Drawing.Point(0, 0); + this.userControl11.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.userControl11.Name = "userControl11"; + this.userControl11.Size = new System.Drawing.Size(814, 499); + this.userControl11.TabIndex = 2; + // + // vattu1 + // + this.vattu1.Location = new System.Drawing.Point(0, 0); + this.vattu1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.vattu1.Name = "vattu1"; + this.vattu1.Size = new System.Drawing.Size(814, 500); + this.vattu1.TabIndex = 1; + // + // quanLyCayCanh1 + // + this.quanLyCayCanh1.Location = new System.Drawing.Point(-2, 0); + this.quanLyCayCanh1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.quanLyCayCanh1.Name = "quanLyCayCanh1"; + this.quanLyCayCanh1.Size = new System.Drawing.Size(814, 500); + this.quanLyCayCanh1.TabIndex = 0; + // + // MainWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(990, 499); + this.Controls.Add(this.panel4); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "MainWindow"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Form1"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainWindow_FormClosing); + this.panel1.ResumeLayout(false); + this.panel3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.panel4.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Button buttonVatTu; + private System.Windows.Forms.Button buttonCayCanh; + private System.Windows.Forms.Button buttonBaoCao; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Panel SidePanel; + private System.Windows.Forms.Button Shutdown; + private System.Windows.Forms.Button setting; + private System.Windows.Forms.Panel panel4; + private QuanLyCayCanh quanLyCayCanh1; + private Vattu vattu1; + private UserControl1 userControl11; + private System.Windows.Forms.Button Minimize; + } +} + diff --git a/Project1/TreeGUI/MainWindow.cs b/Project1/TreeGUI/MainWindow.cs new file mode 100644 index 0000000..f12fb55 --- /dev/null +++ b/Project1/TreeGUI/MainWindow.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class MainWindow : Form + { + public MainWindow() + { + InitializeComponent(); + SidePanel.Height = buttonCayCanh.Height; + SidePanel.Top = buttonCayCanh.Top; + quanLyCayCanh1.BringToFront(); + } + //Ben Trai màn hình chính + private void pictureBox1_Click(object sender, EventArgs e) + { + MessageBox.Show("Thành viên thực hiện: \n\t Bùi Trung Điền\n\t Tống Anh Quân \n\t Nguyễn Đông Quân\n Đồ án Công nghệ phần mềm 2019"); + } + private void buttonCayCanh_Click(object sender, EventArgs e) + { + SidePanel.Height = buttonCayCanh.Height; + SidePanel.Top = buttonCayCanh.Top; + quanLyCayCanh1.BringToFront(); + } + private void buttonVatTu_Click(object sender, EventArgs e) + { + SidePanel.Height = buttonVatTu.Height; + SidePanel.Top = buttonVatTu.Top; + vattu1.BringToFront(); + } + private void buttonBaoCao_Click(object sender, EventArgs e) + { + SidePanel.Height = buttonBaoCao.Height; + SidePanel.Top = buttonBaoCao.Top; + userControl11.BringToFront(); + } + + +//------------------------------------------------------------------------------------// +// Control Button + //Shutdown Button + private void button2_Click(object sender, EventArgs e) + { + Application.Exit(); + } + private void Minimize_Click(object sender, EventArgs e) + { + WindowState = FormWindowState.Minimized; + } + private void MainWindow_FormClosing(object sender, FormClosingEventArgs e) + { + if (MessageBox.Show("Bạn Có Muốn Thực sự Thoát chương trình?", "Thông Báo", MessageBoxButtons.OKCancel) != System.Windows.Forms.DialogResult.OK) + { + e.Cancel = true; + } + } + private void setting_Click(object sender, EventArgs e) + { + MenuVatTu f = new MenuVatTu(); + f.ShowDialog(); + quanLyCayCanh1.Refresh(); + vattu1.Refresh(); + userControl11.Refresh(); + + } + //----------------------------------------------------------------------------// + + + } +} diff --git a/Project1/TreeGUI/MainWindow.resx b/Project1/TreeGUI/MainWindow.resx new file mode 100644 index 0000000..4add6e7 --- /dev/null +++ b/Project1/TreeGUI/MainWindow.resx @@ -0,0 +1,488 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 + JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJ + TUUH4wUSBQAAaD8RAwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIXSURBVFhH + 1Zc9TxRBGIAPRYKJ4UcYLWhs1QJtSEysjCj8DdCoMTQUFiqYaIya+APQWCgNFQUJhv9AwErBr9YYg9/P + M7t3Oe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EVv + PRVEbz1rRG89lURvPW5Ebz4XRG4+AHKRGgBxkRoUcpEay3KRGv9ykRr/cpEa/3KRGv9ykRp3c5AaAGyX + GAAAAAAAAAAAAAAAAABd/4EAcrdhAHG5YhdyuGFucrhhlXK4YWtyuGEVcrhhAAAAAAAAAAAAAAAAAAAA + AAAAAAAAR3I9AEdzPQBHbj0CR2k9AEdqPQAAAAAAcJEaAG2SGgNykRqAcpEa+nKRGv9ykRr/cpEa3nGR + GjZykRoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb7NhAG+zYQBytGICdbZkAHW1ZAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcZEbAHGRGxNykRp4cpEaunKR + GqlykRpIc5IcAnKRGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/MenuCay.Designer.cs b/Project1/TreeGUI/MenuCay.Designer.cs new file mode 100644 index 0000000..3ca32cf --- /dev/null +++ b/Project1/TreeGUI/MenuCay.Designer.cs @@ -0,0 +1,113 @@ +namespace Project1 +{ + partial class MenuCay + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MenuCay)); + this.ThemCay = new System.Windows.Forms.Button(); + this.XoaCay = new System.Windows.Forms.Button(); + this.SuaCay = new System.Windows.Forms.Button(); + this.LenLich = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // ThemCay + // + this.ThemCay.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ThemCay.Location = new System.Drawing.Point(70, 27); + this.ThemCay.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.ThemCay.Name = "ThemCay"; + this.ThemCay.Size = new System.Drawing.Size(129, 47); + this.ThemCay.TabIndex = 0; + this.ThemCay.Text = "Thêm Cây Mới"; + this.ThemCay.UseVisualStyleBackColor = true; + this.ThemCay.Click += new System.EventHandler(this.ThemCay_Click); + // + // XoaCay + // + this.XoaCay.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.XoaCay.Location = new System.Drawing.Point(70, 98); + this.XoaCay.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.XoaCay.Name = "XoaCay"; + this.XoaCay.Size = new System.Drawing.Size(129, 47); + this.XoaCay.TabIndex = 1; + this.XoaCay.Text = "Xóa Cây"; + this.XoaCay.UseVisualStyleBackColor = true; + this.XoaCay.Click += new System.EventHandler(this.XoaCay_Click); + // + // SuaCay + // + this.SuaCay.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.SuaCay.Location = new System.Drawing.Point(70, 172); + this.SuaCay.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.SuaCay.Name = "SuaCay"; + this.SuaCay.Size = new System.Drawing.Size(129, 47); + this.SuaCay.TabIndex = 2; + this.SuaCay.Text = "Cập Nhận Thông Tin Cây"; + this.SuaCay.UseVisualStyleBackColor = true; + this.SuaCay.Click += new System.EventHandler(this.SuaCay_Click_1); + // + // LenLich + // + this.LenLich.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.LenLich.Location = new System.Drawing.Point(70, 242); + this.LenLich.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.LenLich.Name = "LenLich"; + this.LenLich.Size = new System.Drawing.Size(129, 47); + this.LenLich.TabIndex = 3; + this.LenLich.Text = "Lên Lịch Chăm sóc"; + this.LenLich.UseVisualStyleBackColor = true; + this.LenLich.Click += new System.EventHandler(this.LenLich_Click); + // + // MenuCay + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.DeepSkyBlue; + this.ClientSize = new System.Drawing.Size(266, 337); + this.Controls.Add(this.LenLich); + this.Controls.Add(this.SuaCay); + this.Controls.Add(this.XoaCay); + this.Controls.Add(this.ThemCay); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Name = "MenuCay"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Menu Cây Cảnh"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button ThemCay; + private System.Windows.Forms.Button XoaCay; + private System.Windows.Forms.Button SuaCay; + private System.Windows.Forms.Button LenLich; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/MenuCay.aa.resx b/Project1/TreeGUI/MenuCay.aa.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/MenuCay.aa.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuGEac7hhGnO4 + YRpzuGEac7hhGk2iI8NNoiPWTaIj002iI9JNoiPSTaIj002iJM9ksErFc7lh1HK4YdNyuGHScrhh0nK4 + YdJyuGHTc7lh1WioWcxHdD/RRG8900RvPdJEbz3SRG8900RvPNVIckfWaaFs1nO5YdVyuGHUcrhh0nK4 + YdJyuGHScrhh03K4YdZyuGHDTaIjd02iI8BNoiPtTaIi/02iI/9NoiP/TaIi4luqPbVwrXDjcbJq+3K4 + Yf9yuGH/crhh/3K0Z/1ys2jSXJVPrURvPdlEbz3/RG89/0RvPf9Ebz32Q287w1N0bMxtkZXacrdjvXK4 + YeRyuGH/crhh/3K4Yf9yuGHtcrhhwHK4YXdNoCMDTaIeD1CeMH1PoC35TaIk+U2iI99NoiJXW5FnFW2A + tqlvmJK5crlf23K4Yfdyt2Lsb5qQ6G2Fr2g7ewoHRG89QERvPdBFbz/7RG8+8kRvPY86bB4RbHu6b218 + vqlwm4wVcrlgV3K4Y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9ykRr/cpEa/3KRGv9ykRp3c5AaAGyX + GAAAAAAAAAAAAAAAAABd/4EAcrdhAHG5YhdyuGFucrhhlXK4YWtyuGEVcrhhAAAAAAAAAAAAAAAAAAAA + AAAAAAAAR3I9AEdzPQBHbj0CR2k9AEdqPQAAAAAAcJEaAG2SGgNykRqAcpEa+nKRGv9ykRr/cpEa3nGR + GjZykRoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb7NhAG+zYQBytGICdbZkAHW1ZAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcZEbAHGRGxNykRp4cpEaunKR + GqlykRpIc5IcAnKRGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/MenuCay.cs b/Project1/TreeGUI/MenuCay.cs new file mode 100644 index 0000000..da1d03c --- /dev/null +++ b/Project1/TreeGUI/MenuCay.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class MenuCay : Form + { + public MenuCay() + { + InitializeComponent(); + } + + private void XoaCay_Click(object sender, EventArgs e) + { + XoaCay f = new XoaCay(); + f.ShowDialog(); + + } + + private void ThemCay_Click(object sender, EventArgs e) + { + ThemCay f = new ThemCay(); + f.ShowDialog(); + } + private void SuaCay_Click_1(object sender, EventArgs e) + { + SuaCay f = new SuaCay(); + f.ShowDialog(); + } + + private void LenLich_Click(object sender, EventArgs e) + { + LenLich f = new LenLich(); + f.ShowDialog(); + } + } +} diff --git a/Project1/TreeGUI/MenuCay.resx b/Project1/TreeGUI/MenuCay.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/MenuCay.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuGEac7hhGnO4 + YRpzuGEac7hhGk2iI8NNoiPWTaIj002iI9JNoiPSTaIj002iJM9ksErFc7lh1HK4YdNyuGHScrhh0nK4 + YdJyuGHTc7lh1WioWcxHdD/RRG8900RvPdJEbz3SRG8900RvPNVIckfWaaFs1nO5YdVyuGHUcrhh0nK4 + YdJyuGHScrhh03K4YdZyuGHDTaIjd02iI8BNoiPtTaIi/02iI/9NoiP/TaIi4luqPbVwrXDjcbJq+3K4 + Yf9yuGH/crh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= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/MenuVatTu.Designer.cs b/Project1/TreeGUI/MenuVatTu.Designer.cs new file mode 100644 index 0000000..5552a1c --- /dev/null +++ b/Project1/TreeGUI/MenuVatTu.Designer.cs @@ -0,0 +1,148 @@ +namespace Project1 +{ + partial class MenuVatTu + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MenuVatTu)); + this.ThemVatTu = new System.Windows.Forms.Button(); + this.SuaVatTu = new System.Windows.Forms.Button(); + this.XoaVatTu = new System.Windows.Forms.Button(); + this.themViTriBT = new System.Windows.Forms.Button(); + this.suaViTri = new System.Windows.Forms.Button(); + this.xoaViTri = new System.Windows.Forms.Button(); + this.thayDoiThamSo = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // ThemVatTu + // + this.ThemVatTu.Font = new System.Drawing.Font("Calibri Light", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ThemVatTu.Location = new System.Drawing.Point(27, 82); + this.ThemVatTu.Name = "ThemVatTu"; + this.ThemVatTu.Size = new System.Drawing.Size(115, 39); + this.ThemVatTu.TabIndex = 0; + this.ThemVatTu.Text = "Thêm Vật Tư"; + this.ThemVatTu.UseVisualStyleBackColor = true; + this.ThemVatTu.Click += new System.EventHandler(this.ThemVatTu_Click); + // + // SuaVatTu + // + this.SuaVatTu.Font = new System.Drawing.Font("Calibri Light", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.SuaVatTu.Location = new System.Drawing.Point(26, 147); + this.SuaVatTu.Name = "SuaVatTu"; + this.SuaVatTu.Size = new System.Drawing.Size(115, 39); + this.SuaVatTu.TabIndex = 1; + this.SuaVatTu.Text = "Sửa Vật Tư"; + this.SuaVatTu.UseVisualStyleBackColor = true; + this.SuaVatTu.Click += new System.EventHandler(this.SuaVatTu_Click); + // + // XoaVatTu + // + this.XoaVatTu.Font = new System.Drawing.Font("Calibri Light", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.XoaVatTu.Location = new System.Drawing.Point(27, 209); + this.XoaVatTu.Name = "XoaVatTu"; + this.XoaVatTu.Size = new System.Drawing.Size(115, 39); + this.XoaVatTu.TabIndex = 2; + this.XoaVatTu.Text = "Xóa Vật Tư"; + this.XoaVatTu.UseVisualStyleBackColor = true; + this.XoaVatTu.Click += new System.EventHandler(this.XoaVatTu_Click); + // + // themViTriBT + // + this.themViTriBT.Font = new System.Drawing.Font("Calibri Light", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.themViTriBT.Location = new System.Drawing.Point(198, 82); + this.themViTriBT.Name = "themViTriBT"; + this.themViTriBT.Size = new System.Drawing.Size(115, 39); + this.themViTriBT.TabIndex = 3; + this.themViTriBT.Text = "Thêm Vị Trí"; + this.themViTriBT.UseVisualStyleBackColor = true; + this.themViTriBT.Click += new System.EventHandler(this.themViTriBT_Click); + // + // suaViTri + // + this.suaViTri.Font = new System.Drawing.Font("Calibri Light", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.suaViTri.Location = new System.Drawing.Point(198, 147); + this.suaViTri.Name = "suaViTri"; + this.suaViTri.Size = new System.Drawing.Size(115, 39); + this.suaViTri.TabIndex = 4; + this.suaViTri.Text = "Sửa Vị Trí"; + this.suaViTri.UseVisualStyleBackColor = true; + this.suaViTri.Click += new System.EventHandler(this.suaViTri_Click); + // + // xoaViTri + // + this.xoaViTri.Font = new System.Drawing.Font("Calibri Light", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.xoaViTri.Location = new System.Drawing.Point(198, 209); + this.xoaViTri.Name = "xoaViTri"; + this.xoaViTri.Size = new System.Drawing.Size(115, 39); + this.xoaViTri.TabIndex = 5; + this.xoaViTri.Text = "Xóa Vị Trí"; + this.xoaViTri.UseVisualStyleBackColor = true; + this.xoaViTri.Click += new System.EventHandler(this.xoaViTri_Click); + // + // thayDoiThamSo + // + this.thayDoiThamSo.Font = new System.Drawing.Font("Calibri Light", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.thayDoiThamSo.Location = new System.Drawing.Point(99, 23); + this.thayDoiThamSo.Name = "thayDoiThamSo"; + this.thayDoiThamSo.Size = new System.Drawing.Size(142, 39); + this.thayDoiThamSo.TabIndex = 6; + this.thayDoiThamSo.Text = "Thay Đồi Tham Số"; + this.thayDoiThamSo.UseVisualStyleBackColor = true; + this.thayDoiThamSo.Click += new System.EventHandler(this.thayDoiThamSo_Click); + // + // MenuVatTu + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(336, 292); + this.Controls.Add(this.thayDoiThamSo); + this.Controls.Add(this.xoaViTri); + this.Controls.Add(this.suaViTri); + this.Controls.Add(this.themViTriBT); + this.Controls.Add(this.XoaVatTu); + this.Controls.Add(this.SuaVatTu); + this.Controls.Add(this.ThemVatTu); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "MenuVatTu"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Menu Vật Tư"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button ThemVatTu; + private System.Windows.Forms.Button SuaVatTu; + private System.Windows.Forms.Button XoaVatTu; + private System.Windows.Forms.Button themViTriBT; + private System.Windows.Forms.Button suaViTri; + private System.Windows.Forms.Button xoaViTri; + private System.Windows.Forms.Button thayDoiThamSo; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/MenuVatTu.cs b/Project1/TreeGUI/MenuVatTu.cs new file mode 100644 index 0000000..3b93d17 --- /dev/null +++ b/Project1/TreeGUI/MenuVatTu.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class MenuVatTu : Form + { + public MenuVatTu() + { + InitializeComponent(); + } + + private void ThemVatTu_Click(object sender, EventArgs e) + { + ThemVatTu f = new ThemVatTu(); + f.ShowDialog(); + } + + private void SuaVatTu_Click(object sender, EventArgs e) + { + SuaVatTu f = new SuaVatTu(); + f.ShowDialog(); + } + + private void XoaVatTu_Click(object sender, EventArgs e) + { + XoaVatTu f = new XoaVatTu(); + f.ShowDialog(); + } + + private void thayDoiThamSo_Click(object sender, EventArgs e) + { + Setting f = new Setting(); + f.ShowDialog(); + } + + private void themViTriBT_Click(object sender, EventArgs e) + { + ThemViTri f = new ThemViTri(); + f.ShowDialog(); + } + + private void suaViTri_Click(object sender, EventArgs e) + { + SuaViTri f = new SuaViTri(); + f.ShowDialog(); + } + + private void xoaViTri_Click(object sender, EventArgs e) + { + XoaViTri f = new XoaViTri(); + f.ShowDialog(); + } + } +} diff --git a/Project1/TreeGUI/MenuVatTu.resx b/Project1/TreeGUI/MenuVatTu.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/MenuVatTu.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuGEac7hhGnO4 + YRpzuGEac7hhGk2iI8NNoiPWTaIj002iI9JNoiPSTaIj002iJM9ksErFc7lh1HK4YdNyuGHScrhh0nK4 + YdJyuGHTc7lh1WioWcxHdD/RRG8900RvPdJEbz3SRG8900RvPNVIckfWaaFs1nO5YdVyuGHUcrhh0nK4 + YdJyuGHScrhh03K4YdZyuGHDTaIjd02iI8BNoiPtTaIi/02iI/9NoiP/TaIi4luqPbVwrXDjcbJq+3K4 + Yf9yuGH/crhh/3K0Z/1ys2jSXJVPrURvPdlEbz3/RG89/0RvPf9Ebz32Q287w1N0bMxtkZXacrdjvXK4 + YeRyuGH/crhh/3K4Yf9yuGHtcrhhwHK4YXdNoCMDTaIeD1CeMH1PoC35TaIk+U2iI99NoiJXW5FnFW2A + tqlvmJK5crlf23K4Yfdyt2Lsb5qQ6G2Fr2g7ewoHRG89QERvPdBFbz/7RG8+8kRvPY86bB4RbHu6b218 + vqlwm4wVcrlgV3K4Yd9yuGH5crRn+XGzaX1yul4PcbthAwAAAABpgKoAaX+uS2SGlMxRnThkTKMgLEGx + AAJueMMKbXu/p219vG1zvlcocrlgVnGtckNtfru1bXy/Y2x8ugAdYwABTnJZLVx2h8VYdXt8PGsgCmh6 + rgBtfL5qbXy+qG14wQpwzEECcrpeLHKwbmRujKXMbYK1S22EsgAAAAAAcLhhAGtf6gBtgLdUbny+v3GF + thdvgLoAZ4KjAGOHjA5sfbmtbH24bnV04wBshKwAbompEW1+vLRtgLhqa13wAGx/sw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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcZEbAHGRGxNykRp4cpEaunKR + GqlykRpIc5IcAnKRGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/PhieuMuaVatTu.Designer.cs b/Project1/TreeGUI/PhieuMuaVatTu.Designer.cs new file mode 100644 index 0000000..ddfe88f --- /dev/null +++ b/Project1/TreeGUI/PhieuMuaVatTu.Designer.cs @@ -0,0 +1,313 @@ +namespace Project1 +{ + partial class Vattu + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Vattu)); + this.panel1 = new System.Windows.Forms.Panel(); + this.CbDonVi = new System.Windows.Forms.ComboBox(); + this.maPhieuMuaTB = new System.Windows.Forms.TextBox(); + this.maPhieuMua = new System.Windows.Forms.Label(); + this.VattuTB = new System.Windows.Forms.TextBox(); + this.comboBoxMaVatTu = new System.Windows.Forms.ComboBox(); + this.maVatTuTB = new System.Windows.Forms.Label(); + this.DiaChiTB = new System.Windows.Forms.TextBox(); + this.dateTimeNgayMua = new System.Windows.Forms.DateTimePicker(); + this.soTienTB = new System.Windows.Forms.TextBox(); + this.Huy = new System.Windows.Forms.Button(); + this.Them = new System.Windows.Forms.Button(); + this.labelTieuDe = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.soluongTB = new System.Windows.Forms.TextBox(); + this.refesh = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.refesh); + this.panel1.Controls.Add(this.CbDonVi); + this.panel1.Controls.Add(this.maPhieuMuaTB); + this.panel1.Controls.Add(this.maPhieuMua); + this.panel1.Controls.Add(this.VattuTB); + this.panel1.Controls.Add(this.comboBoxMaVatTu); + this.panel1.Controls.Add(this.maVatTuTB); + this.panel1.Controls.Add(this.DiaChiTB); + this.panel1.Controls.Add(this.dateTimeNgayMua); + this.panel1.Controls.Add(this.soTienTB); + this.panel1.Controls.Add(this.Huy); + this.panel1.Controls.Add(this.Them); + this.panel1.Controls.Add(this.labelTieuDe); + this.panel1.Controls.Add(this.label6); + this.panel1.Controls.Add(this.label5); + this.panel1.Controls.Add(this.label4); + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.soluongTB); + this.panel1.Location = new System.Drawing.Point(3, 3); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(773, 398); + this.panel1.TabIndex = 0; + // + // CbDonVi + // + this.CbDonVi.FormattingEnabled = true; + this.CbDonVi.Location = new System.Drawing.Point(231, 169); + this.CbDonVi.Name = "CbDonVi"; + this.CbDonVi.Size = new System.Drawing.Size(466, 21); + this.CbDonVi.TabIndex = 27; + // + // maPhieuMuaTB + // + this.maPhieuMuaTB.Location = new System.Drawing.Point(231, 97); + this.maPhieuMuaTB.Name = "maPhieuMuaTB"; + this.maPhieuMuaTB.Size = new System.Drawing.Size(466, 20); + this.maPhieuMuaTB.TabIndex = 25; + // + // maPhieuMua + // + this.maPhieuMua.AutoSize = true; + this.maPhieuMua.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.maPhieuMua.Location = new System.Drawing.Point(97, 94); + this.maPhieuMua.Name = "maPhieuMua"; + this.maPhieuMua.Size = new System.Drawing.Size(107, 19); + this.maPhieuMua.TabIndex = 24; + this.maPhieuMua.Text = "Mã Phiếu Mua:"; + // + // VattuTB + // + this.VattuTB.Location = new System.Drawing.Point(231, 146); + this.VattuTB.Margin = new System.Windows.Forms.Padding(2); + this.VattuTB.Name = "VattuTB"; + this.VattuTB.ReadOnly = true; + this.VattuTB.Size = new System.Drawing.Size(466, 20); + this.VattuTB.TabIndex = 23; + // + // comboBoxMaVatTu + // + this.comboBoxMaVatTu.FormattingEnabled = true; + this.comboBoxMaVatTu.Location = new System.Drawing.Point(231, 121); + this.comboBoxMaVatTu.Name = "comboBoxMaVatTu"; + this.comboBoxMaVatTu.Size = new System.Drawing.Size(466, 21); + this.comboBoxMaVatTu.TabIndex = 22; + this.comboBoxMaVatTu.SelectionChangeCommitted += new System.EventHandler(this.comboBoxMaVatTu_SelectedIndexChanged); + // + // maVatTuTB + // + this.maVatTuTB.AutoSize = true; + this.maVatTuTB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.maVatTuTB.Location = new System.Drawing.Point(97, 121); + this.maVatTuTB.Name = "maVatTuTB"; + this.maVatTuTB.Size = new System.Drawing.Size(80, 19); + this.maVatTuTB.TabIndex = 21; + this.maVatTuTB.Text = "Mã Vật Tư:"; + // + // DiaChiTB + // + this.DiaChiTB.Location = new System.Drawing.Point(231, 196); + this.DiaChiTB.Margin = new System.Windows.Forms.Padding(2); + this.DiaChiTB.Name = "DiaChiTB"; + this.DiaChiTB.ReadOnly = true; + this.DiaChiTB.Size = new System.Drawing.Size(466, 20); + this.DiaChiTB.TabIndex = 20; + // + // dateTimeNgayMua + // + this.dateTimeNgayMua.Location = new System.Drawing.Point(231, 276); + this.dateTimeNgayMua.Margin = new System.Windows.Forms.Padding(2); + this.dateTimeNgayMua.Name = "dateTimeNgayMua"; + this.dateTimeNgayMua.Size = new System.Drawing.Size(466, 20); + this.dateTimeNgayMua.TabIndex = 19; + // + // soTienTB + // + this.soTienTB.Location = new System.Drawing.Point(231, 249); + this.soTienTB.Margin = new System.Windows.Forms.Padding(2); + this.soTienTB.Name = "soTienTB"; + this.soTienTB.ReadOnly = true; + this.soTienTB.Size = new System.Drawing.Size(466, 20); + this.soTienTB.TabIndex = 18; + // + // Huy + // + this.Huy.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Huy.Location = new System.Drawing.Point(423, 334); + this.Huy.Name = "Huy"; + this.Huy.Size = new System.Drawing.Size(145, 38); + this.Huy.TabIndex = 14; + this.Huy.Text = "Hủy"; + this.Huy.UseVisualStyleBackColor = true; + this.Huy.Click += new System.EventHandler(this.button2_Click); + // + // Them + // + this.Them.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Them.Location = new System.Drawing.Point(190, 334); + this.Them.Name = "Them"; + this.Them.Size = new System.Drawing.Size(145, 38); + this.Them.TabIndex = 13; + this.Them.Text = "Thêm"; + this.Them.UseVisualStyleBackColor = true; + this.Them.Click += new System.EventHandler(this.button1_Click); + // + // labelTieuDe + // + this.labelTieuDe.AutoSize = true; + this.labelTieuDe.Font = new System.Drawing.Font("Calibri", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelTieuDe.ForeColor = System.Drawing.Color.DarkSlateGray; + this.labelTieuDe.Location = new System.Drawing.Point(284, 37); + this.labelTieuDe.Name = "labelTieuDe"; + this.labelTieuDe.Size = new System.Drawing.Size(246, 39); + this.labelTieuDe.TabIndex = 12; + this.labelTieuDe.Text = "Phiếu Mua Vật Tư"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label6.Location = new System.Drawing.Point(97, 169); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(61, 19); + this.label6.TabIndex = 11; + this.label6.Text = "Đơn Vị :"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(97, 249); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(68, 19); + this.label5.TabIndex = 10; + this.label5.Text = "Số Tiền : "; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(97, 275); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(87, 19); + this.label4.TabIndex = 9; + this.label4.Text = "Ngày Mua : "; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(97, 221); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(82, 19); + this.label3.TabIndex = 8; + this.label3.Text = "Số Lượng : "; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(97, 196); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(64, 19); + this.label2.TabIndex = 7; + this.label2.Text = "Địa Chỉ :"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(97, 145); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(59, 19); + this.label1.TabIndex = 6; + this.label1.Text = "Vật Tư :"; + // + // soluongTB + // + this.soluongTB.Location = new System.Drawing.Point(231, 222); + this.soluongTB.Name = "soluongTB"; + this.soluongTB.Size = new System.Drawing.Size(466, 20); + this.soluongTB.TabIndex = 3; + this.soluongTB.TextChanged += new System.EventHandler(this.soluongTB_TextChanged); + // + // refesh + // + this.refesh.FlatAppearance.BorderSize = 0; + this.refesh.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.refesh.Image = ((System.Drawing.Image)(resources.GetObject("refesh.Image"))); + this.refesh.Location = new System.Drawing.Point(738, 3); + this.refesh.Name = "refesh"; + this.refesh.Size = new System.Drawing.Size(32, 32); + this.refesh.TabIndex = 29; + this.refesh.UseVisualStyleBackColor = true; + this.refesh.Click += new System.EventHandler(this.refesh_Click); + // + // Vattu + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.panel1); + this.Name = "Vattu"; + this.Size = new System.Drawing.Size(779, 405); + this.Load += new System.EventHandler(this.Vattu_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox soluongTB; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label labelTieuDe; + private System.Windows.Forms.Button Huy; + private System.Windows.Forms.Button Them; + private System.Windows.Forms.TextBox soTienTB; + private System.Windows.Forms.DateTimePicker dateTimeNgayMua; + private System.Windows.Forms.TextBox DiaChiTB; + private System.Windows.Forms.TextBox VattuTB; + private System.Windows.Forms.ComboBox comboBoxMaVatTu; + private System.Windows.Forms.Label maVatTuTB; + private System.Windows.Forms.Label maPhieuMua; + private System.Windows.Forms.TextBox maPhieuMuaTB; + private System.Windows.Forms.ComboBox CbDonVi; + private System.Windows.Forms.Button refesh; + } +} diff --git a/Project1/TreeGUI/PhieuMuaVatTu.cs b/Project1/TreeGUI/PhieuMuaVatTu.cs new file mode 100644 index 0000000..6952374 --- /dev/null +++ b/Project1/TreeGUI/PhieuMuaVatTu.cs @@ -0,0 +1,203 @@ +using System; +using TreeBUS; +using TreeDTO; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class Vattu : UserControl + { + private PhieuMuaVatTuBUS phieumuaBUS; + private VattuBUS vattuBus; + private DonViTinhBUS DonViTinhBus; + private GiaVatTuBUS GiaVatTuBus; + List listVatTu; + List listDonVi; + List listGiaVatTu; + private ThamSoBUS thamso; + private List tsDTO; + private int gtien,gGia; + private int selectedLoaiVatTu,count; + public Vattu() + { + InitializeComponent(); + } + private void Vattu_Load(object sender, EventArgs e) + { + vattuBus = new VattuBUS(); + DonViTinhBus = new DonViTinhBUS(); + GiaVatTuBus = new GiaVatTuBUS(); + phieumuaBUS = new PhieuMuaVatTuBUS(); + loadMaVatTu_Combobox(); + listVatTu = vattuBus.selectvattu(); + listDonVi = DonViTinhBus.selectDonVi(); + listGiaVatTu = GiaVatTuBus.selectGiaVat(); + thamso = new ThamSoBUS(); + tsDTO = thamso.selectThamSo(); + Donvi_Combobox(); + + } + private void loadMaVatTu_Combobox() + { + List listViTri = vattuBus.selectvattu(); + + if (listViTri == null) + { + MessageBox.Show("Có lỗi khi lấy Dữ liệu từ DB"); + return; + } + comboBoxMaVatTu.DataSource = new BindingSource(listViTri, String.Empty); + comboBoxMaVatTu.DisplayMember = "MaVatTuPT"; + comboBoxMaVatTu.ValueMember = "MaVatTuPT"; + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[comboBoxMaVatTu.DataSource]; + myCurrencyManager.Refresh(); + + if (comboBoxMaVatTu.Items.Count > 0) + { + comboBoxMaVatTu.ResetText(); + } + } + private void Donvi_Combobox() + { + List listDonVi = DonViTinhBus.selectDonVi(); + + if (listDonVi == null) + { + MessageBox.Show("Có lỗi khi lấy Dữ liệu từ DB"); + return; + } + CbDonVi.DataSource = new BindingSource(listDonVi, String.Empty); + CbDonVi.DisplayMember = "TenDonViTinhPT"; + CbDonVi.ValueMember = "MaDonViTinhPT"; + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[CbDonVi.DataSource]; + myCurrencyManager.Refresh(); + + if (CbDonVi.Items.Count > 0) + { + CbDonVi.ResetText(); + } + } + //-----------------------------------------------------------------------------------------// + //Button calback + private void button1_Click(object sender, EventArgs e) + { + if(maPhieuMuaTB.Text == "" + || soluongTB.Text == "" + ||comboBoxMaVatTu.SelectedValue == null + ||CbDonVi.SelectedValue == null) + { + MessageBox.Show("Vui lòng nhập đầy đủ dữ liệu trước khi thực hiện"); + return; + } + //1. Map data from GUI + PhieuMuaVatTuDTO PhieuDTO = new PhieuMuaVatTuDTO(); + PhieuDTO.PhieuMuaVatTuPT = maPhieuMuaTB.Text; + PhieuDTO.MaDonViTinhPT = int.Parse(CbDonVi.SelectedValue.ToString()); + PhieuDTO.NgayMuaPT = DateTime.Parse(dateTimeNgayMua.Value.ToString()); + PhieuDTO.SoLuongPT = int.Parse(soluongTB.Text); + PhieuDTO.SoTienPT = gtien; + PhieuDTO.MaVatTuPT = int.Parse(comboBoxMaVatTu.SelectedValue.ToString()); + PhieuDTO.DiaChiMuaPT = DiaChiTB.Text; + + //2. Kiểm tra data hợp lệ or not + if(gtien > tsDTO[0].SoTienToiDaPT) + { + MessageBox.Show("Đã vượt quá số tiền quy định"); + return; + } + //3. Thêm vào DB + bool result = phieumuaBUS.themPhieu(PhieuDTO); + if (result == false) + MessageBox.Show("Thêm Phiếu mua thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Thêm Phiếu thành công"); + } + + private void button2_Click(object sender, EventArgs e) + { + comboBoxMaVatTu.ResetText(); + maPhieuMuaTB.ResetText(); + VattuTB.ResetText(); + DiaChiTB.ResetText(); + soluongTB.ResetText(); + soTienTB.ResetText(); + dateTimeNgayMua.ResetText(); + + MessageBox.Show("Đã hủy"); + + + } + + private void comboBoxMaVatTu_SelectedIndexChanged(object sender, EventArgs e) + { + + int i = 0; + selectedLoaiVatTu = int.Parse(comboBoxMaVatTu.SelectedValue.ToString()); + VattuTB.ResetText(); + DiaChiTB.ResetText(); + for(i = 0; i< listVatTu.Count; i++) + { + if (selectedLoaiVatTu == listVatTu[i].MaVatTuPT) + { + VattuTB.AppendText(listVatTu[i].TenVatTuPT); + DiaChiTB.AppendText(listVatTu[i].DiaChiBanPT); + gGia = listGiaVatTu[i].GiaVatTuPT; + count = i; + break; + } + } + //VattuTB.AppendText(listVatTu[selectedLoaiVatTu - 1].TenVatTuPT); + //DiaChiTB.AppendText(listVatTu[selectedLoaiVatTu - 1].DiaChiBanPT); + + } + + private void refesh_Click(object sender, EventArgs e) + { + comboBoxMaVatTu.ResetText(); + maPhieuMuaTB.ResetText(); + VattuTB.ResetText(); + DiaChiTB.ResetText(); + soluongTB.ResetText(); + soTienTB.ResetText(); + dateTimeNgayMua.ResetText(); + listVatTu = vattuBus.selectvattu(); + listGiaVatTu = GiaVatTuBus.selectGiaVat(); + loadMaVatTu_Combobox(); + } + + private void soluongTB_TextChanged(object sender, EventArgs e) + { + + if(soluongTB.Text == "") + { + soTienTB.ResetText(); + } + else if (soluongTB.Text.All(char.IsDigit)) + { + int soluongmua = int.Parse(soluongTB.Text); + gtien = soluongmua * gGia; + soTienTB.Text = gtien.ToString(); + } + else + { + MessageBox.Show("Vui lòng chỉ nhập số"); + soluongTB.ResetText(); + } + + } + + + //----------------------------------------------------------------------------------// + //All textbox call Back + + } +} diff --git a/Project1/TreeGUI/PhieuMuaVatTu.resx b/Project1/TreeGUI/PhieuMuaVatTu.resx new file mode 100644 index 0000000..42ff43c --- /dev/null +++ b/Project1/TreeGUI/PhieuMuaVatTu.resx @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAAAYwAAAGMAbOUdMMAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwa + AAADBUlEQVRYR8WXy2sTURTGs1LxgeITQQVBUBEEceGjM8NApeBGVCwuRF1Y/BcUXAlaiqCLokhMZ4YG + xJpC2sykoVrUulDqpqSIUgT3olgMRdC2Er8TM/XMyRnSQYiLXzM557vfmd57c+dMqlqt/lfUYCtRg61E + DcZhF/p2GUXvihm4Y+A9mDEC9xM+y2bRHcZnl1lyN2lj41CDkqP57GYrcPMoUF0CC5bv9hwv9S7XvCRq + kGMVvdMw/SyKNAUz89Yq9B3QPDlqkDg2ll4Lk4eaeQLmDN+9pvmHqEHCKLqPFUPilek7N83AO2mXMtus + YmavETgXjMC7i9xHoZ3H0p3V/EPUIDZapzAiKlbRvajpQ+wX3grc2C1of4GfdJOajtMQoA2HwV/qRUMm + jCC7Q2rjaPO9w1bgdGg5SUPADJwhUbxiDbvbpS4JB4P0SixbL7xv0zXPRYS0nqJ4FXvhMtckhQpiMz9f + 9MM1v4mIGNN2lRfHGr7h+aR0PMmugs941LPGOOVIExmAxDMh7Ob5JNi5e6tN33sp/P6CHGkig5D4IIRn + eD4JSzk5SRMZhOBsROBndvJ8EjB+kHvFMEi7/gEu6HerCX6A79gL97UizWgrOGvMQv9+4TlrD3nrKEca + OvGeCkEDpJHmSwWn5CnhN83zKTtIb8QsTAkRw5kiDR+UBJyeN7if/Gdqf9rz/RuQLHNhnTLl+ICkwOM1 + 96R+gucXL46M9q2HYJKJJynGxUmxfOcS86uBtd/NNZEB9ZsYIP65OI5v+FTCwjXQNUld5Esc9GAxRtxD + Wk6jXnwiUhwPuPZCZovURr5o0CMVg/FodRdA975cbpmmCzF87zx03wAvTmvfqekbAhxqJjB4XphNYyrv + YFbO2YG3509T4pxA7Dpy2rkPnEeaP6EGQ6idgsFco2EiBqi90/wJNcihxpIaTMW4GV+btWOEGpRQi02t + NkxpH2jFJCPmaHqr5iVRg3HQSwfMu+ovIWXMDL2UzOD7OzrhqJ+gpkYbG4cabCVqsJWowdZRTf0GYYEE + 4QrIh7EAAAAASUVORK5CYII= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/Program.cs b/Project1/TreeGUI/Program.cs new file mode 100644 index 0000000..c490399 --- /dev/null +++ b/Project1/TreeGUI/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainWindow()); + } + } +} diff --git a/Project1/TreeGUI/Properties/AssemblyInfo.cs b/Project1/TreeGUI/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..16ebd48 --- /dev/null +++ b/Project1/TreeGUI/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Project1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Project1")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7f61a8fd-be78-4a76-9db3-d8d829466b26")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Project1/TreeGUI/Properties/Resources.Designer.cs b/Project1/TreeGUI/Properties/Resources.Designer.cs new file mode 100644 index 0000000..54c51ef --- /dev/null +++ b/Project1/TreeGUI/Properties/Resources.Designer.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace TreeGUI.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TreeGUI.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap add { + get { + object obj = ResourceManager.GetObject("add", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Project1/TreeGUI/Properties/Resources.resx b/Project1/TreeGUI/Properties/Resources.resx new file mode 100644 index 0000000..aaefb7c --- /dev/null +++ b/Project1/TreeGUI/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Project1/TreeGUI/Properties/Settings.Designer.cs b/Project1/TreeGUI/Properties/Settings.Designer.cs new file mode 100644 index 0000000..f2e0246 --- /dev/null +++ b/Project1/TreeGUI/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace TreeGUI.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Project1/TreeGUI/Properties/Settings.settings b/Project1/TreeGUI/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Project1/TreeGUI/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Project1/TreeGUI/QuanLyCayCanh.Designer.cs b/Project1/TreeGUI/QuanLyCayCanh.Designer.cs new file mode 100644 index 0000000..68e8e70 --- /dev/null +++ b/Project1/TreeGUI/QuanLyCayCanh.Designer.cs @@ -0,0 +1,149 @@ +namespace Project1 +{ + partial class QuanLyCayCanh + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(QuanLyCayCanh)); + this.panelTieuDe = new System.Windows.Forms.Panel(); + this.load = new System.Windows.Forms.Button(); + this.LapLich = new System.Windows.Forms.Button(); + this.MenuCay = new System.Windows.Forms.Button(); + this.LabelTieude = new System.Windows.Forms.Label(); + this.ToolTipThemCay = new System.Windows.Forms.ToolTip(this.components); + this.Dscay = new System.Windows.Forms.DataGridView(); + this.panelTieuDe.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.Dscay)).BeginInit(); + this.SuspendLayout(); + // + // panelTieuDe + // + this.panelTieuDe.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.panelTieuDe.Controls.Add(this.load); + this.panelTieuDe.Controls.Add(this.LapLich); + this.panelTieuDe.Controls.Add(this.MenuCay); + this.panelTieuDe.Controls.Add(this.LabelTieude); + this.panelTieuDe.Location = new System.Drawing.Point(3, 2); + this.panelTieuDe.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.panelTieuDe.Name = "panelTieuDe"; + this.panelTieuDe.Size = new System.Drawing.Size(1082, 62); + this.panelTieuDe.TabIndex = 1; + // + // load + // + this.load.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("load.BackgroundImage"))); + this.load.FlatAppearance.BorderSize = 0; + this.load.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.load.Location = new System.Drawing.Point(907, 11); + this.load.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.load.Name = "load"; + this.load.Size = new System.Drawing.Size(42, 40); + this.load.TabIndex = 5; + this.ToolTipThemCay.SetToolTip(this.load, "Lập Lịch"); + this.load.UseVisualStyleBackColor = true; + this.load.Click += new System.EventHandler(this.load_Click); + // + // LapLich + // + this.LapLich.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("LapLich.BackgroundImage"))); + this.LapLich.FlatAppearance.BorderSize = 0; + this.LapLich.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.LapLich.Location = new System.Drawing.Point(964, 11); + this.LapLich.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.LapLich.Name = "LapLich"; + this.LapLich.Size = new System.Drawing.Size(42, 40); + this.LapLich.TabIndex = 4; + this.ToolTipThemCay.SetToolTip(this.LapLich, "Lập Lịch"); + this.LapLich.UseVisualStyleBackColor = true; + this.LapLich.Click += new System.EventHandler(this.LapLich_Click_1); + // + // MenuCay + // + this.MenuCay.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("MenuCay.BackgroundImage"))); + this.MenuCay.FlatAppearance.BorderSize = 0; + this.MenuCay.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.MenuCay.Location = new System.Drawing.Point(1025, 11); + this.MenuCay.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.MenuCay.Name = "MenuCay"; + this.MenuCay.Size = new System.Drawing.Size(42, 40); + this.MenuCay.TabIndex = 3; + this.ToolTipThemCay.SetToolTip(this.MenuCay, "Menu"); + this.MenuCay.UseVisualStyleBackColor = true; + this.MenuCay.Click += new System.EventHandler(this.MenuCay_Click); + // + // LabelTieude + // + this.LabelTieude.AutoSize = true; + this.LabelTieude.Font = new System.Drawing.Font("Calibri", 22.2F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.LabelTieude.Location = new System.Drawing.Point(348, 7); + this.LabelTieude.Name = "LabelTieude"; + this.LabelTieude.Size = new System.Drawing.Size(343, 46); + this.LabelTieude.TabIndex = 0; + this.LabelTieude.Text = "Danh Sách Cây Cảnh"; + // + // ToolTipThemCay + // + this.ToolTipThemCay.BackColor = System.Drawing.Color.Ivory; + this.ToolTipThemCay.ForeColor = System.Drawing.Color.Ivory; + // + // Dscay + // + this.Dscay.Cursor = System.Windows.Forms.Cursors.SizeAll; + this.Dscay.Location = new System.Drawing.Point(3, 58); + this.Dscay.Name = "Dscay"; + this.Dscay.RowTemplate.Height = 24; + this.Dscay.Size = new System.Drawing.Size(1082, 554); + this.Dscay.TabIndex = 2; + // + // QuanLyCayCanh + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.Dscay); + this.Controls.Add(this.panelTieuDe); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "QuanLyCayCanh"; + this.Size = new System.Drawing.Size(1085, 615); + this.Load += new System.EventHandler(this.QuanLyCayCanh_Load); + this.panelTieuDe.ResumeLayout(false); + this.panelTieuDe.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.Dscay)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.Panel panelTieuDe; + private System.Windows.Forms.Button MenuCay; + private System.Windows.Forms.Label LabelTieude; + private System.Windows.Forms.Button LapLich; + private System.Windows.Forms.ToolTip ToolTipThemCay; + private System.Windows.Forms.DataGridView Dscay; + private System.Windows.Forms.Button load; + } +} diff --git a/Project1/TreeGUI/QuanLyCayCanh.cs b/Project1/TreeGUI/QuanLyCayCanh.cs new file mode 100644 index 0000000..871de68 --- /dev/null +++ b/Project1/TreeGUI/QuanLyCayCanh.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TreeBUS; +using TreeDTO; +namespace Project1 +{ + public partial class QuanLyCayCanh : UserControl + { + private ViTriBUS vtBus; + private LoaiCayBUS loaiBus; + private CayCanhBUS cayBus; + private TinhTrangBUS tinhtrangBus; + private List listloai; + private List listVT; + private List listtinhtrang; + public QuanLyCayCanh() + { + InitializeComponent(); + + } + private void QuanLyCayCanh_Load(object sender, EventArgs e) + { + vtBus = new ViTriBUS(); + loaiBus = new LoaiCayBUS(); + cayBus = new CayCanhBUS(); + tinhtrangBus = new TinhTrangBUS(); + listtinhtrang = tinhtrangBus.selectTT(); + listloai = loaiBus.selectLoaiCay(); + listVT = vtBus.selectVT(); + loadData_Vao_GridView(); + + } + //--------------------------------------------------------------------------------// + //2 function callback button ở trên cùng + private void MenuCay_Click(object sender, EventArgs e) + { + MenuCay f = new MenuCay(); + f.ShowDialog(); + } + //Lap Lich Button + + + + private void loadData_Vao_GridView() + { + List listCayCanh = cayBus.select(); + int i = 0, j = 0; + + if (listCayCanh == null) + { + MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); + return; + } + for(i = 0; i < listCayCanh.Count(); i++) + { + listCayCanh[i].TenTinhTrangPT = listtinhtrang[listCayCanh[i].TinhTrangPT - 1].TenTinhTrangPT; + listCayCanh[i].TenLoaiPT = listloai[listCayCanh[i].MaLoaiCayCanhPT - 1].TenLoaiCayPT; + for (j = 0; j < listVT.Count(); j++) + { + if(listVT[j].MaViTriPT == listCayCanh[i].MaViTriPT) + { + listCayCanh[i].TenViTriPT = listVT[j].TenViTriPT; + break; + } + } + + } + Dscay.Columns.Clear(); + Dscay.DataSource = null; + + Dscay.AutoGenerateColumns = false; + Dscay.AllowUserToAddRows = false; + Dscay.DataSource = listCayCanh; + + + DataGridViewTextBoxColumn clTen = new DataGridViewTextBoxColumn(); + clTen.Name = "TenCay"; + clTen.HeaderText = "Tên Cay"; + clTen.DataPropertyName = "TenCayPT"; + Dscay.Columns.Add(clTen); + + DataGridViewTextBoxColumn clloaicay = new DataGridViewTextBoxColumn(); + clloaicay.Name = "LoaiCayCanh"; + clloaicay.HeaderText = "Loại Cây"; + clloaicay.DataPropertyName = "TenLoaiPT"; + Dscay.Columns.Add(clloaicay); + + + DataGridViewTextBoxColumn clvitri = new DataGridViewTextBoxColumn(); + clvitri.Name = "ViTri"; + clvitri.HeaderText = "Vị Trí"; + clvitri.DataPropertyName = "TenViTriPT"; + Dscay.Columns.Add(clvitri); + + DataGridViewTextBoxColumn cltinhTrang = new DataGridViewTextBoxColumn(); + cltinhTrang.Name = "tinhTrang"; + cltinhTrang.HeaderText = "Tình Trạng"; + cltinhTrang.DataPropertyName = "TenTinhTrangPT"; + Dscay.Columns.Add(cltinhTrang); + + //tro du lieu va cap nhat len datagrid + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[Dscay.DataSource]; + myCurrencyManager.Refresh(); + } + + + private void LapLich_Click_1(object sender, EventArgs e) + { + LichCS lich = new LichCS(); + lich.ShowDialog(); + } + + private void load_Click(object sender, EventArgs e) + { + loadData_Vao_GridView(); + } + } +} diff --git a/Project1/TreeGUI/QuanLyCayCanh.resx b/Project1/TreeGUI/QuanLyCayCanh.resx new file mode 100644 index 0000000..7a00421 --- /dev/null +++ b/Project1/TreeGUI/QuanLyCayCanh.resx @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAAAYwAAAGMAbOUdMMAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwa + AAADBUlEQVRYR8WXy2sTURTGs1LxgeITQQVBUBEEceGjM8NApeBGVCwuRF1Y/BcUXAl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h1uGOsNZhV6qA7pJVQdO0Xld + 6C3cdqht0aogqQ6EuZwhaG3Fiu+wKknOOs+ZhBr6VugkpAOkVTFnnWs4Uq9dtPTH0BarsCo3QSflrtCR + TMvCumCQtP9XHtNf4hzWhYPwG68QjWn8gtVAHXqwKfQUo9iB1VA/9Nr1drNC47SE2B6Rotm+jOy/ZmGo + 59vI6Yjqapl2LbU6oV1rFtq/D6AvmZ5Q9Fu5T9A5r7XDxaMo/gNs+8VbZwPO0gAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/Project1/TreeGUI/Resources/12670836_259419054393807_70246416484125136_n.png b/Project1/TreeGUI/Resources/12670836_259419054393807_70246416484125136_n.png new file mode 100644 index 0000000..d0cfde0 Binary files /dev/null and b/Project1/TreeGUI/Resources/12670836_259419054393807_70246416484125136_n.png differ diff --git a/Project1/TreeGUI/Resources/12670836_259419054393807_70246416484125136_n1.png b/Project1/TreeGUI/Resources/12670836_259419054393807_70246416484125136_n1.png new file mode 100644 index 0000000..d0cfde0 Binary files /dev/null and b/Project1/TreeGUI/Resources/12670836_259419054393807_70246416484125136_n1.png differ diff --git a/Project1/TreeGUI/Resources/add (1).png b/Project1/TreeGUI/Resources/add (1).png new file mode 100644 index 0000000..5695066 Binary files /dev/null and b/Project1/TreeGUI/Resources/add (1).png differ diff --git a/Project1/TreeGUI/Resources/add (2).png b/Project1/TreeGUI/Resources/add (2).png new file mode 100644 index 0000000..19819bc Binary files /dev/null and b/Project1/TreeGUI/Resources/add (2).png differ diff --git a/Project1/TreeGUI/Resources/add.png b/Project1/TreeGUI/Resources/add.png new file mode 100644 index 0000000..526fe17 Binary files /dev/null and b/Project1/TreeGUI/Resources/add.png differ diff --git a/Project1/TreeGUI/SettingThamSo.Designer.cs b/Project1/TreeGUI/SettingThamSo.Designer.cs new file mode 100644 index 0000000..41ec573 --- /dev/null +++ b/Project1/TreeGUI/SettingThamSo.Designer.cs @@ -0,0 +1,148 @@ +namespace Project1 +{ + partial class Setting + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Setting)); + this.suaDoiBT = new System.Windows.Forms.Button(); + this.STTDLB = new System.Windows.Forms.Label(); + this.SCTDLB = new System.Windows.Forms.Label(); + this.TienTB = new System.Windows.Forms.TextBox(); + this.CayTB = new System.Windows.Forms.TextBox(); + this.Hủy = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // suaDoiBT + // + this.suaDoiBT.Location = new System.Drawing.Point(82, 100); + this.suaDoiBT.Margin = new System.Windows.Forms.Padding(2); + this.suaDoiBT.Name = "suaDoiBT"; + this.suaDoiBT.Size = new System.Drawing.Size(76, 25); + this.suaDoiBT.TabIndex = 0; + this.suaDoiBT.Text = "Sửa Đổi"; + this.suaDoiBT.UseVisualStyleBackColor = true; + this.suaDoiBT.Click += new System.EventHandler(this.suaDoiBT_Click); + // + // STTDLB + // + this.STTDLB.AutoSize = true; + this.STTDLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.STTDLB.Location = new System.Drawing.Point(31, 22); + this.STTDLB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.STTDLB.Name = "STTDLB"; + this.STTDLB.Size = new System.Drawing.Size(139, 19); + this.STTDLB.TabIndex = 1; + this.STTDLB.Text = "Số Tiền Mua Tối Đa:"; + // + // SCTDLB + // + this.SCTDLB.AutoSize = true; + this.SCTDLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.SCTDLB.Location = new System.Drawing.Point(31, 67); + this.SCTDLB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.SCTDLB.Name = "SCTDLB"; + this.SCTDLB.Size = new System.Drawing.Size(145, 19); + this.SCTDLB.TabIndex = 2; + this.SCTDLB.Text = "Số Lượng Cây Tối Đa:"; + // + // TienTB + // + this.TienTB.Location = new System.Drawing.Point(200, 23); + this.TienTB.Margin = new System.Windows.Forms.Padding(2); + this.TienTB.Name = "TienTB"; + this.TienTB.ReadOnly = true; + this.TienTB.Size = new System.Drawing.Size(176, 20); + this.TienTB.TabIndex = 3; + // + // CayTB + // + this.CayTB.Location = new System.Drawing.Point(200, 70); + this.CayTB.Margin = new System.Windows.Forms.Padding(2); + this.CayTB.Name = "CayTB"; + this.CayTB.ReadOnly = true; + this.CayTB.Size = new System.Drawing.Size(176, 20); + this.CayTB.TabIndex = 4; + // + // Hủy + // + this.Hủy.Location = new System.Drawing.Point(208, 100); + this.Hủy.Margin = new System.Windows.Forms.Padding(2); + this.Hủy.Name = "Hủy"; + this.Hủy.Size = new System.Drawing.Size(76, 25); + this.Hủy.TabIndex = 5; + this.Hủy.Text = "Hủy"; + this.Hủy.UseVisualStyleBackColor = true; + this.Hủy.Click += new System.EventHandler(this.Hủy_Click); + // + // panel1 + // + this.panel1.Controls.Add(this.Hủy); + this.panel1.Controls.Add(this.CayTB); + this.panel1.Controls.Add(this.TienTB); + this.panel1.Controls.Add(this.SCTDLB); + this.panel1.Controls.Add(this.STTDLB); + this.panel1.Controls.Add(this.suaDoiBT); + this.panel1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Margin = new System.Windows.Forms.Padding(2); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(384, 145); + this.panel1.TabIndex = 0; + // + // Setting + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(384, 145); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(2); + this.Name = "Setting"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Chỉnh Sửa Tham Số"; + this.Load += new System.EventHandler(this.Setting_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button suaDoiBT; + private System.Windows.Forms.Label STTDLB; + private System.Windows.Forms.Label SCTDLB; + private System.Windows.Forms.TextBox TienTB; + private System.Windows.Forms.TextBox CayTB; + private System.Windows.Forms.Button Hủy; + private System.Windows.Forms.Panel panel1; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/SettingThamSo.cs b/Project1/TreeGUI/SettingThamSo.cs new file mode 100644 index 0000000..b8ae04e --- /dev/null +++ b/Project1/TreeGUI/SettingThamSo.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TreeBUS; +using TreeDTO; + +namespace Project1 +{ + public partial class Setting : Form + { + ThamSoBUS TSbus; + List ListThamSo; + int count = 0; + public Setting() + { + InitializeComponent(); + } + + private void Setting_Load(object sender, EventArgs e) + { + TSbus = new ThamSoBUS(); + + Xuly(); + } + private void Xuly() + { + ListThamSo = TSbus.selectThamSo(); + TienTB.ResetText(); + CayTB.ResetText(); + TienTB.AppendText(ListThamSo[0].SoTienToiDaPT.ToString()); + CayTB.AppendText(ListThamSo[0].SoCayToiDaPT.ToString()); + } + + private void Hủy_Click(object sender, EventArgs e) + { + TienTB.ResetText(); + CayTB.ResetText(); + TienTB.AppendText(ListThamSo[0].SoTienToiDaPT.ToString()); + CayTB.AppendText(ListThamSo[0].SoCayToiDaPT.ToString()); + this.Hide(); + } + + private void suaDoiBT_Click(object sender, EventArgs e) + { + if(count == 0) + { + TienTB.ReadOnly = false; + CayTB.ReadOnly = false; + count++; + MessageBox.Show("Bắt Đầu Chỉnh Sửa"); + return; + } + if(count == 1) + { + TienTB.ReadOnly = true; + CayTB.ReadOnly = true; + count = 0; + if(TienTB.Text == "" || CayTB.Text == "") + { + MessageBox.Show("Vui lòng nhập dữ liệu"); + return; + } + ThamSoDTO Thamso = new ThamSoDTO(); + Thamso.SoTienToiDaPT = int.Parse(TienTB.Text); + Thamso.SoCayToiDaPT = int.Parse(CayTB.Text); + + //3. Thêm vào DB + bool kq = TSbus.suaThamSo(Thamso); + if (kq == false) + MessageBox.Show("Sửa thông tin Tham Số thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Cập nhận thông tin Tham Số thành công"); + Xuly(); + count = 0; + } + } + } +} diff --git a/Project1/TreeGUI/SettingThamSo.resx b/Project1/TreeGUI/SettingThamSo.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/SettingThamSo.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz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AcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/Settings.cs b/Project1/TreeGUI/Settings.cs new file mode 100644 index 0000000..a86fb2e --- /dev/null +++ b/Project1/TreeGUI/Settings.cs @@ -0,0 +1,28 @@ +namespace TreeGUI.Properties { + + + // This class allows you to handle specific events on the settings class: + // The SettingChanging event is raised before a setting's value is changed. + // The PropertyChanged event is raised after a setting's value is changed. + // The SettingsLoaded event is raised after the setting values are loaded. + // The SettingsSaving event is raised before the setting values are saved. + internal sealed partial class Settings { + + public Settings() { + // // To add event handlers for saving and changing settings, uncomment the lines below: + // + // this.SettingChanging += this.SettingChangingEventHandler; + // + // this.SettingsSaving += this.SettingsSavingEventHandler; + // + } + + private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { + // Add code to handle the SettingChangingEvent event here. + } + + private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { + // Add code to handle the SettingsSaving event here. + } + } +} diff --git a/Project1/TreeGUI/SuaCay.Designer.cs b/Project1/TreeGUI/SuaCay.Designer.cs new file mode 100644 index 0000000..906a620 --- /dev/null +++ b/Project1/TreeGUI/SuaCay.Designer.cs @@ -0,0 +1,281 @@ +namespace Project1 +{ + partial class SuaCay + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SuaCay)); + this.panel1 = new System.Windows.Forms.Panel(); + this.dateTimeNgayTrong = new System.Windows.Forms.DateTimePicker(); + this.comboBoxTinhTrang = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.MaCay = new System.Windows.Forms.Label(); + this.MaCayTB = new System.Windows.Forms.TextBox(); + this.comboBoxLoaiCay = new System.Windows.Forms.ComboBox(); + this.comboBoxVitri = new System.Windows.Forms.ComboBox(); + this.SuaButton = new System.Windows.Forms.Button(); + this.Huy = new System.Windows.Forms.Button(); + this.labelTieuDe = new System.Windows.Forms.Label(); + this.LoaiCay = new System.Windows.Forms.Label(); + this.NgayTrong = new System.Windows.Forms.Label(); + this.ViTri = new System.Windows.Forms.Label(); + this.TenCay = new System.Windows.Forms.Label(); + this.TenCaytb = new System.Windows.Forms.TextBox(); + this.TimButton = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.TimButton); + this.panel1.Controls.Add(this.dateTimeNgayTrong); + this.panel1.Controls.Add(this.comboBoxTinhTrang); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.MaCay); + this.panel1.Controls.Add(this.MaCayTB); + this.panel1.Controls.Add(this.comboBoxLoaiCay); + this.panel1.Controls.Add(this.comboBoxVitri); + this.panel1.Controls.Add(this.SuaButton); + this.panel1.Controls.Add(this.Huy); + this.panel1.Controls.Add(this.labelTieuDe); + this.panel1.Controls.Add(this.LoaiCay); + this.panel1.Controls.Add(this.NgayTrong); + this.panel1.Controls.Add(this.ViTri); + this.panel1.Controls.Add(this.TenCay); + this.panel1.Controls.Add(this.TenCaytb); + this.panel1.Location = new System.Drawing.Point(5, 16); + this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(856, 517); + this.panel1.TabIndex = 2; + // + // dateTimeNgayTrong + // + this.dateTimeNgayTrong.Location = new System.Drawing.Point(251, 405); + this.dateTimeNgayTrong.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.dateTimeNgayTrong.Name = "dateTimeNgayTrong"; + this.dateTimeNgayTrong.Size = new System.Drawing.Size(491, 22); + this.dateTimeNgayTrong.TabIndex = 34; + this.dateTimeNgayTrong.Value = new System.DateTime(2019, 6, 1, 0, 0, 0, 0); + // + // comboBoxTinhTrang + // + this.comboBoxTinhTrang.FormattingEnabled = true; + this.comboBoxTinhTrang.Location = new System.Drawing.Point(251, 354); + this.comboBoxTinhTrang.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.comboBoxTinhTrang.Name = "comboBoxTinhTrang"; + this.comboBoxTinhTrang.Size = new System.Drawing.Size(491, 24); + this.comboBoxTinhTrang.TabIndex = 33; + + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(83, 354); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(108, 24); + this.label1.TabIndex = 32; + this.label1.Text = "Tình Trạng :"; + // + // MaCay + // + this.MaCay.AutoSize = true; + this.MaCay.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.MaCay.Location = new System.Drawing.Point(83, 138); + this.MaCay.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.MaCay.Name = "MaCay"; + this.MaCay.Size = new System.Drawing.Size(77, 24); + this.MaCay.TabIndex = 31; + this.MaCay.Text = "Mã Cây:"; + // + // MaCayTB + // + this.MaCayTB.Location = new System.Drawing.Point(251, 138); + this.MaCayTB.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.MaCayTB.Name = "MaCayTB"; + this.MaCayTB.Size = new System.Drawing.Size(491, 22); + this.MaCayTB.TabIndex = 30; + // + // comboBoxLoaiCay + // + this.comboBoxLoaiCay.FormattingEnabled = true; + this.comboBoxLoaiCay.Location = new System.Drawing.Point(251, 247); + this.comboBoxLoaiCay.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.comboBoxLoaiCay.Name = "comboBoxLoaiCay"; + this.comboBoxLoaiCay.Size = new System.Drawing.Size(491, 24); + this.comboBoxLoaiCay.TabIndex = 29; + // + // comboBoxVitri + // + this.comboBoxVitri.FormattingEnabled = true; + this.comboBoxVitri.Location = new System.Drawing.Point(251, 297); + this.comboBoxVitri.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.comboBoxVitri.Name = "comboBoxVitri"; + this.comboBoxVitri.Size = new System.Drawing.Size(491, 24); + this.comboBoxVitri.TabIndex = 28; + // + // SuaButton + // + this.SuaButton.Font = new System.Drawing.Font("Calibri", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.SuaButton.Location = new System.Drawing.Point(164, 452); + this.SuaButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.SuaButton.Name = "SuaButton"; + this.SuaButton.Size = new System.Drawing.Size(200, 50); + this.SuaButton.TabIndex = 27; + this.SuaButton.Text = "Sửa"; + this.SuaButton.UseVisualStyleBackColor = true; + this.SuaButton.Click += new System.EventHandler(this.SuaButton_Click); + // + // Huy + // + this.Huy.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.Huy.Font = new System.Drawing.Font("Calibri", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Huy.Location = new System.Drawing.Point(423, 452); + this.Huy.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Huy.Name = "Huy"; + this.Huy.Size = new System.Drawing.Size(200, 50); + this.Huy.TabIndex = 27; + this.Huy.Text = "Hủy"; + this.Huy.UseVisualStyleBackColor = true; + // + // labelTieuDe + // + this.labelTieuDe.AutoSize = true; + this.labelTieuDe.Font = new System.Drawing.Font("Calibri", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelTieuDe.ForeColor = System.Drawing.Color.DarkSlateGray; + this.labelTieuDe.Location = new System.Drawing.Point(245, 25); + this.labelTieuDe.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTieuDe.Name = "labelTieuDe"; + this.labelTieuDe.Size = new System.Drawing.Size(319, 49); + this.labelTieuDe.TabIndex = 25; + this.labelTieuDe.Text = "Sửa Thông Tin Cây"; + // + // LoaiCay + // + this.LoaiCay.AutoSize = true; + this.LoaiCay.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.LoaiCay.Location = new System.Drawing.Point(83, 247); + this.LoaiCay.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.LoaiCay.Name = "LoaiCay"; + this.LoaiCay.Size = new System.Drawing.Size(84, 24); + this.LoaiCay.TabIndex = 24; + this.LoaiCay.Text = "Loại Cây:"; + // + // NgayTrong + // + this.NgayTrong.AutoSize = true; + this.NgayTrong.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.NgayTrong.Location = new System.Drawing.Point(83, 402); + this.NgayTrong.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.NgayTrong.Name = "NgayTrong"; + this.NgayTrong.Size = new System.Drawing.Size(113, 24); + this.NgayTrong.TabIndex = 21; + this.NgayTrong.Text = "Ngày Trồng: "; + // + // ViTri + // + this.ViTri.AutoSize = true; + this.ViTri.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ViTri.Location = new System.Drawing.Point(83, 306); + this.ViTri.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.ViTri.Name = "ViTri"; + this.ViTri.Size = new System.Drawing.Size(62, 24); + this.ViTri.TabIndex = 20; + this.ViTri.Text = "Vị Trí :"; + // + // TenCay + // + this.TenCay.AutoSize = true; + this.TenCay.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TenCay.Location = new System.Drawing.Point(83, 193); + this.TenCay.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.TenCay.Name = "TenCay"; + this.TenCay.Size = new System.Drawing.Size(84, 24); + this.TenCay.TabIndex = 19; + this.TenCay.Text = "Tên Cây :"; + // + // TenCaytb + // + this.TenCaytb.Location = new System.Drawing.Point(251, 193); + this.TenCaytb.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.TenCaytb.Name = "TenCaytb"; + this.TenCaytb.Size = new System.Drawing.Size(491, 22); + this.TenCaytb.TabIndex = 13; + // + // TimButton + // + this.TimButton.Location = new System.Drawing.Point(765, 136); + this.TimButton.Name = "TimButton"; + this.TimButton.Size = new System.Drawing.Size(75, 23); + this.TimButton.TabIndex = 35; + this.TimButton.Text = "Tìm"; + this.TimButton.UseVisualStyleBackColor = true; + this.TimButton.Click += new System.EventHandler(this.TimButton_Click); + // + // SuaCay + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(861, 530); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "SuaCay"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Sửa Cây"; + this.Load += new System.EventHandler(this.SuaCay_Load); + this.Leave += new System.EventHandler(this.Huy_Click); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label MaCay; + private System.Windows.Forms.TextBox MaCayTB; + private System.Windows.Forms.ComboBox comboBoxLoaiCay; + private System.Windows.Forms.ComboBox comboBoxVitri; + private System.Windows.Forms.Button SuaButton; + private System.Windows.Forms.Button Huy; + private System.Windows.Forms.Label labelTieuDe; + private System.Windows.Forms.Label LoaiCay; + private System.Windows.Forms.Label NgayTrong; + private System.Windows.Forms.Label ViTri; + private System.Windows.Forms.Label TenCay; + private System.Windows.Forms.TextBox TenCaytb; + private System.Windows.Forms.ComboBox comboBoxTinhTrang; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.DateTimePicker dateTimeNgayTrong; + private System.Windows.Forms.Button TimButton; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/SuaCay.cs b/Project1/TreeGUI/SuaCay.cs new file mode 100644 index 0000000..c0550cb --- /dev/null +++ b/Project1/TreeGUI/SuaCay.cs @@ -0,0 +1,219 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TreeDTO; +using TreeBUS; + +namespace Project1 +{ + public partial class SuaCay : Form + { + //-------------------------------------------------------------------// + private CayCanhBUS cayBus; + private LoaiCayBUS LoaiCayBus; + private ViTriBUS ViTriBus; + private TinhTrangBUS TinhTrangBus; + private ThamSoBUS thamso; + private List tsDTO; + private List listViTri; + private int vitricu; + //------------------------------------------------------------------// + public SuaCay() + { + InitializeComponent(); + } + private void SuaCay_Load(object sender, EventArgs e) + { + + cayBus = new CayCanhBUS(); + ViTriBus = new ViTriBUS(); + LoaiCayBus = new LoaiCayBUS(); + TinhTrangBus = new TinhTrangBUS(); + thamso = new ThamSoBUS(); + tsDTO = thamso.selectThamSo(); + TenCaytb.ReadOnly = true; + + } + private void SuaButton_Click(object sender, EventArgs e) + { + int i = 0, vitrimoi = 0; + if (TenCaytb.Text == "") + { + MessageBox.Show("Vui lòng nhập đầy đủ trước khi sửa"); + return; + } + //1. Map data from GUI + CaycanhDTO cayDTO = new CaycanhDTO(); + cayDTO.MaCayCanhPT = MaCayTB.Text; + cayDTO.TenCayPT = TenCaytb.Text; + cayDTO.NgayTrongPT = DateTime.Parse(dateTimeNgayTrong.Value.ToString()); + cayDTO.MaViTriPT = int.Parse(comboBoxVitri.SelectedValue.ToString()); + cayDTO.MaLoaiCayCanhPT = int.Parse(comboBoxLoaiCay.SelectedValue.ToString()); + cayDTO.TinhTrangPT = int.Parse(comboBoxTinhTrang.SelectedValue.ToString()); + + //2. Kiểm tra data hợp lệ or not + for (i = 0; i < listViTri.Count(); i++) + { + if (listViTri[i].MaViTriPT == cayDTO.MaViTriPT) + { + vitrimoi = i; + break; + } + } + if (tsDTO[0].SoCayToiDaPT < listViTri[vitrimoi].SoLuongPT) + { + MessageBox.Show("Số lương Cây cảnh đã vượt quá số lương tối đa của vị trí. Vui lòng chọn vị trí khác"); + return; + } + else + { + + + if (vitricu != vitrimoi) + { + ViTriDTO suavt = new ViTriDTO(); + ViTriDTO suavt1 = new ViTriDTO(); + suavt.MaViTriPT = listViTri[vitrimoi].MaViTriPT; + suavt.TenViTriPT = listViTri[vitrimoi].TenViTriPT; + suavt.SoLuongPT = listViTri[vitrimoi].SoLuongPT + 1; + suavt1.MaViTriPT = listViTri[vitricu].MaViTriPT; + suavt1.TenViTriPT = listViTri[vitricu].TenViTriPT; + suavt1.SoLuongPT = listViTri[vitricu].SoLuongPT - 1; + bool result1 = ViTriBus.suaViTri(suavt); + bool result2 = ViTriBus.suaViTri(suavt1); + if (result1 == false || result2 == false) + { + MessageBox.Show("có vấn đề đang xảy ra"); + } + + } + + } + //3. Thêm vào DB + bool kq = cayBus.suaCay(cayDTO); + if (kq == false) + MessageBox.Show("Sửa thông tin cây thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Cập nhận thông tin cây thành công"); + } + + private void Huy_Click(object sender, EventArgs e) + { + + } + private void loadViTriVao_Combobox(int number) + { + listViTri = ViTriBus.selectVT(); + + if (listViTri == null) + { + MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); + return; + } + comboBoxVitri.DataSource = new BindingSource(listViTri, String.Empty); + comboBoxVitri.DisplayMember = "TenViTriPT"; + comboBoxVitri.ValueMember = "MaViTriPT"; + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[comboBoxVitri.DataSource]; + myCurrencyManager.Refresh(); + + if (comboBoxVitri.Items.Count > 0) + { + comboBoxVitri.SelectedIndex = number; + } + + } + private void loadLoaiCayVao_Combobox(int number) + { + List listLoaiCay = LoaiCayBus.selectLoaiCay(); + + if (listLoaiCay == null) + { + MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); + return; + } + comboBoxLoaiCay.DataSource = new BindingSource(listLoaiCay, String.Empty); + comboBoxLoaiCay.DisplayMember = "TenLoaiCayPT"; + comboBoxLoaiCay.ValueMember = "MaLoaiCayPT"; + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[comboBoxLoaiCay.DataSource]; + myCurrencyManager.Refresh(); + + if (comboBoxLoaiCay.Items.Count > 0) + { + comboBoxLoaiCay.SelectedIndex = number; + } + + } + private void loadTinhTrangVao_Combobox(int number) + { + List listTinhTrang = TinhTrangBus.selectTT(); + + if (listTinhTrang == null) + { + MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); + return; + } + comboBoxTinhTrang.DataSource = new BindingSource(listTinhTrang, String.Empty); + comboBoxTinhTrang.DisplayMember = "TenTinhTrangPT"; + comboBoxTinhTrang.ValueMember = "MaTinhTrangPT"; + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[comboBoxTinhTrang.DataSource]; + myCurrencyManager.Refresh(); + + if (comboBoxTinhTrang.Items.Count > 0) + { + comboBoxTinhTrang.SelectedIndex = number; + } + + + } + + private void TimButton_Click(object sender, EventArgs e) + { + int i = 0; + string sKeyword = MaCayTB.Text.Trim(); + List listcayCanh = cayBus.selectByKeyWord(sKeyword); + if(listcayCanh == null || listcayCanh.Count == 0) + { + MessageBox.Show("Không tìm thấy cây cảnh cần cập nhận"); + return; + } + if(sKeyword == "") + { + MessageBox.Show("Vui lòng nhập mã cây"); + return; + } + for(i = 0; i < listcayCanh.Count; i++) + { + if(listcayCanh[i].MaCayCanhPT == sKeyword){ + vitricu = i; + TenCaytb.ResetText(); + loadViTriVao_Combobox(listcayCanh[i].MaViTriPT - 1); + loadLoaiCayVao_Combobox(listcayCanh[i].MaLoaiCayCanhPT - 1); + loadTinhTrangVao_Combobox(listcayCanh[i].TinhTrangPT - 1); + TenCaytb.AppendText(listcayCanh[i].TenCayPT); + TenCaytb.ReadOnly = false; + MaCayTB.ReadOnly = true; + MessageBox.Show("Tìm được cần sửa.Đã sẵn sàng cập nhận"); + break; + } + else + { + MessageBox.Show("Không tìm thấy cây cảnh cần cập nhận"); + } + } + + + } + + + } + +} \ No newline at end of file diff --git a/Project1/TreeGUI/SuaCay.resx b/Project1/TreeGUI/SuaCay.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/SuaCay.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIx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AAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/SuaVatTu.Designer.cs b/Project1/TreeGUI/SuaVatTu.Designer.cs new file mode 100644 index 0000000..4705ce6 --- /dev/null +++ b/Project1/TreeGUI/SuaVatTu.Designer.cs @@ -0,0 +1,171 @@ +namespace Project1 +{ + partial class SuaVatTu + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SuaVatTu)); + this.HuyBT = new System.Windows.Forms.Button(); + this.suaBT = new System.Windows.Forms.Button(); + this.diaChiTB = new System.Windows.Forms.TextBox(); + this.tenVatTuTB = new System.Windows.Forms.TextBox(); + this.diachiLB = new System.Windows.Forms.Label(); + this.tenVatTuLB = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.giaBT = new System.Windows.Forms.TextBox(); + this.maVatTuTB = new System.Windows.Forms.TextBox(); + this.maVatTuLB = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // HuyBT + // + this.HuyBT.Location = new System.Drawing.Point(234, 203); + this.HuyBT.Name = "HuyBT"; + this.HuyBT.Size = new System.Drawing.Size(107, 29); + this.HuyBT.TabIndex = 15; + this.HuyBT.Text = "Hủy"; + this.HuyBT.UseVisualStyleBackColor = true; + this.HuyBT.Click += new System.EventHandler(this.HuyBT_Click); + // + // suaBT + // + this.suaBT.Location = new System.Drawing.Point(53, 203); + this.suaBT.Name = "suaBT"; + this.suaBT.Size = new System.Drawing.Size(107, 29); + this.suaBT.TabIndex = 14; + this.suaBT.Text = "Sửa"; + this.suaBT.UseVisualStyleBackColor = true; + this.suaBT.Click += new System.EventHandler(this.suaBT_Click); + // + // diaChiTB + // + this.diaChiTB.Location = new System.Drawing.Point(119, 118); + this.diaChiTB.Name = "diaChiTB"; + this.diaChiTB.Size = new System.Drawing.Size(256, 20); + this.diaChiTB.TabIndex = 13; + // + // tenVatTuTB + // + this.tenVatTuTB.Location = new System.Drawing.Point(119, 79); + this.tenVatTuTB.Name = "tenVatTuTB"; + this.tenVatTuTB.Size = new System.Drawing.Size(256, 20); + this.tenVatTuTB.TabIndex = 12; + // + // diachiLB + // + this.diachiLB.AutoSize = true; + this.diachiLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.diachiLB.Location = new System.Drawing.Point(19, 119); + this.diachiLB.Name = "diachiLB"; + this.diachiLB.Size = new System.Drawing.Size(60, 19); + this.diachiLB.TabIndex = 10; + this.diachiLB.Text = "Địa Chỉ:"; + // + // tenVatTuLB + // + this.tenVatTuLB.AutoSize = true; + this.tenVatTuLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tenVatTuLB.Location = new System.Drawing.Point(19, 80); + this.tenVatTuLB.Name = "tenVatTuLB"; + this.tenVatTuLB.Size = new System.Drawing.Size(82, 19); + this.tenVatTuLB.TabIndex = 9; + this.tenVatTuLB.Text = "Tên Vật Tư:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(19, 160); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(35, 19); + this.label1.TabIndex = 16; + this.label1.Text = "Giá:"; + // + // giaBT + // + this.giaBT.Location = new System.Drawing.Point(119, 159); + this.giaBT.Name = "giaBT"; + this.giaBT.Size = new System.Drawing.Size(256, 20); + this.giaBT.TabIndex = 17; + // + // maVatTuTB + // + this.maVatTuTB.Location = new System.Drawing.Point(119, 41); + this.maVatTuTB.Name = "maVatTuTB"; + this.maVatTuTB.Size = new System.Drawing.Size(256, 20); + this.maVatTuTB.TabIndex = 11; + // + // maVatTuLB + // + this.maVatTuLB.AutoSize = true; + this.maVatTuLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.maVatTuLB.Location = new System.Drawing.Point(19, 41); + this.maVatTuLB.Name = "maVatTuLB"; + this.maVatTuLB.Size = new System.Drawing.Size(80, 19); + this.maVatTuLB.TabIndex = 8; + this.maVatTuLB.Text = "Mã Vật Tư:"; + // + // SuaVatTu + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(389, 247); + this.Controls.Add(this.giaBT); + this.Controls.Add(this.label1); + this.Controls.Add(this.HuyBT); + this.Controls.Add(this.suaBT); + this.Controls.Add(this.diaChiTB); + this.Controls.Add(this.tenVatTuTB); + this.Controls.Add(this.maVatTuTB); + this.Controls.Add(this.diachiLB); + this.Controls.Add(this.tenVatTuLB); + this.Controls.Add(this.maVatTuLB); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "SuaVatTu"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "SuaVatTu"; + this.Load += new System.EventHandler(this.SuaVatTu_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button HuyBT; + private System.Windows.Forms.Button suaBT; + private System.Windows.Forms.TextBox diaChiTB; + private System.Windows.Forms.TextBox tenVatTuTB; + private System.Windows.Forms.Label diachiLB; + private System.Windows.Forms.Label tenVatTuLB; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox giaBT; + private System.Windows.Forms.TextBox maVatTuTB; + private System.Windows.Forms.Label maVatTuLB; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/SuaVatTu.cs b/Project1/TreeGUI/SuaVatTu.cs new file mode 100644 index 0000000..a711326 --- /dev/null +++ b/Project1/TreeGUI/SuaVatTu.cs @@ -0,0 +1,72 @@ + +using System; +using TreeBUS; +using TreeDTO; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class SuaVatTu : Form + { + private VattuBUS vattu; + private GiaVatTuBUS giabus; + private int macuoi; + private List listvattu; + public SuaVatTu() + { + InitializeComponent(); + } + + private void SuaVatTu_Load(object sender, EventArgs e) + { + vattu = new VattuBUS(); + giabus = new GiaVatTuBUS(); + listvattu = vattu.selectvattu(); + macuoi = listvattu[listvattu.Count - 1].MaVatTuPT; + } + + private void suaBT_Click(object sender, EventArgs e) + { + if(maVatTuTB.Text == "" + || diaChiTB.Text == "" + || tenVatTuTB.Text == "" + ||giaBT.Text == "") + { + MessageBox.Show("Vui Lòng nhập đầy đủ trước khi thực hiện"); + return; + } + //1. Map data from GUI + VattuDTO vt = new VattuDTO(); + GiaVatTuDTO gia = new GiaVatTuDTO(); + vt.MaVatTuPT = int.Parse(maVatTuTB.Text); + vt.TenVatTuPT = tenVatTuTB.Text; + vt.DiaChiBanPT = diaChiTB.Text; + gia.MaGiaVatTuPT = int.Parse(maVatTuTB.Text); + gia.MaVatTuPTGV = int.Parse(maVatTuTB.Text); + gia.GiaVatTuPT = int.Parse(giaBT.Text); + + //2. Kiểm tra data hợp lệ or not + + //3. Thêm vào DB + bool result = vattu.suavattu(vt); + bool result1 = giabus.suaGia(gia); + if (result == false || result1 == false) + + MessageBox.Show("Sửa Vật Tư thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Sửa Vật Tư thành công"); + } + + private void HuyBT_Click(object sender, EventArgs e) + { + this.Hide(); + } + } +} diff --git a/Project1/TreeGUI/SuaVatTu.resx b/Project1/TreeGUI/SuaVatTu.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/SuaVatTu.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuGEac7hhGnO4 + YRpzuGEac7hhGk2iI8NNoiPWTaIj002iI9JNoiPSTaIj002iJM9ksErFc7lh1HK4YdNyuGHScrhh0nK4 + YdJyu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AAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/SuaViTri.Designer.cs b/Project1/TreeGUI/SuaViTri.Designer.cs new file mode 100644 index 0000000..25dd39e --- /dev/null +++ b/Project1/TreeGUI/SuaViTri.Designer.cs @@ -0,0 +1,138 @@ +namespace Project1 +{ + partial class SuaViTri + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SuaViTri)); + this.label2 = new System.Windows.Forms.Label(); + this.HuyBT = new System.Windows.Forms.Button(); + this.ThemBT = new System.Windows.Forms.Button(); + this.tenvitriTB = new System.Windows.Forms.TextBox(); + this.tenVatTuLB = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.maViTriTB = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Calibri", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(127, 34); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(125, 36); + this.label2.TabIndex = 34; + this.label2.Text = "Sửa Vị Trí"; + // + // HuyBT + // + this.HuyBT.Location = new System.Drawing.Point(216, 172); + this.HuyBT.Name = "HuyBT"; + this.HuyBT.Size = new System.Drawing.Size(107, 29); + this.HuyBT.TabIndex = 33; + this.HuyBT.Text = "Hủy"; + this.HuyBT.UseVisualStyleBackColor = true; + this.HuyBT.Click += new System.EventHandler(this.HuyBT_Click); + // + // ThemBT + // + this.ThemBT.Location = new System.Drawing.Point(52, 172); + this.ThemBT.Name = "ThemBT"; + this.ThemBT.Size = new System.Drawing.Size(107, 29); + this.ThemBT.TabIndex = 32; + this.ThemBT.Text = "Sửa"; + this.ThemBT.UseVisualStyleBackColor = true; + this.ThemBT.Click += new System.EventHandler(this.ThemBT_Click); + // + // tenvitriTB + // + this.tenvitriTB.Location = new System.Drawing.Point(122, 124); + this.tenvitriTB.Name = "tenvitriTB"; + this.tenvitriTB.Size = new System.Drawing.Size(256, 20); + this.tenvitriTB.TabIndex = 31; + // + // tenVatTuLB + // + this.tenVatTuLB.AutoSize = true; + this.tenVatTuLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tenVatTuLB.Location = new System.Drawing.Point(22, 90); + this.tenVatTuLB.Name = "tenVatTuLB"; + this.tenVatTuLB.Size = new System.Drawing.Size(75, 19); + this.tenVatTuLB.TabIndex = 30; + this.tenVatTuLB.Text = "Mã Vị Trí :"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(22, 125); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(77, 19); + this.label1.TabIndex = 35; + this.label1.Text = "Tên Vị Trí :"; + // + // maViTriTB + // + this.maViTriTB.Location = new System.Drawing.Point(122, 91); + this.maViTriTB.Name = "maViTriTB"; + this.maViTriTB.Size = new System.Drawing.Size(256, 20); + this.maViTriTB.TabIndex = 36; + // + // SuaViTri + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(400, 225); + this.Controls.Add(this.maViTriTB); + this.Controls.Add(this.label1); + this.Controls.Add(this.label2); + this.Controls.Add(this.HuyBT); + this.Controls.Add(this.ThemBT); + this.Controls.Add(this.tenvitriTB); + this.Controls.Add(this.tenVatTuLB); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "SuaViTri"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Sửa Vị Trí"; + this.Load += new System.EventHandler(this.SuaViTri_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button HuyBT; + private System.Windows.Forms.Button ThemBT; + private System.Windows.Forms.TextBox tenvitriTB; + private System.Windows.Forms.Label tenVatTuLB; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox maViTriTB; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/SuaViTri.cs b/Project1/TreeGUI/SuaViTri.cs new file mode 100644 index 0000000..c4a615d --- /dev/null +++ b/Project1/TreeGUI/SuaViTri.cs @@ -0,0 +1,84 @@ +using System; +using TreeBUS; +using TreeDTO; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class SuaViTri : Form + { + private ViTriBUS VTbus; + private int macuoi; + private bool giatri; + private List listVT; + public SuaViTri() + { + InitializeComponent(); + } + + private void ThemBT_Click(object sender, EventArgs e) + { + int i = 0; + if (maViTriTB.Text == "" + || tenvitriTB.Text == "") + { + MessageBox.Show("Vui Lòng nhập đầy đủ trước khi thực hiện"); + return; + } + //1. Map data from GUI + ViTriDTO vt = new ViTriDTO(); + + for (i = 0; i < listVT.Count(); i++) + { + if (listVT[i].MaViTriPT == int.Parse(maViTriTB.Text)) + { + giatri = true; + break; + } + else + { + giatri = false; + } + } + if(giatri == false) + { + MessageBox.Show("Sửa Vị Trí thất bại. Vui lòng kiểm tra lại dữ liệu"); + return; + } + + vt.MaViTriPT = int.Parse(maViTriTB.Text); + vt.TenViTriPT = tenvitriTB.Text; + vt.SoLuongPT = listVT[i].SoLuongPT; + + //2. Kiểm tra data hợp lệ or not + + //3. Thêm vào DB + bool result = VTbus.suaViTri(vt); + if (result == false ) + MessageBox.Show("Sửa Vị Trí thất bại. Vui lòng kiểm tra lại dữ liệu"); + + else + MessageBox.Show("Sửa Vị Trí thành công"); + this.Hide(); + } + + private void SuaViTri_Load(object sender, EventArgs e) + { + VTbus = new ViTriBUS(); + listVT = VTbus.selectVT(); + macuoi = listVT[listVT.Count() - 1].MaViTriPT; + } + + private void HuyBT_Click(object sender, EventArgs e) + { + this.Hide(); + } + } +} diff --git a/Project1/TreeGUI/SuaViTri.resx b/Project1/TreeGUI/SuaViTri.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/SuaViTri.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuGEac7hhGnO4 + YR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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/TTCayCanh.Designer.cs b/Project1/TreeGUI/TTCayCanh.Designer.cs new file mode 100644 index 0000000..bef9590 --- /dev/null +++ b/Project1/TreeGUI/TTCayCanh.Designer.cs @@ -0,0 +1,152 @@ +namespace Project1 +{ + partial class TTCayCanh + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TTCayCanh)); + this.label3 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.dataCayCanh = new System.Windows.Forms.DataGridView(); + this.namLB = new System.Windows.Forms.Label(); + this.yearBT = new System.Windows.Forms.TextBox(); + this.monthBT = new System.Windows.Forms.TextBox(); + this.kiemTraBT = new System.Windows.Forms.Button(); + this.thangLB = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataCayCanh)).BeginInit(); + this.SuspendLayout(); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Calibri", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(186, 0); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(473, 45); + this.label3.TabIndex = 5; + this.label3.Text = "Báo Cáo Tình Trạng Cây Cảnh"; + // + // panel1 + // + this.panel1.Controls.Add(this.dataCayCanh); + this.panel1.Controls.Add(this.namLB); + this.panel1.Controls.Add(this.yearBT); + this.panel1.Controls.Add(this.monthBT); + this.panel1.Controls.Add(this.kiemTraBT); + this.panel1.Controls.Add(this.thangLB); + this.panel1.Controls.Add(this.label3); + this.panel1.Location = new System.Drawing.Point(0, 13); + this.panel1.Margin = new System.Windows.Forms.Padding(4); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(828, 491); + this.panel1.TabIndex = 5; + // + // dataCayCanh + // + this.dataCayCanh.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataCayCanh.Location = new System.Drawing.Point(0, 87); + this.dataCayCanh.Name = "dataCayCanh"; + this.dataCayCanh.RowTemplate.Height = 24; + this.dataCayCanh.Size = new System.Drawing.Size(825, 401); + this.dataCayCanh.TabIndex = 16; + // + // namLB + // + this.namLB.AutoSize = true; + this.namLB.Location = new System.Drawing.Point(368, 54); + this.namLB.Name = "namLB"; + this.namLB.Size = new System.Drawing.Size(41, 17); + this.namLB.TabIndex = 15; + this.namLB.Text = "Năm:"; + // + // yearBT + // + this.yearBT.Location = new System.Drawing.Point(415, 51); + this.yearBT.Name = "yearBT"; + this.yearBT.Size = new System.Drawing.Size(95, 22); + this.yearBT.TabIndex = 14; + // + // monthBT + // + this.monthBT.Location = new System.Drawing.Point(261, 51); + this.monthBT.Name = "monthBT"; + this.monthBT.Size = new System.Drawing.Size(89, 22); + this.monthBT.TabIndex = 13; + // + // kiemTraBT + // + this.kiemTraBT.Location = new System.Drawing.Point(530, 48); + this.kiemTraBT.Name = "kiemTraBT"; + this.kiemTraBT.Size = new System.Drawing.Size(100, 29); + this.kiemTraBT.TabIndex = 12; + this.kiemTraBT.Text = "Kiểm Tra"; + this.kiemTraBT.UseVisualStyleBackColor = true; + this.kiemTraBT.Click += new System.EventHandler(this.kiemTraBT_Click); + // + // thangLB + // + this.thangLB.AutoSize = true; + this.thangLB.Location = new System.Drawing.Point(201, 54); + this.thangLB.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.thangLB.Name = "thangLB"; + this.thangLB.Size = new System.Drawing.Size(53, 17); + this.thangLB.TabIndex = 11; + this.thangLB.Text = "Tháng:"; + // + // TTCayCanh + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(825, 505); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "TTCayCanh"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Tình Trạng Cây Cảnh"; + this.Load += new System.EventHandler(this.TTCayCanh_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataCayCanh)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label namLB; + private System.Windows.Forms.TextBox yearBT; + private System.Windows.Forms.TextBox monthBT; + private System.Windows.Forms.Button kiemTraBT; + private System.Windows.Forms.Label thangLB; + private System.Windows.Forms.DataGridView dataCayCanh; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/TTCayCanh.cs b/Project1/TreeGUI/TTCayCanh.cs new file mode 100644 index 0000000..bcc30b4 --- /dev/null +++ b/Project1/TreeGUI/TTCayCanh.cs @@ -0,0 +1,143 @@ + +using System; +using TreeBUS; +using TreeDTO; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +namespace Project1 +{ + public partial class TTCayCanh : Form + { + private CayCanhBUS cayBus; + private LoaiCayBUS loaiBus; + private TinhTrangBUS tinhTrangBus; + private BCTinhTrangBUS TTBus; + List listTinhTrang; + List listloaiCay; + List listCay; + List Result; + public TTCayCanh() + { + + InitializeComponent(); + } + + //Bao cáo tình trạng cây cảnh + + + private void TTCayCanh_Load(object sender, EventArgs e) + { + TTBus = new BCTinhTrangBUS(); + cayBus = new CayCanhBUS(); + loaiBus = new LoaiCayBUS(); + tinhTrangBus = new TinhTrangBUS(); + listTinhTrang = tinhTrangBus.selectTT(); + listloaiCay = loaiBus.selectLoaiCay(); + listCay = cayBus.select(); + + } + private bool XuLySoLieu() + { + + Result = new List(); + BCTinhTrangDTO Temp; + if (yearBT.Text == "" || monthBT.Text == "") + { + return false; + } + else if (int.Parse(yearBT.Text) < 0) + { + return false; + } + else if (int.Parse(monthBT.Text) < 0 || int.Parse(monthBT.Text) >= 12) + { + return false; + } + + DateTime ngayTim = new DateTime(int.Parse(yearBT.Text), int.Parse(monthBT.Text), 1); + int i = 0; + if (listCay == null || listCay.Count == 0) + { + return false; + } + for (i = 0; i< listCay.Count(); i++) + { + Temp = new BCTinhTrangDTO(); + Temp.MaCTTinhTrangCayPT = yearBT.Text + monthBT.Text + listCay[i].MaCayCanhPT; + Temp.MaTinhTrangThangPT = yearBT.Text + monthBT.Text + i.ToString(); + Temp.MaCayPT = listCay[i].MaCayCanhPT; + Temp.MaLoaiCayPT = listCay[i].MaLoaiCayCanhPT; + Temp.MaTinhTrangPT = listCay[i].TinhTrangPT; + Temp.TenCayPT = listCay[i].TenCayPT; + Temp.TenLoaiCayPT = listloaiCay[listCay[i].MaLoaiCayCanhPT - 1].TenLoaiCayPT; + Temp.TenTinhTrangPT = listTinhTrang[listCay[i].MaLoaiCayCanhPT - 1].TenTinhTrangPT; + Temp.NgaytrongPT = listCay[i].NgayTrongPT; + Result.Add(Temp); + } + + return true; + + } + + private void kiemTraBT_Click(object sender, EventArgs e) + { + bool temp = XuLySoLieu(); + int i = 0; + if(temp == false) + { + MessageBox.Show("Có lỗi nhận dự liệu hay khi lấy dữ liệu từ DataBase"); + } + else + { + loadData_Vao_GridView(Result); + } + + } + private void loadData_Vao_GridView(List listCay) + { + + + dataCayCanh.Columns.Clear(); + dataCayCanh.DataSource = null; + + dataCayCanh.AutoGenerateColumns = false; + dataCayCanh.AllowUserToAddRows = false; + dataCayCanh.DataSource = listCay; + + + DataGridViewTextBoxColumn clTenCay = new DataGridViewTextBoxColumn(); + clTenCay.Name = "TenCay"; + clTenCay.HeaderText = "Tên Cây"; + clTenCay.DataPropertyName = "TenCayPT"; + dataCayCanh.Columns.Add(clTenCay); + + DataGridViewTextBoxColumn clLoaiCay = new DataGridViewTextBoxColumn(); + clLoaiCay.Name = "Loại Cây"; + clLoaiCay.HeaderText = "Loại Cây"; + clLoaiCay.DataPropertyName = "TenLoaiCayPT"; + + dataCayCanh.Columns.Add(clLoaiCay); + + DataGridViewTextBoxColumn clNgayTrong = new DataGridViewTextBoxColumn(); + clNgayTrong.Name = "NgayTrong"; + clNgayTrong.HeaderText = "Ngày Trồng"; + clNgayTrong.DataPropertyName = "NgaytrongPT"; + dataCayCanh.Columns.Add(clNgayTrong); + + DataGridViewTextBoxColumn clTinhTrang = new DataGridViewTextBoxColumn(); + clTinhTrang.Name = "TinhTrang"; + clTinhTrang.HeaderText = "Tình Trạng"; + clTinhTrang.DataPropertyName = "TenTinhTrangPT"; + dataCayCanh.Columns.Add(clTinhTrang); + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[dataCayCanh.DataSource]; + myCurrencyManager.Refresh(); + } + } +} diff --git a/Project1/TreeGUI/TTCayCanh.resx b/Project1/TreeGUI/TTCayCanh.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/TTCayCanh.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuGEac7hhGnO4 + YRpzuGEac7hhGk2iI8NNoiPWTaIj002iI9JNoiPSTaIj002iJM9ksErFc7lh1HK4YdNyuGHScrhh0nK4 + YdJyuGHTc7lh1WioWcxHdD/RRG8900RvPdJEbz3SRG8900RvPNVIckfWaaFs1nO5YdVyuGHUcrhh0nK4 + YdJyuGHScrhh03K4YdZyuGHDTaIjd02iI8BNoiPtTaIi/02iI/9NoiP/TaIi4luqPbVwrXDjcbJq+3K4 + Yf9yuGH/crhh/3K0Z/1ys2jSXJVPrURvPdlEbz3/RG89/0RvPf9Ebz32Q287w1N0bMxtkZXacrdjvXK4 + YeRyuGH/crhh/3K4Yf9yuGHtcrhhwHK4YXdNoCMDTaIeD1CeMH1PoC35TaIk+U2iI99NoiJXW5FnFW2A + tqlvmJK5crlf23K4Yfdyt2Lsb5qQ6G2Fr2g7ewoHRG89QERvPdBFbz/7RG8+8kRvPY86bB4RbHu6b218 + vqlwm4wVcrlgV3K4Yd9yuGH5crRn+XGzaX1yul4PcbthAwAAAABpgKoAaX+uS2SGlMxRnThkTKMgLEGx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AHG5YhdyuGFucrhhlXK4YWtyuGEVcrhhAAAAAAAAAAAAAAAAAAAA + AAAAAAAAR3I9AEdzPQBHbj0CR2k9AEdqPQAAAAAAcJEaAG2SGgNykRqAcpEa+nKRGv9ykRr/cpEa3nGR + GjZykRoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb7NhAG+zYQBytGICdbZkAHW1ZAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcZEbAHGRGxNykRp4cpEaunKR + GqlykRpIc5IcAnKRGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/ThemCay.Designer.cs b/Project1/TreeGUI/ThemCay.Designer.cs new file mode 100644 index 0000000..e0b3c20 --- /dev/null +++ b/Project1/TreeGUI/ThemCay.Designer.cs @@ -0,0 +1,265 @@ +namespace Project1 +{ + partial class ThemCay + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ThemCay)); + this.panel1 = new System.Windows.Forms.Panel(); + this.dateTimeNgayTrong = new System.Windows.Forms.DateTimePicker(); + this.comboxTinhTrang = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.MaCay = new System.Windows.Forms.Label(); + this.MaCayTB = new System.Windows.Forms.TextBox(); + this.comboBoxLoaiCay = new System.Windows.Forms.ComboBox(); + this.comboBoxVitri = new System.Windows.Forms.ComboBox(); + this.Them = new System.Windows.Forms.Button(); + this.Huy = new System.Windows.Forms.Button(); + this.labelTieuDe = new System.Windows.Forms.Label(); + this.LoaiCay = new System.Windows.Forms.Label(); + this.NgayTrong = new System.Windows.Forms.Label(); + this.ViTri = new System.Windows.Forms.Label(); + this.TenCay = new System.Windows.Forms.Label(); + this.TenCaytb = new System.Windows.Forms.TextBox(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.dateTimeNgayTrong); + this.panel1.Controls.Add(this.comboxTinhTrang); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.MaCay); + this.panel1.Controls.Add(this.MaCayTB); + this.panel1.Controls.Add(this.comboBoxLoaiCay); + this.panel1.Controls.Add(this.comboBoxVitri); + this.panel1.Controls.Add(this.Them); + this.panel1.Controls.Add(this.Huy); + this.panel1.Controls.Add(this.labelTieuDe); + this.panel1.Controls.Add(this.LoaiCay); + this.panel1.Controls.Add(this.NgayTrong); + this.panel1.Controls.Add(this.ViTri); + this.panel1.Controls.Add(this.TenCay); + this.panel1.Controls.Add(this.TenCaytb); + this.panel1.Location = new System.Drawing.Point(5, 13); + this.panel1.Margin = new System.Windows.Forms.Padding(4); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(840, 487); + this.panel1.TabIndex = 1; + // + // dateTimeNgayTrong + // + this.dateTimeNgayTrong.Location = new System.Drawing.Point(251, 362); + this.dateTimeNgayTrong.Name = "dateTimeNgayTrong"; + this.dateTimeNgayTrong.Size = new System.Drawing.Size(491, 22); + this.dateTimeNgayTrong.TabIndex = 34; + // + // comboxTinhTrang + // + this.comboxTinhTrang.FormattingEnabled = true; + this.comboxTinhTrang.Location = new System.Drawing.Point(251, 311); + this.comboxTinhTrang.Margin = new System.Windows.Forms.Padding(4); + this.comboxTinhTrang.Name = "comboxTinhTrang"; + this.comboxTinhTrang.Size = new System.Drawing.Size(491, 24); + this.comboxTinhTrang.TabIndex = 33; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(76, 311); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(108, 24); + this.label1.TabIndex = 32; + this.label1.Text = "Tình Trạng :"; + // + // MaCay + // + this.MaCay.AutoSize = true; + this.MaCay.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.MaCay.Location = new System.Drawing.Point(76, 99); + this.MaCay.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.MaCay.Name = "MaCay"; + this.MaCay.Size = new System.Drawing.Size(77, 24); + this.MaCay.TabIndex = 31; + this.MaCay.Text = "Mã Cây:"; + // + // MaCayTB + // + this.MaCayTB.Location = new System.Drawing.Point(251, 100); + this.MaCayTB.Margin = new System.Windows.Forms.Padding(4); + this.MaCayTB.Name = "MaCayTB"; + this.MaCayTB.Size = new System.Drawing.Size(491, 22); + this.MaCayTB.TabIndex = 30; + // + // comboBoxLoaiCay + // + this.comboBoxLoaiCay.FormattingEnabled = true; + this.comboBoxLoaiCay.Location = new System.Drawing.Point(251, 202); + this.comboBoxLoaiCay.Margin = new System.Windows.Forms.Padding(4); + this.comboBoxLoaiCay.Name = "comboBoxLoaiCay"; + this.comboBoxLoaiCay.Size = new System.Drawing.Size(491, 24); + this.comboBoxLoaiCay.TabIndex = 29; + // + // comboBoxVitri + // + this.comboBoxVitri.FormattingEnabled = true; + this.comboBoxVitri.Location = new System.Drawing.Point(251, 254); + this.comboBoxVitri.Margin = new System.Windows.Forms.Padding(4); + this.comboBoxVitri.Name = "comboBoxVitri"; + this.comboBoxVitri.Size = new System.Drawing.Size(491, 24); + this.comboBoxVitri.TabIndex = 28; + // + // Them + // + this.Them.Font = new System.Drawing.Font("Calibri", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Them.Location = new System.Drawing.Point(173, 403); + this.Them.Margin = new System.Windows.Forms.Padding(4); + this.Them.Name = "Them"; + this.Them.Size = new System.Drawing.Size(200, 50); + this.Them.TabIndex = 27; + this.Them.Text = "Thêm"; + this.Them.UseVisualStyleBackColor = true; + this.Them.Click += new System.EventHandler(this.Them_Click); + // + // Huy + // + this.Huy.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.Huy.Font = new System.Drawing.Font("Calibri", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Huy.Location = new System.Drawing.Point(432, 403); + this.Huy.Margin = new System.Windows.Forms.Padding(4); + this.Huy.Name = "Huy"; + this.Huy.Size = new System.Drawing.Size(200, 50); + this.Huy.TabIndex = 27; + this.Huy.Text = "Hủy"; + this.Huy.UseVisualStyleBackColor = true; + this.Huy.Click += new System.EventHandler(this.Huy_Click); + // + // labelTieuDe + // + this.labelTieuDe.AutoSize = true; + this.labelTieuDe.Font = new System.Drawing.Font("Calibri", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelTieuDe.ForeColor = System.Drawing.Color.DarkSlateGray; + this.labelTieuDe.Location = new System.Drawing.Point(275, 25); + this.labelTieuDe.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTieuDe.Name = "labelTieuDe"; + this.labelTieuDe.Size = new System.Drawing.Size(251, 49); + this.labelTieuDe.TabIndex = 25; + this.labelTieuDe.Text = "Hồ sơ cây mới"; + // + // LoaiCay + // + this.LoaiCay.AutoSize = true; + this.LoaiCay.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.LoaiCay.Location = new System.Drawing.Point(76, 199); + this.LoaiCay.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.LoaiCay.Name = "LoaiCay"; + this.LoaiCay.Size = new System.Drawing.Size(84, 24); + this.LoaiCay.TabIndex = 24; + this.LoaiCay.Text = "Loại Cây:"; + // + // NgayTrong + // + this.NgayTrong.AutoSize = true; + this.NgayTrong.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.NgayTrong.Location = new System.Drawing.Point(72, 360); + this.NgayTrong.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.NgayTrong.Name = "NgayTrong"; + this.NgayTrong.Size = new System.Drawing.Size(113, 24); + this.NgayTrong.TabIndex = 21; + this.NgayTrong.Text = "Ngày Trồng: "; + // + // ViTri + // + this.ViTri.AutoSize = true; + this.ViTri.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ViTri.Location = new System.Drawing.Point(76, 254); + this.ViTri.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.ViTri.Name = "ViTri"; + this.ViTri.Size = new System.Drawing.Size(62, 24); + this.ViTri.TabIndex = 20; + this.ViTri.Text = "Vị Trí :"; + // + // TenCay + // + this.TenCay.AutoSize = true; + this.TenCay.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TenCay.Location = new System.Drawing.Point(72, 152); + this.TenCay.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.TenCay.Name = "TenCay"; + this.TenCay.Size = new System.Drawing.Size(84, 24); + this.TenCay.TabIndex = 19; + this.TenCay.Text = "Tên Cây :"; + // + // TenCaytb + // + this.TenCaytb.Location = new System.Drawing.Point(251, 151); + this.TenCaytb.Margin = new System.Windows.Forms.Padding(4); + this.TenCaytb.Name = "TenCaytb"; + this.TenCaytb.Size = new System.Drawing.Size(491, 22); + this.TenCaytb.TabIndex = 13; + // + // ThemCay + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(844, 502); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "ThemCay"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Thêm Cây"; + this.Load += new System.EventHandler(this.ThemCay_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button Huy; + private System.Windows.Forms.Label labelTieuDe; + private System.Windows.Forms.Label LoaiCay; + private System.Windows.Forms.Label NgayTrong; + private System.Windows.Forms.Label ViTri; + private System.Windows.Forms.Label TenCay; + private System.Windows.Forms.TextBox TenCaytb; + private System.Windows.Forms.Button Them; + private System.Windows.Forms.Label MaCay; + private System.Windows.Forms.TextBox MaCayTB; + private System.Windows.Forms.ComboBox comboBoxLoaiCay; + private System.Windows.Forms.ComboBox comboBoxVitri; + private System.Windows.Forms.ComboBox comboxTinhTrang; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.DateTimePicker dateTimeNgayTrong; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/ThemCay.cs b/Project1/TreeGUI/ThemCay.cs new file mode 100644 index 0000000..4c03197 --- /dev/null +++ b/Project1/TreeGUI/ThemCay.cs @@ -0,0 +1,180 @@ +using System; +using TreeBUS; +using TreeDTO; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class ThemCay : Form + { + //----------------------------------------------------------------------------------// + private CayCanhBUS cayBus; + private LoaiCayBUS LoaiCayBus; + private ViTriBUS ViTriBus; + private TinhTrangBUS TinhTrangBus; + private ThamSoBUS thamso; + private List tsDTO; + private List listViTri; + //----------------------------------------------------------------------------------// + public ThemCay() + { + InitializeComponent(); + } + + private void ThemCay_Load(object sender, EventArgs e) + { + thamso = new ThamSoBUS(); + cayBus = new CayCanhBUS(); + ViTriBus = new ViTriBUS(); + LoaiCayBus = new LoaiCayBUS(); + TinhTrangBus = new TinhTrangBUS(); + tsDTO = thamso.selectThamSo(); + loadViTriVao_Combobox(); + loadLoaiCayVao_Combobox(); + loadTinhTrangVao_Combobox(); + } + //----------------------------------------------------------------------------------// + private void loadViTriVao_Combobox() + { + listViTri= ViTriBus.selectVT(); + + if (listViTri == null) + { + MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); + return; + } + comboBoxVitri.DataSource = new BindingSource(listViTri, String.Empty); + comboBoxVitri.DisplayMember = "TenViTriPT"; + comboBoxVitri.ValueMember = "MaViTriPT"; + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[comboBoxVitri.DataSource]; + myCurrencyManager.Refresh(); + + if (comboBoxVitri.Items.Count > 0) + { + comboBoxVitri.ResetText(); + } + + } + private void loadLoaiCayVao_Combobox() + { + List listLoaiCay = LoaiCayBus.selectLoaiCay(); + + if (listLoaiCay == null) + { + MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); + return; + } + comboBoxLoaiCay.DataSource = new BindingSource(listLoaiCay, String.Empty); + comboBoxLoaiCay.DisplayMember = "TenLoaiCayPT"; + comboBoxLoaiCay.ValueMember = "MaLoaiCayPT"; + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[comboBoxLoaiCay.DataSource]; + myCurrencyManager.Refresh(); + + if (comboBoxLoaiCay.Items.Count > 0) + { + comboBoxLoaiCay.ResetText(); + } + + } + private void loadTinhTrangVao_Combobox() + { + List listTinhTrang = TinhTrangBus.selectTT(); + + if (listTinhTrang == null) + { + MessageBox.Show("Có lỗi khi lấy Món ăn từ DB"); + return; + } + comboxTinhTrang.DataSource = new BindingSource(listTinhTrang, String.Empty); + comboxTinhTrang.DisplayMember = "TenTinhTrangPT"; + comboxTinhTrang.ValueMember = "MaTinhTrangPT"; + + CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[comboxTinhTrang.DataSource]; + myCurrencyManager.Refresh(); + + if (comboxTinhTrang.Items.Count > 0) + { + comboxTinhTrang.ResetText(); + } + + } + + private void Them_Click(object sender, EventArgs e) + { + int i = 0,vitri = 0; + if (MaCayTB.Text == "" || TenCaytb.Text == "" + || dateTimeNgayTrong.Value.ToString() == "" + || comboBoxVitri.SelectedValue.ToString() == "" + || comboBoxLoaiCay.SelectedValue.ToString() == "" + || comboxTinhTrang.SelectedValue.ToString() == "") + { + MessageBox.Show("Vui lòng nhập dữ liệu"); + return; + } + //1. Map data from GUI + CaycanhDTO cayDTO = new CaycanhDTO(); + cayDTO.MaCayCanhPT = MaCayTB.Text; + cayDTO.TenCayPT = TenCaytb.Text; + cayDTO.NgayTrongPT = DateTime.Parse(dateTimeNgayTrong.Value.ToString()); + cayDTO.MaViTriPT = int.Parse(comboBoxVitri.SelectedValue.ToString()); + cayDTO.MaLoaiCayCanhPT = int.Parse(comboBoxLoaiCay.SelectedValue.ToString()); + cayDTO.TinhTrangPT = int.Parse(comboxTinhTrang.SelectedValue.ToString()); + + //2. Kiểm tra data hợp lệ or not + for(i = 0; i< listViTri.Count(); i++) + { + if (listViTri[i].MaViTriPT == cayDTO.MaViTriPT) + { + vitri = i; + break; + } + } + if(tsDTO[0].SoCayToiDaPT < listViTri[vitri].SoLuongPT) + { + MessageBox.Show("Số lương Cây cảnh đã vượt quá số lương tối đa của vị trí. Vui lòng chọn vị trí khác"); + return; + } + else + { + ViTriDTO suavt = new ViTriDTO(); + suavt.MaViTriPT = listViTri[vitri].MaViTriPT; + suavt.TenViTriPT = listViTri[vitri].TenViTriPT; + suavt.SoLuongPT = listViTri[vitri].SoLuongPT + 1; + bool result1 = ViTriBus.suaViTri(suavt); + if(result1 == false) + { + MessageBox.Show("có vấn đề đang xảy ra"); + } + + } + //3. Thêm vào DB + bool result = cayBus.them(cayDTO); + if (result == false) + MessageBox.Show("Thêm Cây Cảnh thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Thêm Cây Cảnh thành công"); + } + + private void Huy_Click(object sender, EventArgs e) + { + + } + + //---------------------------------------------------------------------------------// + + } +} + + + + + diff --git a/Project1/TreeGUI/ThemCay.resx b/Project1/TreeGUI/ThemCay.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/ThemCay.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBG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AAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/ThemVatTu.Designer.cs b/Project1/TreeGUI/ThemVatTu.Designer.cs new file mode 100644 index 0000000..7eb82c3 --- /dev/null +++ b/Project1/TreeGUI/ThemVatTu.Designer.cs @@ -0,0 +1,160 @@ +namespace Project1 +{ + partial class ThemVatTu + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ThemVatTu)); + this.tenVatTuLB = new System.Windows.Forms.Label(); + this.diachiLB = new System.Windows.Forms.Label(); + this.tenVatTuTB = new System.Windows.Forms.TextBox(); + this.diaChiTB = new System.Windows.Forms.TextBox(); + this.ThemBT = new System.Windows.Forms.Button(); + this.HuyBT = new System.Windows.Forms.Button(); + this.giaBT = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // tenVatTuLB + // + this.tenVatTuLB.AutoSize = true; + this.tenVatTuLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tenVatTuLB.Location = new System.Drawing.Point(35, 79); + this.tenVatTuLB.Name = "tenVatTuLB"; + this.tenVatTuLB.Size = new System.Drawing.Size(82, 19); + this.tenVatTuLB.TabIndex = 1; + this.tenVatTuLB.Text = "Tên Vật Tư:"; + // + // diachiLB + // + this.diachiLB.AutoSize = true; + this.diachiLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.diachiLB.Location = new System.Drawing.Point(35, 116); + this.diachiLB.Name = "diachiLB"; + this.diachiLB.Size = new System.Drawing.Size(60, 19); + this.diachiLB.TabIndex = 2; + this.diachiLB.Text = "Địa Chỉ:"; + // + // tenVatTuTB + // + this.tenVatTuTB.Location = new System.Drawing.Point(135, 78); + this.tenVatTuTB.Name = "tenVatTuTB"; + this.tenVatTuTB.Size = new System.Drawing.Size(256, 20); + this.tenVatTuTB.TabIndex = 4; + // + // diaChiTB + // + this.diaChiTB.Location = new System.Drawing.Point(135, 116); + this.diaChiTB.Name = "diaChiTB"; + this.diaChiTB.Size = new System.Drawing.Size(256, 20); + this.diaChiTB.TabIndex = 5; + // + // ThemBT + // + this.ThemBT.Location = new System.Drawing.Point(70, 205); + this.ThemBT.Name = "ThemBT"; + this.ThemBT.Size = new System.Drawing.Size(107, 29); + this.ThemBT.TabIndex = 6; + this.ThemBT.Text = "Thêm "; + this.ThemBT.UseVisualStyleBackColor = true; + this.ThemBT.Click += new System.EventHandler(this.ThemBT_Click); + // + // HuyBT + // + this.HuyBT.Location = new System.Drawing.Point(237, 205); + this.HuyBT.Name = "HuyBT"; + this.HuyBT.Size = new System.Drawing.Size(107, 29); + this.HuyBT.TabIndex = 7; + this.HuyBT.Text = "Hủy"; + this.HuyBT.UseVisualStyleBackColor = true; + this.HuyBT.Click += new System.EventHandler(this.HuyBT_Click); + // + // giaBT + // + this.giaBT.Location = new System.Drawing.Point(135, 158); + this.giaBT.Name = "giaBT"; + this.giaBT.Size = new System.Drawing.Size(256, 20); + this.giaBT.TabIndex = 19; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(35, 159); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(35, 19); + this.label1.TabIndex = 18; + this.label1.Text = "Giá:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Calibri", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(129, 22); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(162, 36); + this.label2.TabIndex = 20; + this.label2.Text = "Thêm Vật Tư"; + // + // ThemVatTu + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(406, 253); + this.Controls.Add(this.label2); + this.Controls.Add(this.giaBT); + this.Controls.Add(this.label1); + this.Controls.Add(this.HuyBT); + this.Controls.Add(this.ThemBT); + this.Controls.Add(this.diaChiTB); + this.Controls.Add(this.tenVatTuTB); + this.Controls.Add(this.diachiLB); + this.Controls.Add(this.tenVatTuLB); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "ThemVatTu"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Thêm Vật Tư"; + this.Load += new System.EventHandler(this.ThemVatTu_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Label tenVatTuLB; + private System.Windows.Forms.Label diachiLB; + private System.Windows.Forms.TextBox tenVatTuTB; + private System.Windows.Forms.TextBox diaChiTB; + private System.Windows.Forms.Button ThemBT; + private System.Windows.Forms.Button HuyBT; + private System.Windows.Forms.TextBox giaBT; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/ThemVatTu.cs b/Project1/TreeGUI/ThemVatTu.cs new file mode 100644 index 0000000..c2197d8 --- /dev/null +++ b/Project1/TreeGUI/ThemVatTu.cs @@ -0,0 +1,72 @@ + +using System; +using TreeBUS; +using TreeDTO; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class ThemVatTu : Form + { + private VattuBUS vattu; + private GiaVatTuBUS giabus; + private int macuoi; + private List listvattu; + public ThemVatTu() + { + InitializeComponent(); + } + + private void ThemVatTu_Load(object sender, EventArgs e) + { + vattu = new VattuBUS(); + giabus = new GiaVatTuBUS(); + listvattu = vattu.selectvattu(); + macuoi = listvattu[listvattu.Count - 1].MaVatTuPT; + } + + private void ThemBT_Click(object sender, EventArgs e) + { + if ( diaChiTB.Text == "" + || tenVatTuTB.Text == "" + || giaBT.Text == "") + { + MessageBox.Show("Vui Lòng nhập đầy đủ trước khi thực hiện"); + return; + } + //1. Map data from GUI + VattuDTO vt = new VattuDTO(); + GiaVatTuDTO gia = new GiaVatTuDTO(); + vt.MaVatTuPT = macuoi + 1; + vt.TenVatTuPT = tenVatTuTB.Text; + vt.DiaChiBanPT = diaChiTB.Text; + gia.MaGiaVatTuPT = macuoi + 1; + gia.MaVatTuPTGV = macuoi + 1; + gia.GiaVatTuPT = int.Parse(giaBT.Text); + + //2. Kiểm tra data hợp lệ or not + + //3. Thêm vào DB + bool result = vattu.themvattu(vt); + bool result1 = giabus.themGia(gia); + if (result == false || result1 == false) + + MessageBox.Show("Thêm Vật Tư thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Thêm Vật Tư thành công"); + this.Hide(); + } + + private void HuyBT_Click(object sender, EventArgs e) + { + this.Hide(); + } + } +} diff --git a/Project1/TreeGUI/ThemVatTu.resx b/Project1/TreeGUI/ThemVatTu.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/ThemVatTu.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuGEac7hhGnO4 + YRpzuGEac7hhGk2iI8NNoiPWTaIj002iI9JNoiPSTaIj002iJM9ksErFc7lh1HK4YdNyuGHScrhh0nK4 + YdJyuGHTc7lh1WioWcxHdD/RRG8900RvPdJEbz3SRG8900RvPNVIckfWaaFs1nO5YdVyuGHUcrhh0nK4 + YdJyuGHScrhh03K4YdZyuGHDTaIjd02iI8BNoiPtTaIi/02iI/9NoiP/TaIi4luqPbVwrXDjcbJq+3K4 + Yf9yuGH/crhh/3K0Z/1ys2jSXJVPrURvPdlEbz3/RG89/0RvPf9Ebz32Q287w1N0bMxtkZXacrdjvXK4 + YeRyuGH/crhh/3K4Yf9yuGHtcrhhwHK4YXdNoCMDTaIeD1CeMH1PoC35TaIk+U2iI99NoiJXW5FnFW2A + tqlvmJK5crlf23K4Yfdyt2Lsb5qQ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AAAAAAAAAAAAAARW89AEVv + PRVEbz1rRG89lURvPW5Ebz4XRG4+AHKRGgBxkRoUcpEay3KRGv9ykRr/cpEa/3KRGv9ykRp3c5AaAGyX + GAAAAAAAAAAAAAAAAABd/4EAcrdhAHG5YhdyuGFucrhhlXK4YWtyuGEVcrhhAAAAAAAAAAAAAAAAAAAA + AAAAAAAAR3I9AEdzPQBHbj0CR2k9AEdqPQAAAAAAcJEaAG2SGgNykRqAcpEa+nKRGv9ykRr/cpEa3nGR + GjZykRoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb7NhAG+zYQBytGICdbZkAHW1ZAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcZEbAHGRGxNykRp4cpEaunKR + GqlykRpIc5IcAnKRGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/ThemViTri.Designer.cs b/Project1/TreeGUI/ThemViTri.Designer.cs new file mode 100644 index 0000000..b4b94cd --- /dev/null +++ b/Project1/TreeGUI/ThemViTri.Designer.cs @@ -0,0 +1,115 @@ +namespace Project1 +{ + partial class ThemViTri + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ThemViTri)); + this.label2 = new System.Windows.Forms.Label(); + this.HuyBT = new System.Windows.Forms.Button(); + this.ThemBT = new System.Windows.Forms.Button(); + this.tenvitriTB = new System.Windows.Forms.TextBox(); + this.tenVatTuLB = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Calibri", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(125, 23); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(147, 36); + this.label2.TabIndex = 29; + this.label2.Text = "Thêm Vị Trí"; + // + // HuyBT + // + this.HuyBT.Location = new System.Drawing.Point(232, 137); + this.HuyBT.Name = "HuyBT"; + this.HuyBT.Size = new System.Drawing.Size(107, 29); + this.HuyBT.TabIndex = 26; + this.HuyBT.Text = "Hủy"; + this.HuyBT.UseVisualStyleBackColor = true; + this.HuyBT.Click += new System.EventHandler(this.HuyBT_Click); + // + // ThemBT + // + this.ThemBT.Location = new System.Drawing.Point(65, 137); + this.ThemBT.Name = "ThemBT"; + this.ThemBT.Size = new System.Drawing.Size(107, 29); + this.ThemBT.TabIndex = 25; + this.ThemBT.Text = "Thêm "; + this.ThemBT.UseVisualStyleBackColor = true; + this.ThemBT.Click += new System.EventHandler(this.ThemBT_Click); + // + // tenvitriTB + // + this.tenvitriTB.Location = new System.Drawing.Point(131, 79); + this.tenvitriTB.Name = "tenvitriTB"; + this.tenvitriTB.Size = new System.Drawing.Size(256, 20); + this.tenvitriTB.TabIndex = 23; + // + // tenVatTuLB + // + this.tenVatTuLB.AutoSize = true; + this.tenVatTuLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tenVatTuLB.Location = new System.Drawing.Point(31, 80); + this.tenVatTuLB.Name = "tenVatTuLB"; + this.tenVatTuLB.Size = new System.Drawing.Size(69, 19); + this.tenVatTuLB.TabIndex = 21; + this.tenVatTuLB.Text = "Tên Vị Trí"; + // + // ThemViTri + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(413, 196); + this.Controls.Add(this.label2); + this.Controls.Add(this.HuyBT); + this.Controls.Add(this.ThemBT); + this.Controls.Add(this.tenvitriTB); + this.Controls.Add(this.tenVatTuLB); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "ThemViTri"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Thêm Vị Trí"; + this.Load += new System.EventHandler(this.ThemViTri_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button HuyBT; + private System.Windows.Forms.Button ThemBT; + private System.Windows.Forms.TextBox tenvitriTB; + private System.Windows.Forms.Label tenVatTuLB; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/ThemViTri.cs b/Project1/TreeGUI/ThemViTri.cs new file mode 100644 index 0000000..8827e20 --- /dev/null +++ b/Project1/TreeGUI/ThemViTri.cs @@ -0,0 +1,57 @@ +using System; +using TreeBUS; +using TreeDTO; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class ThemViTri : Form + { + private ViTriBUS vtBus; + private int macuoi; + private List listVT; + public ThemViTri() + { + InitializeComponent(); + } + + private void ThemBT_Click(object sender, EventArgs e) + { + if (tenvitriTB.Text == "") + { + MessageBox.Show("Vui Lòng nhập đầy đủ trước khi thực hiện"); + return; + } + ViTriDTO vt = new ViTriDTO(); + vt.MaViTriPT = macuoi + 1; + vt.TenViTriPT = tenvitriTB.Text; + vt.SoLuongPT = 0; + bool result = vtBus.themViTri(vt); + if (result == false ) + + MessageBox.Show("Thêm Vị Trí thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Thêm Vị Trí thành công"); + this.Hide(); + } + + private void ThemViTri_Load(object sender, EventArgs e) + { + vtBus = new ViTriBUS(); + listVT = vtBus.selectVT(); + macuoi = listVT[listVT.Count() - 1].MaViTriPT; + } + + private void HuyBT_Click(object sender, EventArgs e) + { + this.Hide(); + } + } +} diff --git a/Project1/TreeGUI/ThemViTri.resx b/Project1/TreeGUI/ThemViTri.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/ThemViTri.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuG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RwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/TreeGUI.csproj b/Project1/TreeGUI/TreeGUI.csproj new file mode 100644 index 0000000..b30f9b6 --- /dev/null +++ b/Project1/TreeGUI/TreeGUI.csproj @@ -0,0 +1,313 @@ + + + + + Debug + AnyCPU + {7F61A8FD-BE78-4A76-9DB3-D8D829466B26} + WinExe + TreeGUI + TreeGUI + v4.6.1 + 512 + true + true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + Form + + + BcChamSoc.cs + + + Form + + + LenLich.cs + + + Form + + + MenuVatTu.cs + + + Form + + + SettingThamSo.cs + + + Form + + + SuaCay.cs + + + Form + + + SuaVatTu.cs + + + Form + + + SuaViTri.cs + + + Form + + + ThemVatTu.cs + + + Form + + + ThemViTri.cs + + + Form + + + XoaCay.cs + + + Form + + + MenuCay.cs + + + Form + + + LichCS.cs + + + Form + + + MainWindow.cs + + + + Form + + + ThemCay.cs + + + + + UserControl + + + QuanLyCayCanh.cs + + + UserControl + + + BaoCao.cs + + + Form + + + TTCayCanh.cs + + + UserControl + + + PhieuMuaVatTu.cs + + + Form + + + XoaVatTu.cs + + + Form + + + XoaViTri.cs + + + BcChamSoc.cs + + + LenLich.cs + + + MenuVatTu.cs + + + SettingThamSo.cs + + + SuaCay.cs + + + SuaVatTu.cs + + + SuaViTri.cs + + + ThemVatTu.cs + + + ThemViTri.cs + + + XoaCay.cs + + + LichCS.cs + + + MainWindow.cs + + + MenuCay.cs + + + MenuCay.cs + + + ThemCay.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + QuanLyCayCanh.cs + + + BaoCao.cs + + + TTCayCanh.cs + + + PhieuMuaVatTu.cs + + + XoaVatTu.cs + + + XoaViTri.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + + + + + + + + + + + {1c0bc645-0b59-4ad1-afb4-814741a61083} + TreeBUS + + + {50f163ac-6f49-4bb6-878e-367e860916e3} + TreeDTO + + + + + False + Microsoft .NET Framework 4.6.1 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + \ No newline at end of file diff --git a/Project1/TreeGUI/TreeGUI.csproj.user b/Project1/TreeGUI/TreeGUI.csproj.user new file mode 100644 index 0000000..7937b01 --- /dev/null +++ b/Project1/TreeGUI/TreeGUI.csproj.user @@ -0,0 +1,13 @@ + + + + publish\ + + + + + + en-US + false + + \ No newline at end of file diff --git a/Project1/TreeGUI/Vattu.Designer.cs b/Project1/TreeGUI/Vattu.Designer.cs new file mode 100644 index 0000000..63242a6 --- /dev/null +++ b/Project1/TreeGUI/Vattu.Designer.cs @@ -0,0 +1,272 @@ +namespace Project1 +{ + partial class Vattu + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.panel1 = new System.Windows.Forms.Panel(); + this.Huy = new System.Windows.Forms.Button(); + this.Them = new System.Windows.Forms.Button(); + this.labelTieuDe = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.SotienTB = new System.Windows.Forms.TextBox(); + this.NgayMuaTextBox = new System.Windows.Forms.TextBox(); + this.soluongTB = new System.Windows.Forms.TextBox(); + this.DiachiTB = new System.Windows.Forms.TextBox(); + this.DonviTB = new System.Windows.Forms.TextBox(); + this.VattuTextbox = new System.Windows.Forms.TextBox(); + this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.Huy); + this.panel1.Controls.Add(this.Them); + this.panel1.Controls.Add(this.labelTieuDe); + this.panel1.Controls.Add(this.label6); + this.panel1.Controls.Add(this.label5); + this.panel1.Controls.Add(this.label4); + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.SotienTB); + this.panel1.Controls.Add(this.NgayMuaTextBox); + this.panel1.Controls.Add(this.soluongTB); + this.panel1.Controls.Add(this.DiachiTB); + this.panel1.Controls.Add(this.DonviTB); + this.panel1.Controls.Add(this.VattuTextbox); + this.panel1.Location = new System.Drawing.Point(4, 4); + this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1085, 615); + this.panel1.TabIndex = 0; + // + // Huy + // + this.Huy.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Huy.Location = new System.Drawing.Point(564, 411); + this.Huy.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Huy.Name = "Huy"; + this.Huy.Size = new System.Drawing.Size(193, 47); + this.Huy.TabIndex = 14; + this.Huy.Text = "Hủy"; + this.Huy.UseVisualStyleBackColor = true; + this.Huy.Click += new System.EventHandler(this.button2_Click); + // + // Them + // + this.Them.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Them.Location = new System.Drawing.Point(253, 411); + this.Them.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Them.Name = "Them"; + this.Them.Size = new System.Drawing.Size(193, 47); + this.Them.TabIndex = 13; + this.Them.Text = "Thêm"; + this.Them.UseVisualStyleBackColor = true; + this.Them.Click += new System.EventHandler(this.button1_Click); + // + // labelTieuDe + // + this.labelTieuDe.AutoSize = true; + this.labelTieuDe.Font = new System.Drawing.Font("Calibri", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelTieuDe.ForeColor = System.Drawing.Color.DarkSlateGray; + this.labelTieuDe.Location = new System.Drawing.Point(372, 90); + this.labelTieuDe.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTieuDe.Name = "labelTieuDe"; + this.labelTieuDe.Size = new System.Drawing.Size(310, 49); + this.labelTieuDe.TabIndex = 12; + this.labelTieuDe.Text = "Phiếu Mua Vật Tư"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label6.Location = new System.Drawing.Point(129, 208); + this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(76, 24); + this.label6.TabIndex = 11; + this.label6.Text = "Đơn Vị :"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(129, 338); + this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(86, 24); + this.label5.TabIndex = 10; + this.label5.Text = "Số Tiền : "; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(129, 306); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(109, 24); + this.label4.TabIndex = 9; + this.label4.Text = "Ngày Mua : "; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(129, 272); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(102, 24); + this.label3.TabIndex = 8; + this.label3.Text = "Số Lượng : "; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(129, 241); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(79, 24); + this.label2.TabIndex = 7; + this.label2.Text = "Địa Chỉ :"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(129, 176); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(73, 24); + this.label1.TabIndex = 6; + this.label1.Text = "Vật Tư :"; + this.label1.Click += new System.EventHandler(this.label1_Click); + // + // SotienTB + // + this.SotienTB.Location = new System.Drawing.Point(308, 337); + this.SotienTB.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.SotienTB.Name = "SotienTB"; + this.SotienTB.Size = new System.Drawing.Size(620, 22); + this.SotienTB.TabIndex = 5; + this.SotienTB.TextChanged += new System.EventHandler(this.SotienTB_TextChanged); + // + // NgayMuaTextBox + // + this.NgayMuaTextBox.Location = new System.Drawing.Point(308, 305); + this.NgayMuaTextBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.NgayMuaTextBox.Name = "NgayMuaTextBox"; + this.NgayMuaTextBox.Size = new System.Drawing.Size(620, 22); + this.NgayMuaTextBox.TabIndex = 4; + this.NgayMuaTextBox.TextChanged += new System.EventHandler(this.NgayMuaTextBox_TextChanged); + // + // soluongTB + // + this.soluongTB.Location = new System.Drawing.Point(308, 273); + this.soluongTB.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.soluongTB.Name = "soluongTB"; + this.soluongTB.Size = new System.Drawing.Size(620, 22); + this.soluongTB.TabIndex = 3; + this.soluongTB.TextChanged += new System.EventHandler(this.soluongTB_TextChanged); + // + // DiachiTB + // + this.DiachiTB.Location = new System.Drawing.Point(308, 241); + this.DiachiTB.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.DiachiTB.Name = "DiachiTB"; + this.DiachiTB.Size = new System.Drawing.Size(620, 22); + this.DiachiTB.TabIndex = 2; + this.DiachiTB.TextChanged += new System.EventHandler(this.DiachiTB_TextChanged); + // + // DonviTB + // + this.DonviTB.Location = new System.Drawing.Point(308, 209); + this.DonviTB.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.DonviTB.Name = "DonviTB"; + this.DonviTB.Size = new System.Drawing.Size(620, 22); + this.DonviTB.TabIndex = 1; + this.DonviTB.TextChanged += new System.EventHandler(this.textBox2_TextChanged); + // + // VattuTextbox + // + this.VattuTextbox.Location = new System.Drawing.Point(308, 177); + this.VattuTextbox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.VattuTextbox.Name = "VattuTextbox"; + this.VattuTextbox.Size = new System.Drawing.Size(620, 22); + this.VattuTextbox.TabIndex = 0; + this.VattuTextbox.TextChanged += new System.EventHandler(this.VattuTextbox_TextChanged); + // + // contextMenuStrip1 + // + this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4); + // + // Vattu + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.panel1); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Name = "Vattu"; + this.Size = new System.Drawing.Size(1085, 615); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.TextBox DonviTB; + private System.Windows.Forms.TextBox VattuTextbox; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox SotienTB; + private System.Windows.Forms.TextBox NgayMuaTextBox; + private System.Windows.Forms.TextBox soluongTB; + private System.Windows.Forms.TextBox DiachiTB; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label labelTieuDe; + private System.Windows.Forms.Button Huy; + private System.Windows.Forms.Button Them; + } +} diff --git a/Project1/TreeGUI/Vattu.cs b/Project1/TreeGUI/Vattu.cs new file mode 100644 index 0000000..4455cb4 --- /dev/null +++ b/Project1/TreeGUI/Vattu.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class Vattu : UserControl + { + public Vattu() + { + InitializeComponent(); + } + + + + private void label1_Click(object sender, EventArgs e) + { + + } +//-----------------------------------------------------------------------------------------// + //Button calback + private void button1_Click(object sender, EventArgs e) + { + MessageBox.Show("Đã thêm vào danh sách"); + } + + private void button2_Click(object sender, EventArgs e) + { + MessageBox.Show("Đã hủy"); + } + +//----------------------------------------------------------------------------------// +//All textbox call Back + private void VattuTextbox_TextChanged(object sender, EventArgs e) + { + + } + //Đơn Vi TextBox + private void textBox2_TextChanged(object sender, EventArgs e) + { + + } + + private void DiachiTB_TextChanged(object sender, EventArgs e) + { + + } + + private void soluongTB_TextChanged(object sender, EventArgs e) + { + + } + + private void NgayMuaTextBox_TextChanged(object sender, EventArgs e) + { + + } + + private void SotienTB_TextChanged(object sender, EventArgs e) + { + + } + } +} diff --git a/Project1/TreeGUI/Vattu.resx b/Project1/TreeGUI/Vattu.resx new file mode 100644 index 0000000..ad53752 --- /dev/null +++ b/Project1/TreeGUI/Vattu.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Project1/TreeGUI/XoaCay.Designer.cs b/Project1/TreeGUI/XoaCay.Designer.cs new file mode 100644 index 0000000..1569971 --- /dev/null +++ b/Project1/TreeGUI/XoaCay.Designer.cs @@ -0,0 +1,140 @@ +namespace Project1 +{ + partial class XoaCay + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XoaCay)); + this.MaCayTB = new System.Windows.Forms.TextBox(); + this.TenCay = new System.Windows.Forms.Label(); + this.labelTieuDe = new System.Windows.Forms.Label(); + this.Huy = new System.Windows.Forms.Button(); + this.XoaButton = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // MaCayTB + // + this.MaCayTB.Location = new System.Drawing.Point(156, 119); + this.MaCayTB.Margin = new System.Windows.Forms.Padding(4); + this.MaCayTB.Name = "MaCayTB"; + this.MaCayTB.Size = new System.Drawing.Size(332, 22); + this.MaCayTB.TabIndex = 13; + + // + // TenCay + // + this.TenCay.AutoSize = true; + this.TenCay.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.TenCay.Location = new System.Drawing.Point(40, 119); + this.TenCay.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.TenCay.Name = "TenCay"; + this.TenCay.Size = new System.Drawing.Size(77, 24); + this.TenCay.TabIndex = 19; + this.TenCay.Text = "Mã Cây:"; + // + // labelTieuDe + // + this.labelTieuDe.AutoSize = true; + this.labelTieuDe.Font = new System.Drawing.Font("Calibri", 19.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelTieuDe.ForeColor = System.Drawing.Color.DarkSlateGray; + this.labelTieuDe.Location = new System.Drawing.Point(128, 43); + this.labelTieuDe.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTieuDe.Name = "labelTieuDe"; + this.labelTieuDe.Size = new System.Drawing.Size(271, 41); + this.labelTieuDe.TabIndex = 25; + this.labelTieuDe.Text = "Xóa Thông Tin Cây"; + + // + // Huy + // + this.Huy.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.Huy.Font = new System.Drawing.Font("Calibri", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Huy.Location = new System.Drawing.Point(303, 195); + this.Huy.Margin = new System.Windows.Forms.Padding(4); + this.Huy.Name = "Huy"; + this.Huy.Size = new System.Drawing.Size(160, 32); + this.Huy.TabIndex = 27; + this.Huy.Text = "Hủy"; + this.Huy.UseVisualStyleBackColor = true; + this.Huy.Click += new System.EventHandler(this.Huy_Click); + this.Huy.Leave += new System.EventHandler(this.Huy_Click); + // + // XoaButton + // + this.XoaButton.Font = new System.Drawing.Font("Calibri", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.XoaButton.Location = new System.Drawing.Point(65, 195); + this.XoaButton.Margin = new System.Windows.Forms.Padding(4); + this.XoaButton.Name = "XoaButton"; + this.XoaButton.Size = new System.Drawing.Size(160, 32); + this.XoaButton.TabIndex = 27; + this.XoaButton.Text = "Xóa"; + this.XoaButton.UseVisualStyleBackColor = true; + this.XoaButton.Click += new System.EventHandler(this.XoaButton_Click); + // + // panel1 + // + this.panel1.Controls.Add(this.XoaButton); + this.panel1.Controls.Add(this.Huy); + this.panel1.Controls.Add(this.labelTieuDe); + this.panel1.Controls.Add(this.TenCay); + this.panel1.Controls.Add(this.MaCayTB); + this.panel1.Location = new System.Drawing.Point(6, 16); + this.panel1.Margin = new System.Windows.Forms.Padding(4); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(527, 271); + this.panel1.TabIndex = 2; + // + // XoaCay + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(536, 289); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "XoaCay"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Xóa Cây"; + this.Load += new System.EventHandler(this.XoaCay_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TextBox MaCayTB; + private System.Windows.Forms.Label TenCay; + private System.Windows.Forms.Label labelTieuDe; + private System.Windows.Forms.Button Huy; + private System.Windows.Forms.Button XoaButton; + private System.Windows.Forms.Panel panel1; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/XoaCay.cs b/Project1/TreeGUI/XoaCay.cs new file mode 100644 index 0000000..90be12c --- /dev/null +++ b/Project1/TreeGUI/XoaCay.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TreeBUS; +using TreeDTO; +namespace Project1 +{ + public partial class XoaCay : Form + { + private CayCanhBUS cayBus; + private ThamSoBUS thamso; + private List tsDTO; + private List listViTri; + private List listcayCanh; + private ViTriBUS ViTriBus; + public XoaCay() + { + InitializeComponent(); + } + + + private void XoaCay_Load(object sender, EventArgs e) + { + thamso = new ThamSoBUS(); + cayBus = new CayCanhBUS(); + ViTriBus = new ViTriBUS(); + tsDTO = thamso.selectThamSo(); + listViTri = ViTriBus.selectVT(); + listcayCanh = cayBus.select(); + } + private void XoaButton_Click(object sender, EventArgs e) + { + int i = 0, vitri = 0; + if (MaCayTB.Text == "") + { + MessageBox.Show("Vui Lòng nhận dự liệu trước khi xóa"); + return; + } + //1. Map data from GUI + CaycanhDTO cayDTO = new CaycanhDTO(); + cayDTO.MaCayCanhPT = MaCayTB.Text; + + //2. Kiểm tra data hợp lệ or not + for (i = 0; i < listcayCanh.Count(); i++) + { + if (listcayCanh[i].MaCayCanhPT == cayDTO.MaCayCanhPT) + { + vitri = listcayCanh[i].MaViTriPT; + break; + } + } + for (i = 0; i < listViTri.Count(); i++) + { + if (vitri == listViTri[i].MaViTriPT) + { + ViTriDTO suavt = new ViTriDTO(); + suavt.MaViTriPT = listViTri[i].MaViTriPT; + suavt.TenViTriPT = listViTri[i].TenViTriPT; + suavt.SoLuongPT = listViTri[i].SoLuongPT - 1; + bool result1 = ViTriBus.suaViTri(suavt); + if (result1 == false) + { + MessageBox.Show("có vấn đề đang xảy ra"); + } + break; + } + } + + + + //3. Thêm vào DB + bool kq = cayBus.xoaCay(cayDTO); + if (kq == false) + MessageBox.Show("Xóa thông tin cây thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Xóa thông tin cây thành công"); + } + //------------------------------------------------------------// + + + private void Huy_Click(object sender, EventArgs e) + { + + } + + + + } +} diff --git a/Project1/TreeGUI/XoaCay.resx b/Project1/TreeGUI/XoaCay.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/XoaCay.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuGEac7hhGnO4 + YRpzuGEac7hhGk2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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/XoaVatTu.Designer.cs b/Project1/TreeGUI/XoaVatTu.Designer.cs new file mode 100644 index 0000000..e3056ab --- /dev/null +++ b/Project1/TreeGUI/XoaVatTu.Designer.cs @@ -0,0 +1,101 @@ +namespace Project1 +{ + partial class XoaVatTu + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XoaVatTu)); + this.HuyBT = new System.Windows.Forms.Button(); + this.XoaBT = new System.Windows.Forms.Button(); + this.maVatTuTB = new System.Windows.Forms.TextBox(); + this.maVatTuLB = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // HuyBT + // + this.HuyBT.Location = new System.Drawing.Point(205, 87); + this.HuyBT.Name = "HuyBT"; + this.HuyBT.Size = new System.Drawing.Size(107, 29); + this.HuyBT.TabIndex = 11; + this.HuyBT.Text = "Hủy"; + this.HuyBT.UseVisualStyleBackColor = true; + this.HuyBT.Click += new System.EventHandler(this.HuyBT_Click); + // + // XoaBT + // + this.XoaBT.Location = new System.Drawing.Point(39, 87); + this.XoaBT.Name = "XoaBT"; + this.XoaBT.Size = new System.Drawing.Size(107, 29); + this.XoaBT.TabIndex = 10; + this.XoaBT.Text = "Xóa"; + this.XoaBT.UseVisualStyleBackColor = true; + this.XoaBT.Click += new System.EventHandler(this.XoaBT_Click); + // + // maVatTuTB + // + this.maVatTuTB.Location = new System.Drawing.Point(85, 40); + this.maVatTuTB.Name = "maVatTuTB"; + this.maVatTuTB.Size = new System.Drawing.Size(244, 20); + this.maVatTuTB.TabIndex = 9; + // + // maVatTuLB + // + this.maVatTuLB.AutoSize = true; + this.maVatTuLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.maVatTuLB.Location = new System.Drawing.Point(-1, 41); + this.maVatTuLB.Name = "maVatTuLB"; + this.maVatTuLB.Size = new System.Drawing.Size(80, 19); + this.maVatTuLB.TabIndex = 8; + this.maVatTuLB.Text = "Mã Vật Tư:"; + // + // XoaVatTu + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(341, 142); + this.Controls.Add(this.HuyBT); + this.Controls.Add(this.XoaBT); + this.Controls.Add(this.maVatTuTB); + this.Controls.Add(this.maVatTuLB); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "XoaVatTu"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Xóa Vật Tư"; + this.Load += new System.EventHandler(this.XoaVatTu_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button HuyBT; + private System.Windows.Forms.Button XoaBT; + private System.Windows.Forms.TextBox maVatTuTB; + private System.Windows.Forms.Label maVatTuLB; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/XoaVatTu.cs b/Project1/TreeGUI/XoaVatTu.cs new file mode 100644 index 0000000..ecb6e24 --- /dev/null +++ b/Project1/TreeGUI/XoaVatTu.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TreeBUS; +using TreeDTO; + +namespace Project1 +{ + public partial class XoaVatTu : Form + { + private VattuBUS vattu; + private GiaVatTuBUS giabus; + public XoaVatTu() + { + InitializeComponent(); + } + + private void XoaVatTu_Load(object sender, EventArgs e) + { + vattu = new VattuBUS(); + giabus = new GiaVatTuBUS(); + } + + private void HuyBT_Click(object sender, EventArgs e) + { + this.Hide(); + } + + private void XoaBT_Click(object sender, EventArgs e) + { + if(maVatTuTB.Text == "") + { + MessageBox.Show("Vui Lòng nhập đầy đủ trước khi thực hiện"); + return; + } + VattuDTO vt = new VattuDTO(); + GiaVatTuDTO gia = new GiaVatTuDTO(); + vt.MaVatTuPT = int.Parse(maVatTuTB.Text); + gia.MaVatTuPTGV = int.Parse(maVatTuTB.Text); + //2. Kiểm tra data hợp lệ or not + + //3. Thêm vào DB + bool kq = vattu.xoavattu(vt); + bool kq1 = giabus.xoaGia(gia); + if (kq == false || kq1 == false ) + MessageBox.Show("Xóa thông tin vật tư thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Xóa thông tin vật tư thành công"); + this.Hide(); + } + } +} diff --git a/Project1/TreeGUI/XoaVatTu.resx b/Project1/TreeGUI/XoaVatTu.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/XoaVatTu.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAA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ykRpIc5IcAnKRGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/XoaViTri.Designer.cs b/Project1/TreeGUI/XoaViTri.Designer.cs new file mode 100644 index 0000000..a1bae75 --- /dev/null +++ b/Project1/TreeGUI/XoaViTri.Designer.cs @@ -0,0 +1,115 @@ +namespace Project1 +{ + partial class XoaViTri + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XoaViTri)); + this.maViTriTB = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.HuyBT = new System.Windows.Forms.Button(); + this.XoaBT = new System.Windows.Forms.Button(); + this.tenVatTuLB = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // maViTriTB + // + this.maViTriTB.Location = new System.Drawing.Point(109, 80); + this.maViTriTB.Name = "maViTriTB"; + this.maViTriTB.Size = new System.Drawing.Size(232, 20); + this.maViTriTB.TabIndex = 43; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Calibri", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(114, 23); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(124, 36); + this.label2.TabIndex = 41; + this.label2.Text = "Xóa Vị Trí"; + // + // HuyBT + // + this.HuyBT.Location = new System.Drawing.Point(211, 131); + this.HuyBT.Name = "HuyBT"; + this.HuyBT.Size = new System.Drawing.Size(107, 29); + this.HuyBT.TabIndex = 40; + this.HuyBT.Text = "Hủy"; + this.HuyBT.UseVisualStyleBackColor = true; + this.HuyBT.Click += new System.EventHandler(this.HuyBT_Click); + // + // XoaBT + // + this.XoaBT.Location = new System.Drawing.Point(50, 131); + this.XoaBT.Name = "XoaBT"; + this.XoaBT.Size = new System.Drawing.Size(107, 29); + this.XoaBT.TabIndex = 39; + this.XoaBT.Text = "Xóa"; + this.XoaBT.UseVisualStyleBackColor = true; + this.XoaBT.Click += new System.EventHandler(this.XoaBT_Click); + // + // tenVatTuLB + // + this.tenVatTuLB.AutoSize = true; + this.tenVatTuLB.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tenVatTuLB.Location = new System.Drawing.Point(9, 79); + this.tenVatTuLB.Name = "tenVatTuLB"; + this.tenVatTuLB.Size = new System.Drawing.Size(75, 19); + this.tenVatTuLB.TabIndex = 37; + this.tenVatTuLB.Text = "Mã Vị Trí :"; + // + // XoaViTri + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(374, 193); + this.Controls.Add(this.maViTriTB); + this.Controls.Add(this.label2); + this.Controls.Add(this.HuyBT); + this.Controls.Add(this.XoaBT); + this.Controls.Add(this.tenVatTuLB); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "XoaViTri"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Xóa Vị Trí"; + this.Load += new System.EventHandler(this.XoaViTri_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox maViTriTB; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button HuyBT; + private System.Windows.Forms.Button XoaBT; + private System.Windows.Forms.Label tenVatTuLB; + } +} \ No newline at end of file diff --git a/Project1/TreeGUI/XoaViTri.cs b/Project1/TreeGUI/XoaViTri.cs new file mode 100644 index 0000000..f48e208 --- /dev/null +++ b/Project1/TreeGUI/XoaViTri.cs @@ -0,0 +1,51 @@ +using System; +using TreeBUS; +using TreeDTO; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project1 +{ + public partial class XoaViTri : Form + { + private ViTriBUS VTbus; + public XoaViTri() + { + InitializeComponent(); + } + + private void XoaViTri_Load(object sender, EventArgs e) + { + VTbus = new ViTriBUS(); + } + + private void XoaBT_Click(object sender, EventArgs e) + { + if (maViTriTB.Text == "") + { + MessageBox.Show("Vui Lòng nhập đầy đủ trước khi thực hiện"); + return; + } + ViTriDTO VT = new ViTriDTO(); + VT.MaViTriPT = int.Parse(maViTriTB.Text); + VTbus.xoaViTri(VT); + bool result = VTbus.xoaViTri(VT); ; + if (result == false) + MessageBox.Show("Xóa thông tin vị trí thất bại. Vui lòng kiểm tra lại dữ liệu"); + else + MessageBox.Show("Xóa thông tin vị trí thành công"); + this.Hide(); + } + + private void HuyBT_Click(object sender, EventArgs e) + { + this.Hide(); + } + } +} diff --git a/Project1/TreeGUI/XoaViTri.resx b/Project1/TreeGUI/XoaViTri.resx new file mode 100644 index 0000000..76c3cce --- /dev/null +++ b/Project1/TreeGUI/XoaViTri.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAGIBAABiAQAAAAAAAAAA + AABNoiMaTaIjGk2iIxpNoiMaTaIjGk2iIxpOoyUZabJQGHS4YhpzuGEac7hhGnO4YRpzuGEac7hhGnS5 + YRptr10ZSXdBGkRuPRpEbz0aRG89GkRvPRpEbz0aSHNFG2ihZBt0uWIac7hhGnO4YRpzuGEac7hhGnO4 + YRpzuGEac7hhGk2iI8NNoiPWTaIj002iI9JNoiPSTaIj002iJM9ksErFc7lh1HK4YdNyuGHScrhh0nK4 + YdJyuGHTc7lh1WioWcxHdD/RRG8900RvPdJEbz3SRG8900RvPNVIckfWaaFs1nO5YdVyuGHUcrhh0nK4 + YdJyuGHScrhh03K4YdZyuGHDTaIjd02iI8BNoiPtTaIi/02iI/9NoiP/TaIi4luqPbVwrXDjcbJq+3K4 + Yf9yuGH/crhh/3K0Z/1ys2jSXJVPrURvPdlEbz3/RG89/0RvPf9Ebz32Q287w1N0bMxtkZXacrdjvXK4 + YeRyuGH/crhh/3K4Yf9yuGHtcrhhwHK4YXdNoCMDTaIeD1CeMH1PoC35TaIk+U2iI99NoiJXW5FnFW2A + tqlvmJK5crlf23K4Yfdyt2Lsb5qQ6G2Fr2g7ewoHRG89QERvPdBFbz/7RG8+8kRvPY86bB4RbHu6b218 + vqlwm4wVcrlgV3K4Yd9y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Rr/cpEa/3KRGv9ykRp3c5AaAGyX + GAAAAAAAAAAAAAAAAABd/4EAcrdhAHG5YhdyuGFucrhhlXK4YWtyuGEVcrhhAAAAAAAAAAAAAAAAAAAA + AAAAAAAAR3I9AEdzPQBHbj0CR2k9AEdqPQAAAAAAcJEaAG2SGgNykRqAcpEa+nKRGv9ykRr/cpEa3nGR + GjZykRoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAb7NhAG+zYQBytGICdbZkAHW1ZAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcZEbAHGRGxNykRp4cpEaunKR + GqlykRpIc5IcAnKRGwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcpAZAHKQ + GQNykRoQcZEbC2+RHAFwkRwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMABBAPGMYxjAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPAAAADwAAAA8AAAAPAAHADwAB4A8BA + fgPAQH4DwEB+A+DAfwf7wH/f/+B////w//8= + + + \ No newline at end of file diff --git a/Project1/TreeGUI/bin/Debug/TreeBUS.dll b/Project1/TreeGUI/bin/Debug/TreeBUS.dll new file mode 100644 index 0000000..8b59ade Binary files /dev/null and b/Project1/TreeGUI/bin/Debug/TreeBUS.dll differ diff --git a/Project1/TreeGUI/bin/Debug/TreeBUS.pdb b/Project1/TreeGUI/bin/Debug/TreeBUS.pdb new file mode 100644 index 0000000..579eaae Binary files /dev/null and b/Project1/TreeGUI/bin/Debug/TreeBUS.pdb differ diff --git a/Project1/TreeGUI/bin/Debug/TreeDAL.dll b/Project1/TreeGUI/bin/Debug/TreeDAL.dll new file mode 100644 index 0000000..dbbe297 Binary files /dev/null and b/Project1/TreeGUI/bin/Debug/TreeDAL.dll differ diff --git a/Project1/TreeGUI/bin/Debug/TreeDAL.pdb b/Project1/TreeGUI/bin/Debug/TreeDAL.pdb new file mode 100644 index 0000000..968522b Binary files /dev/null and b/Project1/TreeGUI/bin/Debug/TreeDAL.pdb differ diff --git a/Project1/TreeGUI/bin/Debug/TreeDTO.dll b/Project1/TreeGUI/bin/Debug/TreeDTO.dll new file mode 100644 index 0000000..54b049d Binary files /dev/null and b/Project1/TreeGUI/bin/Debug/TreeDTO.dll differ diff --git a/Project1/TreeGUI/bin/Debug/TreeDTO.pdb b/Project1/TreeGUI/bin/Debug/TreeDTO.pdb new file mode 100644 index 0000000..9aa0d42 Binary files /dev/null and b/Project1/TreeGUI/bin/Debug/TreeDTO.pdb differ diff --git a/Project1/TreeGUI/bin/Debug/TreeGUI.exe b/Project1/TreeGUI/bin/Debug/TreeGUI.exe new file mode 100644 index 0000000..7dc0e0b Binary files /dev/null and b/Project1/TreeGUI/bin/Debug/TreeGUI.exe differ diff --git a/Project1/TreeGUI/bin/Debug/TreeGUI.exe.config b/Project1/TreeGUI/bin/Debug/TreeGUI.exe.config new file mode 100644 index 0000000..ffb0228 --- /dev/null +++ b/Project1/TreeGUI/bin/Debug/TreeGUI.exe.config @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Project1/TreeGUI/bin/Debug/TreeGUI.pdb b/Project1/TreeGUI/bin/Debug/TreeGUI.pdb new file mode 100644 index 0000000..504e5c6 Binary files /dev/null and b/Project1/TreeGUI/bin/Debug/TreeGUI.pdb differ diff --git a/Project1/TreeGUI/bin/Debug/aa/TreeGUI.resources.dll b/Project1/TreeGUI/bin/Debug/aa/TreeGUI.resources.dll new file mode 100644 index 0000000..500663c Binary files /dev/null and b/Project1/TreeGUI/bin/Debug/aa/TreeGUI.resources.dll differ diff --git a/Project1/TreeGUI/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Project1/TreeGUI/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..74f305b Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Project1/TreeGUI/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Project1/TreeGUI/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..ac06cf7 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.BcChamSoc.resources b/Project1/TreeGUI/obj/Debug/Project1.BcChamSoc.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.BcChamSoc.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.LenLich.resources b/Project1/TreeGUI/obj/Debug/Project1.LenLich.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.LenLich.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.LichCS.resources b/Project1/TreeGUI/obj/Debug/Project1.LichCS.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.LichCS.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.MainWindow.resources b/Project1/TreeGUI/obj/Debug/Project1.MainWindow.resources new file mode 100644 index 0000000..4e6ffde Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.MainWindow.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.MenuCay.aa.resources b/Project1/TreeGUI/obj/Debug/Project1.MenuCay.aa.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.MenuCay.aa.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.MenuCay.resources b/Project1/TreeGUI/obj/Debug/Project1.MenuCay.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.MenuCay.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.MenuVatTu.resources b/Project1/TreeGUI/obj/Debug/Project1.MenuVatTu.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.MenuVatTu.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.QuanLyCayCanh.resources b/Project1/TreeGUI/obj/Debug/Project1.QuanLyCayCanh.resources new file mode 100644 index 0000000..2cd84c3 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.QuanLyCayCanh.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.Setting.resources b/Project1/TreeGUI/obj/Debug/Project1.Setting.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.Setting.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.SuaCay.resources b/Project1/TreeGUI/obj/Debug/Project1.SuaCay.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.SuaCay.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.SuaVatTu.resources b/Project1/TreeGUI/obj/Debug/Project1.SuaVatTu.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.SuaVatTu.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.SuaViTri.resources b/Project1/TreeGUI/obj/Debug/Project1.SuaViTri.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.SuaViTri.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.TTCayCanh.resources b/Project1/TreeGUI/obj/Debug/Project1.TTCayCanh.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.TTCayCanh.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.ThemCay.resources b/Project1/TreeGUI/obj/Debug/Project1.ThemCay.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.ThemCay.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.ThemVatTu.resources b/Project1/TreeGUI/obj/Debug/Project1.ThemVatTu.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.ThemVatTu.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.ThemViTri.resources b/Project1/TreeGUI/obj/Debug/Project1.ThemViTri.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.ThemViTri.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.UserControl1.resources b/Project1/TreeGUI/obj/Debug/Project1.UserControl1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.UserControl1.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.Vattu.resources b/Project1/TreeGUI/obj/Debug/Project1.Vattu.resources new file mode 100644 index 0000000..9c5eb02 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.Vattu.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.XoaCay.resources b/Project1/TreeGUI/obj/Debug/Project1.XoaCay.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.XoaCay.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.XoaVatTu.resources b/Project1/TreeGUI/obj/Debug/Project1.XoaVatTu.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.XoaVatTu.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.XoaViTri.resources b/Project1/TreeGUI/obj/Debug/Project1.XoaViTri.resources new file mode 100644 index 0000000..75efa90 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.XoaViTri.resources differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.csproj.CoreCompileInputs.cache b/Project1/TreeGUI/obj/Debug/Project1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..1df8492 --- /dev/null +++ b/Project1/TreeGUI/obj/Debug/Project1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +5d43d9a86bb03ea74066e2cb3f2ce7771045a6ae diff --git a/Project1/TreeGUI/obj/Debug/Project1.csproj.FileListAbsolute.txt b/Project1/TreeGUI/obj/Debug/Project1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..68b5941 --- /dev/null +++ b/Project1/TreeGUI/obj/Debug/Project1.csproj.FileListAbsolute.txt @@ -0,0 +1,18 @@ +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\bin\Debug\Project1.exe.config +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\bin\Debug\Project1.exe +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\bin\Debug\Project1.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.MainWindow.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.Properties.Resources.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.csproj.GenerateResource.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.csproj.CoreCompileInputs.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.exe +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.QuanLyCayCanh.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.Vattu.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.UserControl1.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.ThemCay.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.BaoCaoTTCC.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.Lich.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.UserControl2.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.csprojAssemblyReference.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.Form2.resources diff --git a/Project1/TreeGUI/obj/Debug/Project1.csproj.GenerateResource.cache b/Project1/TreeGUI/obj/Debug/Project1.csproj.GenerateResource.cache new file mode 100644 index 0000000..9efcc1d Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.csproj.GenerateResource.cache differ diff --git a/Project1/TreeGUI/obj/Debug/Project1.csprojAssemblyReference.cache b/Project1/TreeGUI/obj/Debug/Project1.csprojAssemblyReference.cache new file mode 100644 index 0000000..79f829a Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/Project1.csprojAssemblyReference.cache differ diff --git a/Project1/TreeGUI/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll b/Project1/TreeGUI/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll new file mode 100644 index 0000000..b128b3c Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll differ diff --git a/Project1/TreeGUI/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Project1/TreeGUI/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeGUI/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Project1/TreeGUI/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeGUI/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Project1/TreeGUI/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeGUI/obj/Debug/TreeGUI.Properties.Resources.resources b/Project1/TreeGUI/obj/Debug/TreeGUI.Properties.Resources.resources new file mode 100644 index 0000000..602b6f3 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/TreeGUI.Properties.Resources.resources differ diff --git a/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.CopyComplete b/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.CoreCompileInputs.cache b/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..ffdbd71 --- /dev/null +++ b/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +6f89d0191dbc72b07c4c3e173059bb86e189cd04 diff --git a/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.FileListAbsolute.txt b/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e4b1e30 --- /dev/null +++ b/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.FileListAbsolute.txt @@ -0,0 +1,56 @@ +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\bin\Debug\Project1.exe.config +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\bin\Debug\Project1.exe +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\bin\Debug\Project1.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.MainWindow.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.Properties.Resources.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.QuanLyCayCanh.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.ThemCay.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.UserControl1.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.Vattu.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\TreeGUI.csproj.GenerateResource.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\TreeGUI.csproj.CoreCompileInputs.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.exe +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.BcChamSoc.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.LichCS.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\Project1.TTCayCanh.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\Project1\obj\Debug\TreeGUI.csprojAssemblyReference.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\TreeGUI.csprojAssemblyReference.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.BcChamSoc.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.LichCS.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.MainWindow.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.ThemCay.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.QuanLyCayCanh.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.UserControl1.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.TTCayCanh.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.Vattu.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\TreeGUI.csproj.GenerateResource.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\TreeGUI.csproj.CoreCompileInputs.cache +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\bin\Debug\TreeGUI.exe.config +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\bin\Debug\TreeGUI.exe +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\bin\Debug\TreeGUI.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\bin\Debug\TreeBUS.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\bin\Debug\TreeDTO.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\bin\Debug\TreeDAL.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\bin\Debug\TreeBUS.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\bin\Debug\TreeDTO.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\bin\Debug\TreeDAL.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\TreeGUI.Properties.Resources.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\TreeGUI.csproj.CopyComplete +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\TreeGUI.exe +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\TreeGUI.pdb +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\bin\Debug\aa\TreeGUI.resources.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\aa\TreeGUI.resources.dll +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.MenuCay.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.MenuCay.aa.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.XoaCay.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.SuaCay.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.LenLich.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.Setting.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.MenuVatTu.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.SuaVatTu.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.ThemVatTu.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.XoaVatTu.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.ThemViTri.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.SuaViTri.resources +D:\Burn\Dien\Document\Code\C#\Project\Project1\TreeGUI\obj\Debug\Project1.XoaViTri.resources diff --git a/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.GenerateResource.cache b/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.GenerateResource.cache new file mode 100644 index 0000000..7886f7c Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/TreeGUI.csproj.GenerateResource.cache differ diff --git a/Project1/TreeGUI/obj/Debug/TreeGUI.csprojAssemblyReference.cache b/Project1/TreeGUI/obj/Debug/TreeGUI.csprojAssemblyReference.cache new file mode 100644 index 0000000..a970bf7 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/TreeGUI.csprojAssemblyReference.cache differ diff --git a/Project1/TreeGUI/obj/Debug/TreeGUI.exe b/Project1/TreeGUI/obj/Debug/TreeGUI.exe new file mode 100644 index 0000000..7dc0e0b Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/TreeGUI.exe differ diff --git a/Project1/TreeGUI/obj/Debug/TreeGUI.pdb b/Project1/TreeGUI/obj/Debug/TreeGUI.pdb new file mode 100644 index 0000000..504e5c6 Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/TreeGUI.pdb differ diff --git a/Project1/TreeGUI/obj/Debug/aa/TreeGUI.resources.dll b/Project1/TreeGUI/obj/Debug/aa/TreeGUI.resources.dll new file mode 100644 index 0000000..500663c Binary files /dev/null and b/Project1/TreeGUI/obj/Debug/aa/TreeGUI.resources.dll differ diff --git a/README.md b/README.md deleted file mode 100644 index 37bec0f..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# TREE-MANAGEMENT-AT-SCHOOL -A mini project of management tree at school -- Link diagram : https://www.draw.io/?lightbox=1&highlight=0000ff&edit=_blank&layers=1&nav=1&title=Untitled%20Diagram.xml#R7ZtZc5s8FIZ%2FDZftIMR6aXC2mbSTjttpekkwMTQYuVgk9vfrP0lILAIvJMSOk%2BQi5RwtCJ1H0iupUaA3X11k%2FiL6hqZhomjqdKXAsaJpAEKL%2FEM968JjmmrhmGXxlGeqHJP4v5A7RbY8nobLRkaMUILjRdMZoDQNA9zw%2BVmGnprZ7lHSfOvCn4UtxyTwE%2BH9alT%2B3%2FEUR9wPTKdKuAzjWcRfbmv8k%2B%2F84GGWoTzlb1Q0eM9%2BiuS5L%2Brin7qM%2FCl6qrngmQK9DCFcPM1XXpjQ3hUdV5Q735Bafk8WpnifAlpR4NFPcv7x7ug7cVxcKR5UbPCNPF9eKWdAcV3FNn%2FxVuO16Cv2rSGtD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DM78EmmXAJjvxfoH0u3yLHVY3c4XNJmv71E5sQQ5g6AMlLFoRLBBwq5iqURS0LP8PocDtTruSrhQNb15bOvIE84XTebJvGnRqiPBsFXNqXSWZG1qjJ3W0BhgH2qarvZueAYq3Bdo%2FdU2otqnqj%2B6qu842a7doR5Q1dugn6qX8x9mIwpPHtmvqmo0sTXBTm6JVYJ4WjCDo1wsvhRmSweDwgz63dP8%2BCVMjZrXbJc67ru7OOFNqq0fd5O6z03NXed9y87bld1XPmlUTz5flQf8Bt4sMptVJkKpuUFEy3Turj%2FitrXcRxzlfkcchA1zv7PX2cjz6k64gie%2FO%2FDdWueigF5LGXex39waBPwAhR3TlJtv6%2Fk0nvQuV57mDrvLhe2juK3qKkzu0FNdWDEHSaAfHAd%2B0pISelOn3CUoeGgIFdDR%2F81AkgiQhurGeFuP1wWH3aldNl8QSvsy2LXQgN4x6JYZpjT76PJiVagpXmqLXgGbmy2q4opPrqr3Yb98XKyJNw2ljfT2pPi2Maxp%2BaaS3yHj99PQaoeGNvsxbUpwdIqnwZhuvkyzWyTuCzWU7%2BrbVW2A%2BjnUvZvJr0GP8WHpAZvb%2FQr0tPdzb5ueV52ztAHmLOuQ1FmDUWdJ%2F7%2FegVJjhmPOeDczVoMT2I%2BTw%2Bo1SfycgF6Tmzy8XjPal6%2FvgcM3vW%2BwTm7fYEoTo6FtP4F15BO%2Fl3JLzOov0Irs1R%2F6wbP%2FAQ%3D%3D diff --git a/TREE-MANAGEMENT-AT-SCHOOL b/TREE-MANAGEMENT-AT-SCHOOL new file mode 160000 index 0000000..0cccf9a --- /dev/null +++ b/TREE-MANAGEMENT-AT-SCHOOL @@ -0,0 +1 @@ +Subproject commit 0cccf9a25ca16456d3fc4b7da06b3c2623a10475 diff --git a/picture/Capture.PNG b/picture/Capture.PNG new file mode 100644 index 0000000..4da487e Binary files /dev/null and b/picture/Capture.PNG differ diff --git a/picture/close-button-.png b/picture/close-button-.png new file mode 100644 index 0000000..688c7e5 Binary files /dev/null and b/picture/close-button-.png differ diff --git a/picture/forest.png b/picture/forest.png new file mode 100644 index 0000000..9ecb0a1 Binary files /dev/null and b/picture/forest.png differ diff --git a/picture/forest_c2G_icon.ico b/picture/forest_c2G_icon.ico new file mode 100644 index 0000000..99cbb6b Binary files /dev/null and b/picture/forest_c2G_icon.ico differ diff --git a/picture/github (1).png b/picture/github (1).png new file mode 100644 index 0000000..227d2a1 Binary files /dev/null and b/picture/github (1).png differ diff --git a/picture/github.png b/picture/github.png new file mode 100644 index 0000000..6d6347b Binary files /dev/null and b/picture/github.png differ diff --git a/picture/minimize.png b/picture/minimize.png new file mode 100644 index 0000000..c242c9a Binary files /dev/null and b/picture/minimize.png differ diff --git a/picture/plus.png b/picture/plus.png new file mode 100644 index 0000000..82f46cc Binary files /dev/null and b/picture/plus.png differ diff --git a/picture/power-button.png b/picture/power-button.png new file mode 100644 index 0000000..55165e1 Binary files /dev/null and b/picture/power-button.png differ diff --git a/picture/report.png b/picture/report.png new file mode 100644 index 0000000..34e401f Binary files /dev/null and b/picture/report.png differ diff --git a/picture/shut-down-icon.png b/picture/shut-down-icon.png new file mode 100644 index 0000000..e6c532c Binary files /dev/null and b/picture/shut-down-icon.png differ diff --git a/picture/stand-by.png b/picture/stand-by.png new file mode 100644 index 0000000..7ca7a99 Binary files /dev/null and b/picture/stand-by.png differ diff --git a/picture/tools (1).png b/picture/tools (1).png new file mode 100644 index 0000000..73a3399 Binary files /dev/null and b/picture/tools (1).png differ diff --git a/picture/tools.png b/picture/tools.png new file mode 100644 index 0000000..cdccc60 Binary files /dev/null and b/picture/tools.png differ diff --git a/picture/tree (1).png b/picture/tree (1).png new file mode 100644 index 0000000..d764729 Binary files /dev/null and b/picture/tree (1).png differ diff --git a/picture/tree (2).png b/picture/tree (2).png new file mode 100644 index 0000000..d338a33 Binary files /dev/null and b/picture/tree (2).png differ diff --git a/picture/tree.png b/picture/tree.png new file mode 100644 index 0000000..4697e02 Binary files /dev/null and b/picture/tree.png differ