예제 #1
0
        private void frmQuyDinh_Load(object sender, EventArgs e)
        {
            ltkBUS = new LoaiTietKiemBUS();
            tsBUS  = new ThamSoBUS();

            ThamSoDTO ts       = new ThamSoDTO();
            DataTable dtThamSo = tsBUS.getThamSo();                         // get Tham so

            txtTienGuiToiThieu.Text     = (dtThamSo.Rows[0][1]).ToString(); // tu dong hien thi tham so
            txtThoiGianGuiToiThieu.Text = (dtThamSo.Rows[0][3]).ToString(); // tu dong hien thi tham so
            loadLoaiTietKiemVao_Combobox();                                 // load thong tin cac loai tiet kiem dang co
        }
예제 #2
0
        private void getThamSo()
        {
            thamSoDataTable = thamSoBUS.getThamSo();
            DataRow row = thamSoDataTable.Rows[thamSoDataTable.Rows.Count - 1];

            try
            {
                thamSoDTO.FChietKhauVang    = float.Parse(row[1].ToString());
                thamSoDTO.FChietKhauBac     = float.Parse(row[2].ToString());
                thamSoDTO.FChietKhauBachKim = float.Parse(row[3].ToString());
                thamSoDTO.DLuongCa          = double.Parse(row[4].ToString());

                txtChietKhauHangVang.Text    = thamSoDTO.FChietKhauVang.ToString();
                txtChietKhauHangBac.Text     = thamSoDTO.FChietKhauBac.ToString();
                txtChietKhauHangBachKim.Text = thamSoDTO.FChietKhauBachKim.ToString();
                txtLuongCa.Text = thamSoDTO.DLuongCa.ToString();
            }
            catch (Exception)
            {
                XtraMessageBox.Show("ĐÃ CÓ LỖI XẢY RA KHI TẢI DỮ LIỆU!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }