Beispiel #1
0
 private void ToolXoa_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Bạn có chắc chắn muốn xóa khế ước này không?", "Khế ước", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         bindingNavigator.BindingSource.RemoveCurrent();
         HoSoKheUocCtrl.Save();
     }
 }
        private void Lưu_Click(object sender, EventArgs e)
        {
            txtSbt.Focus();
            bindingNavigatorGN.BindingSource.MoveNext();
            KiemTra();

            if (status == ThamSo.Controll.noreally)
            {
                MessageBox.Show("Thông tin còn thiếu nên giải ngân không được lưu", "Giai Ngan", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                GNctrl.Save();
                Allow(false);
                long sobuttoan = ThamSo.SoButToan;
                ThamSo.SoButToan = sobuttoan + 1;
            }

            status = ThamSo.Controll.Save;
            HSKUctrl.Save();

            HoSoKheUocController HSctrol = new HoSoKheUocController();

            foreach (DataGridViewRow view in dataGridViewGN.Rows)
            {
                HSctrol.CapNhatSoTienHienTai(Convert.ToString(view.Cells["MaSoKU"].Value), Convert.ToInt64(view.Cells["ConLai"].Value));
            }
        }
        private void Lưu_Click(object sender, EventArgs e)
        {
            txtSoButToan.Focus();
            bindingNavigatorTL.BindingSource.MoveNext();
            KiemTra();
            if (status == ThamSo.Controll.noreally)
            {
                MessageBox.Show("Thông tin còn thiếu nên thu lãi không được lưu", "Thu Lai", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                TLctrl.Save();
                Allow(false);
                long sobuttoan = ThamSo.SoButToan;
                ThamSo.SoButToan = sobuttoan + 1;
            }
            status = ThamSo.Controll.Save;
            HSKUctrl.Save();

            HoSoKheUocController HSctrol = new HoSoKheUocController();

            foreach (DataGridViewRow view in dataGridViewTL.Rows)
            {
                HSctrol.CapNhatNgayTinhLai(Convert.ToString(view.Cells["MaSoKU"].Value), Convert.ToDateTime(view.Cells["NgayTL"].Value));
            }
        }
        private void Thêm_Click(object sender, EventArgs e)
        {
            DataRowView row = (DataRowView)bindingNavigatorDSKU.BindingSource.AddNew();

            HSKUctrl.Save();
        }