Example #1
0
        private void btnLogOut_Click(object sender, EventArgs e)
        {
            PestForm areYouSure = new PestForm();

            areYouSure.ShowDialog();
            if (areYouSure.DialogResult == DialogResult.Yes)
            {
                this.Close();
            }
        }
Example #2
0
        private void btnUTCrudDelete_Click(object sender, EventArgs e)
        {
            int            userTypeIndex = dgvUTTable.CurrentCell.RowIndex;
            UserTypeEntity userType      = AllUserTypes.ElementAt(userTypeIndex);
            PestForm       areYouSure    = new PestForm(userType);

            areYouSure.ShowDialog();

            if (areYouSure.DialogResult == DialogResult.Yes)
            {
                dgvUTTable.Rows.RemoveAt(userTypeIndex);
                dgvUTTable.Invalidate();
            }
        }
Example #3
0
        private void btnCommentCrudDelete_Click(object sender, EventArgs e)
        {
            int           commentIndex = dgvCommentTable.CurrentCell.RowIndex;
            CommentEntity comment      = AllComments.ElementAt(commentIndex);
            PestForm      areYouSure   = new PestForm(comment);

            areYouSure.ShowDialog();

            if (areYouSure.DialogResult == DialogResult.Yes)
            {
                dgvCommentTable.Rows.RemoveAt(commentIndex);
                dgvCommentTable.Invalidate();
            }
        }
Example #4
0
        private void btnCategoryDelete_Click(object sender, EventArgs e)
        {
            int            catIndex   = dgvCategoryTable.CurrentCell.RowIndex;
            CategoryEntity cat        = AllCategories.ElementAt(catIndex);
            PestForm       areYouSure = new PestForm(cat);

            areYouSure.ShowDialog();

            if (areYouSure.DialogResult == DialogResult.Yes)
            {
                dgvCategoryTable.Rows.RemoveAt(catIndex);
                dgvCategoryTable.Invalidate();
            }
        }
Example #5
0
        private void btnPlaceDelete_Click(object sender, EventArgs e)
        {
            int         placeIndex = dgvPlaceTable.CurrentCell.RowIndex;
            PlaceEntity place      = AllPlaces.ElementAt(placeIndex);
            PestForm    areYouSure = new PestForm(place);

            areYouSure.ShowDialog();

            if (areYouSure.DialogResult == DialogResult.Yes)
            {
                dgvPlaceTable.Rows.RemoveAt(placeIndex);
                dgvPlaceTable.Invalidate();
            }
        }
Example #6
0
        private void btnInfoDelete_Click(object sender, EventArgs e)
        {
            int        infoIndex  = dgvInfoTable.CurrentCell.RowIndex;
            InfoEntity info       = AllInfos.ElementAt(infoIndex);
            PestForm   areYouSure = new PestForm(info);

            areYouSure.ShowDialog();

            if (areYouSure.DialogResult == DialogResult.Yes)
            {
                dgvInfoTable.Rows.RemoveAt(infoIndex);
                dgvInfoTable.Invalidate();
            }
        }