private void In_ViewBill(object sender, EventArgs e)
        {
            Ban_DTO ban  = (Ban_DTO)(sender as TableCard).Tag;
            var     bill = billList.Find(s => s.IdBan == ban.Id);

            if (bill != null)
            {
                using (FastViewBill f = new FastViewBill(bill))
                {
                    f.ShowDialog();
                }
            }
        }
        private void dgvBill_HD_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var senderGrid = (DataGridView)sender;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
            {
                var obj = dgvBill_HD.CurrentRow.DataBoundItem as HoaDon_DTO;
                using (FastViewBill f = new FastViewBill(obj))
                {
                    f.ShowDialog();
                }
            }
        }
        private void dgvBill_GH_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var senderGrid = (DataGridView)sender;

            if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
            {
                var hd = dgvBill_GH.Rows[e.RowIndex].DataBoundItem as HoaDon_DTO;
                using (FastViewBill f = new FastViewBill(hd))
                {
                    f.ShowDialog();
                    dgvBill_GH.DataSource = HoaDonBUL.Instance.Get_BillByDate(DateTime.Now).FindAll(s => s.Shipping == true && s.Trangthai == false);
                }
            }
        }
Esempio n. 4
0
        private void dgvBill_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0 && e.ColumnIndex == 3)
            {
                var obj = dgvBill.CurrentRow.DataBoundItem as HoaDon_DTO;
                using (FastViewBill f = new FastViewBill(obj))
                {
                    f.ShowDialog();

                    //check xem khi nào thanh toán mới load
                    dgvSource.DataSource = HoaDonBUL.Instance.Get_BillByDate(DateTime.Now, false);
                    Card_Load();
                }
            }
        }