Esempio n. 1
0
        private void btnXoa_Click(object sender, EventArgs e)
        {
            ComboBLL comboBLL = new ComboBLL();
            string   pathTemp = comboBLL.pathImage(id);

            try
            {
                comboBLL.DeleteCombo(id);
                MessageBox.Show("Xóa combo thành công", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception)
            {
                MessageBox.Show("Lỗi khi xóa Combo", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            txtComboName.Clear();
            txtTotal.Clear();
            numDiscount.Value  = 0;
            dayStart.Value     = DateTime.Now;
            dayEnd.Value       = DateTime.Now;
            lblNameImage.Text  = "Chưa có ảnh";
            previewImage.Image = null;
            btnSua.Enabled     = false;
            btnXoa.Enabled     = false;
            LoadListView();
        }
Esempio n. 2
0
        private void btnXoa_Click_1(object sender, EventArgs e)
        {
            ComboBLL comboBLL = new ComboBLL();
            string   pathTemp = comboBLL.pathImage(id);

            comboBLL.DeleteCombo(id);
            txtComboName.Clear();
            txtTotal.Clear();
            numDiscount.Value  = 0;
            dayStart.Value     = DateTime.Now;
            dayEnd.Value       = DateTime.Now;
            lblNameImage.Text  = "Chưa có ảnh";
            previewImage.Image = null;
            btnSua.Enabled     = false;
            btnXoa.Enabled     = false;
            LoadListView();
        }
Esempio n. 3
0
 private void btnDeleteCombo_Click(object sender, EventArgs e)
 {
     ComboBLL.DeleteCombo(tbIDCombo.Text);
     tblCombo.DataSource = pro.GetAll();
 }