/// <summary> /// Function to delete account group /// </summary> public void Delete() { try { if (isDefault == true) { Messages.InformationMessage("Can't delete build in account group"); } //else if (PublicVariables.isMessageDelete) //{ else if (Messages.DeleteConfirmation()) { AccountGroupInfo InfoAccountGroup = new AccountGroupInfo(); AccountGroupBll bllAccountGroup = new AccountGroupBll(); if ((bllAccountGroup.AccountGroupReferenceDelete(decAccountGroupIdForEdit) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; Clear(); } } } catch (Exception ex) { MessageBox.Show("AG10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete account group /// </summary> public void Delete() { try { if (isDefault == true) { Messages.InformationMessage("Can't delete build in account group"); } //else if (PublicVariables.isMessageDelete) //{ else if (Messages.DeleteConfirmation()) { AccountGroupInfo InfoAccountGroup = new AccountGroupInfo(); AccountGroupSP spAccountGroup = new AccountGroupSP(); if ((spAccountGroup.AccountGroupReferenceDelete(decAccountGroupIdForEdit) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; Clear(); } } //} //else //{ // AccountGroupInfo InfoAccountGroup = new AccountGroupInfo(); // AccountGroupSP spAccountGroup = new AccountGroupSP(); // if ((spAccountGroup.AccountGroupReferenceDelete(decAccountGroupIdForEdit) == -1)) // { // Messages.ReferenceExistsMessage(); // } // else // { // Messages.DeletedMessage(); // btnSave.Text = "Save"; // btnDelete.Enabled = false; // Clear(); // } //} } catch (Exception ex) { formMDI.infoError.ErrorString = "AG7:" + ex.Message; } }
/// <summary> /// Function for Delete /// </summary> private void Delete() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage() == true) { bool isDeleteStatus = false; //DesignationSP spDestination = new DesignationSP(); DesiginationBll bllDesigination = new DesiginationBll(); isDeleteStatus = bllDesigination.DesignationDelete(decDesignationId); if (isDeleteStatus == true) { Messages.DeletedMessage(); Clear(); GridFill(); } else { Messages.ReferenceExistsMessage(); } } } else { bool isDeleteStatus = false; //DesignationSP spDestination = new DesignationSP(); DesiginationBll bllDesigination = new DesiginationBll(); isDeleteStatus = bllDesigination.DesignationDelete(decDesignationId); if (isDeleteStatus == true) { Messages.DeletedMessage(); Clear(); GridFill(); } else { Messages.ReferenceExistsMessage(); } } } catch (Exception ex) { MessageBox.Show("D2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Delete Function /// </summary> public void DeleteFunction() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage()) { UserInfo infoUser = new UserInfo(); UserSP spUser = new UserSP(); if ((spUser.UserCreationReferenceDelete(decUserId) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; ClearFunction(); GridFill(); } } } else { UserInfo infoUser = new UserInfo(); UserSP spUser = new UserSP(); if ((spUser.UserCreationReferenceDelete(decUserId) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; ClearFunction(); } } } catch (Exception ex) { formMDI.infoError.ErrorString = "UC:9" + ex.Message; } }
/// <summary> /// Delete Function /// </summary> public void DeleteFunction() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage()) { UserInfo infoUser = new UserInfo(); UserSP spUser = new UserSP(); if ((spUser.UserCreationReferenceDelete(decUserId) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; ClearFunction(); GridFill(); } } } else { UserInfo infoUser = new UserInfo(); UserSP spUser = new UserSP(); if ((spUser.UserCreationReferenceDelete(decUserId) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; ClearFunction(); } } } catch (Exception ex) { MessageBox.Show("UC:9" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function for Delete /// </summary> private void Delete() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage() == true) { bool isDeleteStatus = false; DesignationSP spDestination = new DesignationSP(); isDeleteStatus = spDestination.DesignationDelete(decDesignationId); if (isDeleteStatus == true) { Messages.DeletedMessage(); Clear(); GridFill(); } else { Messages.ReferenceExistsMessage(); } } } else { bool isDeleteStatus = false; DesignationSP spDestination = new DesignationSP(); isDeleteStatus = spDestination.DesignationDelete(decDesignationId); if (isDeleteStatus == true) { Messages.DeletedMessage(); Clear(); GridFill(); } else { Messages.ReferenceExistsMessage(); } } } catch (Exception ex) { formMDI.infoError.ErrorString = "D2:" + ex.Message; } }
/// <summary> /// Function to delete productgroup /// </summary> private void Delete() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage() == true) { ProductGroupInfo InfoProductGroup = new ProductGroupInfo(); ProductGroupBll BllProductGroup = new ProductGroupBll(); if ((BllProductGroup.ProductGroupReferenceDelete(decId) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; ProductGroupUnderComboFillForSearch(); Clear(); } } } else { ProductGroupInfo InfoProductGroup = new ProductGroupInfo(); ProductGroupBll BllProductGroup = new ProductGroupBll(); if ((BllProductGroup.ProductGroupReferenceDelete(decId) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; Clear(); } } } catch (Exception ex) { MessageBox.Show("PG6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete productgroup /// </summary> private void Delete() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage() == true) { ProductGroupInfo InfoProductGroup = new ProductGroupInfo(); ProductGroupSP spProductGroup = new ProductGroupSP(); if ((spProductGroup.ProductGroupReferenceDelete(decId) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; ProductGroupUnderComboFillForSearch(); Clear(); } } } else { ProductGroupInfo InfoProductGroup = new ProductGroupInfo(); ProductGroupSP spProductGroup = new ProductGroupSP(); if ((spProductGroup.ProductGroupReferenceDelete(decId) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; Clear(); } } } catch (Exception ex) { formMDI.infoError.ErrorString = "PG6:" + ex.Message; } }
/// <summary> /// Delete Function /// </summary> public void DeleteFunction() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage()) { RoleInfo infoRole = new RoleInfo(); RoleBll BllRole = new RoleBll(); if ((BllRole.RoleReferenceDelete(decRoleId) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; ClearFunction(); } } } else { RoleInfo infoRole = new RoleInfo(); RoleBll BllRole = new RoleBll(); if (BllRole.RoleReferenceDelete(decRoleId) == -1) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; ClearFunction(); } } } catch (Exception ex) { MessageBox.Show("RL:7" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Delete Function /// </summary> public void DeleteFunction() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage()) { RoleInfo infoRole = new RoleInfo(); RoleSP spRole = new RoleSP(); if ((spRole.RoleReferenceDelete(decRoleId) == -1)) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; ClearFunction(); } } } else { RoleInfo infoRole = new RoleInfo(); RoleSP spRole = new RoleSP(); if (spRole.RoleReferenceDelete(decRoleId) == -1) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; ClearFunction(); } } } catch (Exception ex) { formMDI.infoError.ErrorString = "RL:7" + ex.Message; } }
/// <summary> /// Function to delete the pricelist for the product /// </summary> public void DeleteFunction() { try { PriceListBll BllPriceList = new PriceListBll(); if (BllPriceList.PriceListCheckReferenceAndDelete(decPriceLevelId) <= 0) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); Clear(); } } catch (Exception ex) { MessageBox.Show("PLP7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// delete function /// </summary> public void DeleteFunction() { try { SuffixPrefixSettingsBll BllSuffixPrefixSettings = new SuffixPrefixSettingsBll(); if (BllSuffixPrefixSettings.SuffixPrefixSettingsDeleting(decSuffixPrefixId) == -1) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); Clear(); } } catch (Exception ex) { MessageBox.Show("SPS7" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// delete function /// </summary> public void DeleteFunction() { try { SuffixPrefixSP spSuffixPrefix = new SuffixPrefixSP(); if (spSuffixPrefix.SuffixPrefixSettingsDeleting(decSuffixPrefixId) == -1) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); Clear(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "SPS7" + ex.Message; } }
/// <summary> /// Function to delete the pricelist for the product /// </summary> public void DeleteFunction() { try { PriceListSP spPriceList = new PriceListSP(); if (spPriceList.PriceListCheckReferenceAndDelete(decPriceLevelId) <= 0) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); Clear(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "PLP8" + ex.Message + ex.Message; } }
/// <summary> /// Function to Delete the Route /// </summary> public void DeleteFunction() { try { RouteSP spRoute = new RouteSP(); if (spRoute.RouteDeleting(decRouteId) == -1) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); GridFill(); Clear(); } } catch (Exception ex) { MessageBox.Show("RT7" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { BrandSP spBrand = new BrandSP(); if (spBrand.BrandDeleteCheckExistence(decBrandId) <= 0) { Messages.ReferenceExistsMessage(); } else { Clear(); btnSave.Text = "Save"; Messages.DeletedMessage(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "BR6:" + ex.Message; } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { GodownBll BllGodown = new GodownBll(); if (BllGodown.GodownCheckReferenceAndDelete(decGodownId) <= 0) { Messages.ReferenceExistsMessage(); } else { Clear(); btnSave.Text = "Save"; Messages.DeletedMessage(); } } catch (Exception ex) { MessageBox.Show("G8:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete a servicecategory /// </summary> public void DeleteFunction() { try { ServiceCategorySP spServiceCategory = new ServiceCategorySP(); if (spServiceCategory.ServiceCategoryCheckReferenceAndDelete(decCategoryName) == -1) { Messages.ReferenceExistsMessage(); } else { spServiceCategory.ServiceCategoryDelete(Convert.ToDecimal(dgvServiceCategory.CurrentRow.Cells[1].Value.ToString())); Messages.DeletedMessage(); Clear(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "SC6" + ex.Message; } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { ModelNoSP spModelNo = new ModelNoSP(); if (spModelNo.ModelNoCheckReferenceAndDelete(decModelNo) <= 0) { Messages.ReferenceExistsMessage(); } else { spModelNo.ModelNoDelete(Convert.ToDecimal(dgvModalNo.CurrentRow.Cells[1].Value.ToString())); Clear(); Messages.DeletedMessage(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "MN6" + ex.Message; } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { CurrencyBll BllCurrency = new CurrencyBll(); if (BllCurrency.CurrencyCheckReferences(decId) == -1) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); Clear(); GridFill(); } } catch (Exception ex) { MessageBox.Show("C8:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Delete Function /// </summary> public void DeleteFunction() { try { SizeSP spSize = new SizeSP(); if (spSize.SizeDeleting(decSizeId) <= 0) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); GridFill(); Clear(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "SZ5" + ex.Message; } }
/// <summary> /// Delete function and reference exists checking /// </summary> public void DeleteFunction() { try { ServiceSP spService = new ServiceSP(); if (spService.ServiceDeleteReferenceCheck(decServiceId) == -1) { Messages.ReferenceExistsMessage(); } else { Clear(); btnSave.Text = "Save"; Messages.DeletedMessage(); } } catch (Exception ex) { MessageBox.Show("Ser8:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// checking references fro delete /// </summary> public void DeleteFunction() { try { UnitBll bllUnit = new UnitBll(); if (bllUnit.UnitDeleteCheck(decUnitid) <= 0) { Messages.ReferenceExistsMessage(); } else { Clear(); btnSave.Text = "Save"; Messages.DeletedMessage(); } } catch (Exception ex) { MessageBox.Show("U7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { ModelNoSP spModelNo = new ModelNoSP(); if (spModelNo.ModelNoCheckReferenceAndDelete(decModelNo) <= 0) { Messages.ReferenceExistsMessage(); } else { spModelNo.ModelNoDelete(Convert.ToDecimal(dgvModalNo.CurrentRow.Cells[1].Value.ToString())); Clear(); Messages.DeletedMessage(); } } catch (Exception ex) { MessageBox.Show("MN6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { BrandSP spBrand = new BrandSP(); if (spBrand.BrandDeleteCheckExistence(decBrandId) <= 0) { Messages.ReferenceExistsMessage(); } else { Clear(); btnSave.Text = "Save"; Messages.DeletedMessage(); } } catch (Exception ex) { MessageBox.Show("BR6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { CounterBll bllCounter = new CounterBll(); if (bllCounter.CounterCheckReferenceAndDelete(decCounterId) <= 0) { Messages.ReferenceExistsMessage(); } else { bllCounter.CounterDelete(Convert.ToDecimal(dgvCounter.CurrentRow.Cells[1].Value.ToString())); Messages.DeletedMessage(); Clear(); } } catch (Exception ex) { MessageBox.Show("CT6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Delete Function /// </summary> public void DeleteFunction() { try { SizeSP spSize = new SizeSP(); if (spSize.SizeDeleting(decSizeId) <= 0) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); GridFill(); Clear(); } } catch (Exception ex) { MessageBox.Show("SZ5" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { CurrencySP spCurrency = new CurrencySP(); if (spCurrency.CurrencyCheckReferences(decId) == -1) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); Clear(); GridFill(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "C8:" + ex.Message; } }
/// <summary> /// Function to delete a servicecategory /// </summary> public void DeleteFunction() { try { ServiceCategorySP spServiceCategory = new ServiceCategorySP(); if (spServiceCategory.ServiceCategoryCheckReferenceAndDelete(decCategoryName) == -1) { Messages.ReferenceExistsMessage(); } else { spServiceCategory.ServiceCategoryDelete(Convert.ToDecimal(dgvServiceCategory.CurrentRow.Cells[1].Value.ToString())); Messages.DeletedMessage(); Clear(); } } catch (Exception ex) { MessageBox.Show("SC6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { ExchangeRateSP spExchangeRate = new ExchangeRateSP(); if (spExchangeRate.ExchangeRateCheckReferences(decId) == -1) { Messages.ReferenceExistsMessage(); } else { Messages.DeletedMessage(); Clear(); GridFill(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "ER10:" + ex.Message; } }