Exemple #1
0
        private void btnDeleteItem_Click(object sender, EventArgs e)
        {
            try
            {
                switch (btnDeleteItem.Text)
                {
                case "&Delete Item":
                    frmDelete frm = new frmDelete(APP_ENTITIES.INVENTORY_ITEM, this.SelectedItemID);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        PopulateInventoryItemsForSelectedCategories();
                    }
                    break;

                case "&Undelete Item":
                    string strRemarks = string.Format("Undelete by {0} dt. {1}", Program.CURR_USER.UserFullName, AppCommon.GetServerDateTime().ToString("dd MMM yy hh:mmtt"));
                    (new ServiceInventoryItems()).UndeleteInventoryItemMasterInfo(this.SelectedItemID, strRemarks);
                    PopulateInventoryItemsForSelectedCategories();
                    break;
                }
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "pageInventoryItems::btnDeleteItem_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #2
0
        private void btnDeleteContact_Click(object sender, EventArgs e)
        {
            try
            {
                switch (btnDeleteContact.Text)
                {
                case "&Delete Contact":
                    frmDelete frm = new frmDelete(APP_ENTITIES.CONTACTS, this.SelectedContactID);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        PopulateContacts();
                    }
                    //gridContacts.Refresh();
                    break;

                case "&Undelete Contact":
                    string strRemarks = string.Format("Undelete by {0} dt. {1}", Program.CURR_USER.UserFullName, AppCommon.GetServerDateTime().ToString("dd MMM yy hh:mmtt"));
                    new ServiceContacts().UndeleteContact(this.SelectedContactID, strRemarks);
                    PopulateContacts();
                    //gridContacts.Refresh();
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "pageParties::btnDeleteParty_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #3
0
        private void btnDeleteParty_Click(object sender, EventArgs e)
        {
            try
            {
                switch (btnDeleteParty.Text)
                {
                case "&Delete Party":
                    frmDelete frm = new frmDelete(APP_ENTITIES.PARTIES, this.SelectedPartyID);
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        PopulateParties();
                    }
                    break;

                case "&Undelete Party":
                    string strRemarks = string.Format("Undelete by {0} dt. {1}", Program.CURR_USER.UserFullName, AppCommon.GetServerDateTime().ToString("dd MMM yy hh:mmtt"));
                    (new ServiceParties()).UndeleteParty(this.SelectedPartyID, strRemarks);
                    PopulateParties();
                    break;
                }
            }
            catch (Exception ex)
            {
                string strErr = ex.Message;
                if (ex.InnerException != null)
                {
                    strErr += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(strErr, "pageParties::btnDeleteParty_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btn_about_Click(object sender, EventArgs e)
        {
            hideBtn();
            frmDelete a = new frmDelete();

            a.ShowDialog();
        }
Exemple #5
0
        private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDelete formDel = new frmDelete();

            formDel.mindmap = this;
            formDel.ShowDialog();
        }
Exemple #6
0
        private void btnDeleteCategory_Click(object sender, EventArgs e)
        {
            using (frmDelete formDeleteProduct = new frmDelete()
            {
                Type = "Category"
            }) {
                formDeleteProduct.ShowDialog();

                StartUp();
            }
        }
 private void btnDeleteRole_Click(object sender, EventArgs e)
 {
     try
     {
         frmDelete frm = new frmDelete(APP_ENTITIES.ROLES, this.SelectedRoleID);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateRoles();
         }
     }
     catch (Exception ex)
     {
         string errMessage = string.Format("{0}\n{1}", ex.Message, ex.InnerException.Message);
         MessageBox.Show(errMessage, "pageRoleManager::btnDeleteRole_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #8
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            frmDelete frm = null;

            try
            {
                switch (this.ENTITY)
                {
                case APP_ENTITIES.INVENTORY_ITEM:
                    frm = new frmDelete(APP_ENTITIES.INVENTORY_ITEM_ATTACHMENT, this.SelectedAttachmentID);
                    break;

                case APP_ENTITIES.SALES_LEAD:
                    frm = new frmDelete(APP_ENTITIES.SALES_LEAD_ATTACHMENT, this.SelectedAttachmentID);
                    break;

                case APP_ENTITIES.SALES_ENQUIRY:
                    frm = new frmDelete(APP_ENTITIES.SALES_ENQUIRY_ATTACHMENT, this.SelectedAttachmentID);
                    break;

                case APP_ENTITIES.SALES_QUOTATION:
                    frm = new frmDelete(APP_ENTITIES.SALES_QUOTATION_ATTACHMENT, this.SelectedAttachmentID);
                    break;

                case APP_ENTITIES.SALES_ORDER:
                    frm = new frmDelete(APP_ENTITIES.SALES_ORDER_ATTACHMENT, this.SelectedAttachmentID);
                    break;

                case APP_ENTITIES.EMPLOYEES:
                    frm = new frmDelete(APP_ENTITIES.EMPLOYEES_ATTACHMENT, this.SelectedAttachmentID);
                    break;
                }
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    PopulateDocuments();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ctrlAttachments::btnDelete_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }