private void Showshippinginvoice(string invoice) { string invoiceopen = connectapi.InvoiceOpen(invoice, CheckInModules.ShipInv); if (invoiceopen.Length > 0) { MetroFramework.MetroMessageBox.Show(this, "Inovice is opened for edit by " + invoiceopen + ". ", "SPM Connect - Open Invoice Failed", MessageBoxButtons.OK, MessageBoxIcon.Stop); } else { if (connectapi.CheckinInvoice(invoice, CheckInModules.ShipInv)) { using (InvoiceDetails invoiceDetails = new InvoiceDetails(invoice)) { invoiceDetails.ShowDialog(); this.Enabled = true; Performreload(); this.Show(); this.Activate(); this.Focus(); } } } }