Esempio n. 1
0
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            if (itemid > 0)
            {
                var result = MessageBox.Show("ARE YOU SURE", "Error", MessageBoxButtons.YesNo);

                if (DialogResult.Yes == result)
                {
                    RepositeryResponce responce = itemRepo.Remove(itemid);
                    if (responce.sucsess)
                    {
                        ShowMessageSucsess(responce.message);
                        reset();
                        loadGrid();
                    }
                    else
                    {
                        ShowMessageError(responce.message);
                    }
                }
                else if (DialogResult.No == result)
                {
                }
            }
        }