예제 #1
0
        private void tsbSua_Click(object sender, EventArgs e)
        {
            NhaCungCap1 frm = new NhaCungCap1();

            frm.THEM = false;
            if (DEM1 == 0)
            {
                MessageBox.Show("Bạn chưa chọn nhà cung cấp để cập nhật thông tin mới.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MANCC") != null)
                {
                    frm.MANCC = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MANCC").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TENNCC") != null)
                {
                    frm.TENNCC = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TENNCC").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "DIACHI") != null)
                {
                    frm.DIACHI = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "DIACHI").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SDT") != null)
                {
                    frm.SDT = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SDT").ToString();
                }
                if (gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GHICHU") != null)
                {
                    frm.GHICHU = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "GHICHU").ToString();
                }
                frm.ShowDialog();
            }
            LoadData();
        }
예제 #2
0
        private void tsbthem_Click(object sender, EventArgs e)
        {
            NhaCungCap1 frm = new NhaCungCap1();

            frm.THEM  = true;
            frm.MANCC = DEM2.ToString();
            frm.ShowDialog();
            LoadData();
        }