예제 #1
0
 private void bbiLapPhieuChi_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     var frm = new PhieuChi();
     frm.Reload += (sx) =>
     {
         bbiXem_ItemClick(this, null);
     };
     frm.ShowDialog();
 }
예제 #2
0
        private void bbiKhachLayThemTien_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var arg = gbList.GetRowCellValue(gbList.FocusedRowHandle, colMa_Chung_Tu);
            if (arg == null)
                return;

            string ten_khach_hang = gbList.GetRowCellValue(gbList.FocusedRowHandle, colTen_Khach_Hang) == null ? "" : gbList.GetRowCellValue(gbList.FocusedRowHandle, colTen_Khach_Hang).ToString();
            string so = gbList.GetRowCellValue(gbList.FocusedRowHandle, colSo) == null ? "" : gbList.GetRowCellValue(gbList.FocusedRowHandle, colSo).ToString();
            string so_cmnd = gbList.GetRowCellValue(gbList.FocusedRowHandle, colSo_CMND) == null ? "" : gbList.GetRowCellValue(gbList.FocusedRowHandle, colSo_CMND).ToString();
            if (!KiemTraPhieuDaChuoc(arg.ToString()))
            {
                return;
            }

            var so_tien = gbList.GetRowCellValue(gbList.FocusedRowHandle, colSo_Tien);
            var lai_suat_thang = gbList.GetRowCellValue(gbList.FocusedRowHandle, colLai_Suat_Thang);
            var ngay_ghi_so = gbList.GetRowCellValue(gbList.FocusedRowHandle, colNgay_Ghi_So);

            var frm = new PhieuChi();
            frm.Thiet_Lap(arg.ToString(), so, ten_khach_hang,so_cmnd, Convert.ToDecimal(so_tien), Convert.ToDecimal(lai_suat_thang), Convert.ToDateTime(ngay_ghi_so));
            frm.Reload += (e_) =>
            {
                bbiXem_ItemClick(this, null);
            };
            frm.ShowDialog();
        }
예제 #3
0
        private void bbiSua_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var ma = gbList.GetRowCellValue(gbList.FocusedRowHandle, colMa);
            if (ma == null)
                return;

            var loai = gbList.GetRowCellValue(gbList.FocusedRowHandle, colLoai);
            if (loai == null)
                return;

            if (loai.ToString() == "Thu")
            {
                var frm = new PhieuThu(ma.ToString());
                frm.Reload += (sx) =>
                {
                    bbiXem_ItemClick(this, null);
                };
                frm.ShowDialog();
            }
            else
            {
                var frm = new PhieuChi(ma.ToString());
                frm.Reload += (sx) =>
                {
                    bbiXem_ItemClick(this, null);
                };
                frm.ShowDialog();
            }
        }