Exemplo n.º 1
0
        //Click nút Delete
        private void BbiDelete_ItemClick(object sender, ItemClickEventArgs e)
        {
            string   Message        = "";
            string   curr_LineCode  = txt_LineCode.Text.Trim();
            DateTime curr_ApplyDate = DateTime.Parse(date_ApplyDate.Text.Trim());

            Message = "Bạn muốn xóa tên: " + txt_LineCode.Text.ToString() + "?";
            if ((MessageBox.Show(Message, "Xác nhận", MessageBoxButtons.YesNo, MessageBoxIcon.Question
                                 , MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes))
            {
                if (M0003_Line_DAO.Delete(curr_LineCode, curr_ApplyDate))
                {
                    Message = "Xóa thành công tên: \"" + txt_LineCode.Text.ToString() + "\"!";
                    MessageBox.Show(Message, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.Close();
                }
            }
        }