/// <summary> /// Function for Delete /// </summary> public void Delete() { try { ReminderSP spReminder = new ReminderSP(); if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage() == true) { isDeleteStatus = spReminder.RemainderDelete(decReminderId); if (isDeleteStatus) { Messages.DeletedMessage(); Clear(); } } } else { isDeleteStatus = spReminder.RemainderDelete(decReminderId); if (isDeleteStatus) { Messages.DeletedMessage(); Clear(); } } } catch (Exception ex) { formMDI.infoError.ErrorString = "PREM4:" + ex.Message; } }
/// <summary> /// On 'Delete' button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPayheadDelete_Click(object sender, EventArgs e) { try { if (CheckUserPrivilege.PrivilegeCheck(decUserId, strFormName, btnPayheadDelete.Text)) { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage()) { DeleteFunction(); } } else { DeleteFunction(); } } else { Messages.NoPrivillageMessage(); } } catch (Exception ex) { MessageBox.Show("PH11:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function for Delete /// </summary> public void Delete() { try { ReminderSP spReminder = new ReminderSP(); if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage() == true) { isDeleteStatus = spReminder.RemainderDelete(decReminderId); if (isDeleteStatus) { Messages.DeletedMessage(); Clear(); } } } else { isDeleteStatus = spReminder.RemainderDelete(decReminderId); if (isDeleteStatus) { Messages.DeletedMessage(); Clear(); } } } catch (Exception ex) { MessageBox.Show("PREM4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to call delete /// </summary> public void Delete() { try { decimal decRowCount = 0; decRowCount = dgvMonthySalarySettings.Rows.Count; if (decRowCount >= 1) { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage() == true) { DeleteFunction(); } } else { DeleteFunction(); } } else { MessageBox.Show("Can't Delete Monthly salary settings without atleast one employee with complete details", "Openmiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { formMDI.infoError.ErrorString = "MSS6:" + ex.Message; } }
/// <summary> /// On 'Delete' button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnPayheadDelete_Click(object sender, EventArgs e) { try { if (CheckUserPrivilege.PrivilegeCheck(decUserId, strFormName, btnPayheadDelete.Text)) { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage()) { DeleteFunction(); } } else { DeleteFunction(); } } else { Messages.NoPrivillageMessage(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "PH11:" + ex.Message; } }
/// <summary> /// Function for Delete /// </summary> public void Delete() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage()) { spSalaryPackage.SalaryPackageDeleteAll(decSalaryPackageId); Messages.DeletedMessage(); Clear(); this.Close(); if (frmSalaryPackageRegisterObj != null) { frmSalaryPackageRegisterObj.Show(); } } } else { spSalaryPackage.SalaryPackageDelete(decSalaryPackageId); this.Close(); if (frmSalaryPackageRegisterObj != null) { frmSalaryPackageRegisterObj.Show(); } } } catch (Exception ex) { formMDI.infoError.ErrorString = "SPC4:" + 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> /// 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> /// 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> /// 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> /// 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(); 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(); 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> /// 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> /// Function to call delete function after user confirmation /// </summary> public void Delete() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage()) { DeleteFunction(); } } else { DeleteFunction(); } } catch (Exception ex) { MessageBox.Show("SC7" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Delete Function /// </summary> public void Delete() { try { if (PublicVariables.isMessageDelete) { if (Messages.DeleteMessage()) { DeleteFunction(); } } else { DeleteFunction(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "PB:14" + ex.Message; } }