Example #1
0
        private void bbiLapPhieuChi_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var machungtu = gbList.GetFocusedRowCellValue(colMa_Chung_Tu);

            if (machungtu == null)
            {
                return;
            }
            frmThuChi_Them_Sua frm = new frmThuChi_Them_Sua();

            frm.Lap_Phieu("Chi", machungtu.ToString());
            frm.Reload += (s) =>
            {
                bbiXem_ItemClick(this, null);
            };
            frm.ShowDialog();
        }
Example #2
0
        public frmCongNoChungTu()
        {
            InitializeComponent();

            DateTime tu  = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            DateTime den = tu.AddMonths(1).AddDays(-1);

            dtTu.DateTime  = tu;
            dtDen.DateTime = den;

            Nap_Hinh_Thuc_Cong_No();
            Nap_Loai_Chung_Tu();

            bbiXem_ItemClick(this, null);

            gbList.ShownEditor += (s, e) =>
            {
                var view = s as GridView;
                view.ActiveEditor.DoubleClick += (s_, e_) =>
                {
                    var machungtu = gbList.GetFocusedRowCellValue(colMa_Chung_Tu);
                    if (machungtu == null)
                    {
                        return;
                    }

                    frmThuChi_Them_Sua frm = new frmThuChi_Them_Sua();
                    frm.Lap_Phieu_Tu_Dong(machungtu.ToString());
                    frm.Reload += (s__) =>
                    {
                        bbiXem_ItemClick(this, null);
                    };
                    frm.ShowDialog();
                };
            };
        }