Ejemplo n.º 1
0
        private void catagoryDeleteButton_Click(object sender, EventArgs e)
        {
            SetupGateway setupGateway = new SetupGateway();

            if (idhiddenLabel.Text.Trim() != String.Empty && catagoryTextBox.Text.Trim() != String.Empty)
            {
                if (cMessageBox.Quiestion("Are you sure to delete this?"))
                {
                    string id        = idhiddenLabel.Text.Trim();
                    int    rowAffect = setupGateway.DeleteCatagory(id);
                    if (rowAffect > 0)
                    {
                        cMessageBox.Success("Category Deleted");
                        CatagorySetup_Load(sender, e);
                    }
                    else
                    {
                        cMessageBox.Failed("Failed To Delete Category");
                        CatagorySetup_Load(sender, e);
                    }
                }
            }
        }