Exemple #1
0
        private void btnThayDoiTienGuiToiThieu_Click(object sender, EventArgs e)
        {
            ThamSoDTO ts = new ThamSoDTO();

            ts.DSoTienGuiToiThieuPGT = double.Parse(txtTienGuiToiThieu.Text);

            bool kq = tsBUS.suaThamSo(ts);

            if (kq == false)
            {
                MessageBox.Show("Thay đổi Tiền gửi tối thiểu thất bại. Vui lòng kiểm tra lại dũ liệu");
            }
            else
            {
                MessageBox.Show("Thay đổi Tiền gửi tối thiểu thành công");
            }
        }
Exemple #2
0
        private void suaThamSo()
        {
            thamSoDTO.FChietKhauVang    = float.Parse(txtChietKhauHangVang.Text.ToString());
            thamSoDTO.FChietKhauBac     = float.Parse(txtChietKhauHangBac.Text.ToString());
            thamSoDTO.FChietKhauBachKim = float.Parse(txtChietKhauHangBachKim.Text.ToString());
            thamSoDTO.DLuongCa          = double.Parse(txtLuongCa.Text.ToString());

            bool re = thamSoBUS.suaThamSo(thamSoDTO);

            if (re)
            {
                XtraMessageBox.Show("ĐÃ LƯU THAY ĐỔI!", "Notifications!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
            else
            {
                XtraMessageBox.Show("ĐÃ CÓ LỖI XẢY RA KHI LƯU THAY ĐỔI!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #3
0
        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;
            }
        }