//Tinh lai so co ky han public double RutLaiSoCoKyHan(String MaSo) { double m_tienLai = 0; DataTable data = m_RutTietKiemData.LayDSSo(MaSo); DataRow row = data.Rows[0]; m_tienLai += Convert.ToDouble(row["MucLaiSuat"]) * Convert.ToInt64(row["SoDu"]) * Convert.ToInt32(row["KyHan"]); return(m_tienLai / 100); }
public int TinhNgay(String MaSo) { RutTietKiemData dataRut = new RutTietKiemData(); DataTable data = dataRut.LayDSSo(MaSo); DataRow row = data.Rows[0]; DateTime d1 = Convert.ToDateTime(row["NgayHieuLuc"].ToString()); DateTime d2 = Convert.ToDateTime(row["NgayDenHan"].ToString()); int SoNgay = Convert.ToInt32(d2.ToOADate() - d1.ToOADate()); return(SoNgay); }
public void LayRutTietKiem(ComboBoxEx MaSoTK, TextBoxX MaKH, TextBoxX TenKH, TextBoxX SoDu, TextBoxX LoaiTienGui, TextBoxX LoaiTietKiem, TextBoxX LaiSuat, TextBoxX NgayHieuLuc, TextBoxX NgayDenHan, TextBoxX SoButToan) { RutTietKiemData data1 = new RutTietKiemData(); DataTable tbl = data1.LayDSSo(MaSoTK.SelectedValue.ToString()); DataRow row = tbl.Rows[0]; MaKH.Text = Convert.ToString(row["MaKH"]); TenKH.Text = Convert.ToString(row["HoTen"]); SoDu.Text = Convert.ToString(row["SoDu"]); LoaiTienGui.Text = Convert.ToString(row["LoaiTien"]); LoaiTietKiem.Text = Convert.ToString(row["TenLoaiTietKiem"]); LaiSuat.Text = Convert.ToString(row["MucLaiSuat"]); NgayDenHan.Text = Convert.ToString(row["NgayHieuLuc"]); NgayHieuLuc.Text = Convert.ToString(row["NgayDenHan"]); SoButToan.Text = Convert.ToString(row["SoButToan"]); }