Ejemplo n.º 1
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            if (validateGrid(gridView1.FocusedRowHandle))
            {
                var result = MessageBox.Show("Bạn có muốn lưu sự thay đổi xuống cơ sở dữ liệu hay không?", "Lưu thông tin", MessageBoxButtons.YesNo);
                if (result == DialogResult.Yes)
                {
                    DataUpdate <LinhKien_View> listUpdate = gridThaoTac.update();

                    if (LinhKien_DAL.saves(listUpdate))
                    {
                        MessageBox.Show("Lưu thông tin thành công!");
                        InitVal();
                        count_row = 0;
                    }
                    else
                    {
                        MessageBox.Show("Lưu thông tin thất bại!");
                    }
                }
            }
            else
            {
                MessageBox.Show("Chưa nhập đầy đủ thông tin!");
            }
        }
Ejemplo n.º 2
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            var result = MessageBox.Show("Bạn có muốn lưu sự thay đổi xuống cơ sở dữ liệu hay không?", "Lưu thông tin", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                DataUpdate <NhanVien_View> listUpdate = gridThaoTac.update();

                if (NhanVien_DAL.saves(listUpdate))
                {
                    MessageBox.Show("Lưu thông tin thành công!");
                    InitVal();
                }
                else
                {
                    MessageBox.Show("Lưu thông tin thất bại!");
                }
            }
        }