public static IList <SoTietKiemInfo> LayDsSoTietKiemTheoMa(String MaSoTK) { IList <SoTietKiemInfo> ds = new List <SoTietKiemInfo>(); SoTietKiemData data = new SoTietKiemData(); DataTable tbl = data.LaySoTheoMa(MaSoTK); IList <SoTietKiemInfo> STK = new List <SoTietKiemInfo>(); foreach (DataRow row in tbl.Rows) { SoTietKiemInfo S = new SoTietKiemInfo(); if (row["MaLoaiTietKiem"].ToString() != "TK423100") { MessageBoxEx.Show("Bạn đang sư dụng chức năng in sổ không kỳ hạn!", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); break; } else { KhachHangInfo m_KH = new KhachHangInfo(); m_KH.HoTen = Convert.ToString(row["HoTen"]); m_KH.CMND = Convert.ToString(row["CMND"]); m_KH.DiaChi = Convert.ToString(row["DiaChi"]); m_KH.NgayCap = Convert.ToDateTime(row["NgayCap"]); m_KH.NoiCap = Convert.ToString(row["NoiCap"]); ChiTietPhatSinhGDInfo m_PSGD = new ChiTietPhatSinhGDInfo(); m_PSGD.SoTien = Convert.ToInt64(row["SoTien"]); LaiSuatTietKiemInfo m_LS = new LaiSuatTietKiemInfo(); m_LS.MucLaiSuat = Convert.ToInt32(row["MucLaiSuat"]); SoDuTietKiemInfo m_SoDuInfo = new SoDuTietKiemInfo(); m_SoDuInfo.SoDu = Convert.ToInt64(row["SoDu"]); S.MaSoTietKiem = Convert.ToString(row["MaSoTietKiem"]); S.LaiSuatTK = m_LS; S.MaKH = m_KH; S.ChiTietPSGD = m_PSGD; S.SoDuTK = m_SoDuInfo; } STK.Add(S); } return(STK); }
public static IList <InPhieuLuuTienGuiInfo> LayPhieuLuuTietKiemTheoMaSo(String MaSoTK) { InPhieuLuuTienGuiData data = new InPhieuLuuTienGuiData(); DataTable tbl = data.LaySoTheoMa(MaSoTK); IList <InPhieuLuuTienGuiInfo> PhieuLuu = new List <InPhieuLuuTienGuiInfo>(); foreach (DataRow row in tbl.Rows) { InPhieuLuuTienGuiInfo PL = new InPhieuLuuTienGuiInfo(); KhachHangInfo m_KH = new KhachHangInfo(); m_KH.HoTen = Convert.ToString(row["HoTen"]); m_KH.CMND = Convert.ToString(row["CMND"]); m_KH.DiaChi = Convert.ToString(row["DiaChi"]); m_KH.NgayCap = Convert.ToDateTime(row["NgayCap"]); ChiTietPhatSinhGDInfo m_PSGD = new ChiTietPhatSinhGDInfo(); m_PSGD.SoTien = Convert.ToInt64(row["SoTien"]); LaiSuatTietKiemInfo m_LS = new LaiSuatTietKiemInfo(); m_LS.MucLaiSuat = Convert.ToInt32(row["MucLaiSuat"]); SoDuTietKiemInfo m_SoDuInfo = new SoDuTietKiemInfo(); m_SoDuInfo.SoDu = Convert.ToInt64(row["SoDu"]); SoTietKiemInfo m_STK = new SoTietKiemInfo(); m_STK.MaSoTietKiem = Convert.ToString(row["MaSoTietKiem"]); m_STK.NgayHieuLuc = Convert.ToDateTime(row["NgayHieuLuc"]); LoaiTietKiemInfo m_LTK = new LoaiTietKiemInfo(); m_LTK.TenLoaiTietKiem = Convert.ToString(row["TenLoaiTietKiem"]); PL.ChiTietPhatSinhGD = m_PSGD; PL.KhachHang = m_KH; PL.LaiSuatTietKiem = m_LS; PL.LoaiTietKiem = m_LTK; PL.SoDuTietKiem = m_SoDuInfo; PL.SoTietKiem = m_STK; PhieuLuu.Add(PL); } return(PhieuLuu); }
public static IList <InPhieuLuuTienGuiInfo> LayPhieuLuuTietKiemTheoMaSo(String NgayGiaoDich) { InDanhSachSoTheoNgayData data = new InDanhSachSoTheoNgayData(); DataTable tbl = data.LaySoTheoNgayGD(NgayGiaoDich); IList <InPhieuLuuTienGuiInfo> DSS = new List <InPhieuLuuTienGuiInfo>(); foreach (DataRow row in tbl.Rows) { InPhieuLuuTienGuiInfo DS = new InPhieuLuuTienGuiInfo(); KhachHangInfo m_KH = new KhachHangInfo(); m_KH.HoTen = Convert.ToString(row["HoTen"]); ChiTietPhatSinhGDInfo m_PSGD = new ChiTietPhatSinhGDInfo(); m_PSGD.SoTien = Convert.ToInt64(row["SoTien"]); LaiSuatTietKiemInfo m_LS = new LaiSuatTietKiemInfo(); m_LS.MucLaiSuat = Convert.ToInt32(row["MucLaiSuat"]); SoDuTietKiemInfo m_SoDuInfo = new SoDuTietKiemInfo(); m_SoDuInfo.SoDu = Convert.ToInt64(row["SoDu"]); SoTietKiemInfo m_STK = new SoTietKiemInfo(); m_STK.MaSoTietKiem = Convert.ToString(row["MaSoTietKiem"]); LoaiTietKiemInfo m_LTK = new LoaiTietKiemInfo(); m_LTK.TenLoaiTietKiem = Convert.ToString(row["TenLoaiTietKiem"]); DMLoaiTienInfo m_DMLT = new DMLoaiTienInfo(); m_DMLT.LoaiTien = Convert.ToString(row["LoaiTien"]); DS.ChiTietPhatSinhGD = m_PSGD; DS.KhachHang = m_KH; DS.LaiSuatTietKiem = m_LS; DS.LoaiTietKiem = m_LTK; DS.SoDuTietKiem = m_SoDuInfo; DS.SoTietKiem = m_STK; DS.DMLoaiTien = m_DMLT; DSS.Add(DS); } return(DSS); }
public static IList <SoTietKiemInfo> LayDsSoTKCoKyHan() { IList <SoTietKiemInfo> ds = new List <SoTietKiemInfo>(); SoTietKiemData data = new SoTietKiemData(); DataTable tbl = data.LaySoTheoMa(); IList <SoTietKiemInfo> STK = new List <SoTietKiemInfo>(); foreach (DataRow row in tbl.Rows) { SoTietKiemInfo S = new SoTietKiemInfo(); if (row["MaLoaiTietKiem"].ToString() == "TK423100") { MessageBoxEx.Show("Bạn đang sư dụng chức năng in sổ không co ky han!", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); break; } else { KhachHangInfo m_KH = new KhachHangInfo(); m_KH.HoTen = Convert.ToString(row["HoTen"]); m_KH.CMND = Convert.ToString(row["CMND"]); m_KH.DiaChi = Convert.ToString(row["DiaChi"]); m_KH.NgayCap = Convert.ToDateTime(row["NgayCap"]); m_KH.NoiCap = Convert.ToString(row["NoiCap"]); ChiTietPhatSinhGDInfo m_PSGD = new ChiTietPhatSinhGDInfo(); m_PSGD.SoTien = Convert.ToInt64(row["SoTien"]); LaiSuatTietKiemInfo m_LS = new LaiSuatTietKiemInfo(); m_LS.MucLaiSuat = Convert.ToInt32(row["MucLaiSuat"]); SoDuTietKiemInfo m_SoDuInfo = new SoDuTietKiemInfo(); m_SoDuInfo.SoDu = Convert.ToInt64(row["SoDu"]); LoaiTietKiemInfo m_LTK = new LoaiTietKiemInfo(); m_LTK.KyHan = Convert.ToInt32(row["KyHan"]); PhongGiaoDichInfo m_PGD = new PhongGiaoDichInfo(); m_PGD.MaPhongGD = Convert.ToString(row["MaPhongGiaoDich"]); DMKyLaiTKInfo m_DMKyLaiTK = new DMKyLaiTKInfo(); m_DMKyLaiTK.LoaiKyTinhLai = Convert.ToString(row["LoaiKyTinhLai"]); S.MaSoTietKiem = Convert.ToString(row["MaSoTietKiem"]); S.NgayHieuLuc = Convert.ToDateTime(row["NgayHieuLuc"]); S.NgayDenHan = Convert.ToDateTime(row["NgayDenHan"]); S.LaiSuatTK = m_LS; S.MaKH = m_KH; S.ChiTietPSGD = m_PSGD; S.SoDuTK = m_SoDuInfo; S.PhongGiaoDich = m_PGD; S.DMKyTinhLai = m_DMKyLaiTK; S.MaLoaiTietKiem = m_LTK; } STK.Add(S); } return(STK); }