/// <summary> /// Tabs the changed message handler. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void TabChangedMessageHandler(object sender, EventArgs e) { if (((Form)sender).DialogResult == DialogResult.Yes) { this.Save(); if (this.ReceivingHeaderId != System.Guid.Empty) { MessageBox.Show("Success!", "Save Result"); this.Close(); SettleOrder settleOrder = new SettleOrder(); settleOrder.ShowDialog(); } } else { ////tabGoodsADJ.SelectedIndex = 0; } }
/// <summary> /// Saves the new message handler. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void SaveNewMessageHandler(object sender, EventArgs e) { if (((Form)sender).DialogResult == DialogResult.Yes) { if (!this.Text.Contains("ReadOnly")) { this.Save(); if (this.ReceivingHeaderId != System.Guid.Empty) { Helper.DesktopHelper.RefreshMainList <DefaultOSTList>(); this.Close(); SettleOrder settleOrder = new SettleOrder(); settleOrder.ShowDialog(); } } else { MessageBox.Show("This transaction is ReadOnly. The changes you've made cannot be saved!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }