Esempio n. 1
0
        private void tsbThem_Click_1(object sender, EventArgs e)
        {
            Phieudathang1 frm = new Phieudathang1();

            frm.THEM  = true;
            frm.MAPDH = DEM2.ToString();
            frm.CONNO = "0";
            frm.ShowDialog();
            LoadData();
        }
Esempio n. 2
0
        private void tsbsua_Click_1(object sender, EventArgs e)
        {
            Phieudathang1 frm = new Phieudathang1();

            frm.THEM = false;
            if (DEM1 == 0)
            {
                MessageBox.Show("Bạn chưa chọn phiếu đặt hàng để cập nhật thông tin mới.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MAPDH") != null)
                {
                    frm.MAPDH = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MAPDH").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MAMH") != null)
                {
                    frm.MAMH = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MAMH").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MANCC") != null)
                {
                    frm.MANCC = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MANCC").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MANV") != null)
                {
                    frm.MANV = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MANV").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NGAYDH") != null)
                {
                    frm.NGAYDH = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NGAYDH").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SOLUONG") != null)
                {
                    frm.SOLUONG = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SOLUONG").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GIANHAP") != null)
                {
                    frm.GIANHAP = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GIANHAP").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "DATRA") != null)
                {
                    frm.DATRA = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "DATRA").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CONNO") != null)
                {
                    frm.CONNO = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "CONNO").ToString();
                }
                frm.ShowDialog();
            }
            LoadData();
        }