public void open() { try { this.Enabled = false; iid = LVbill.Items[LVbill.FocusedItem.Index].SubItems[1].Text; DataTable dt1 = sql.getdataset("select * from FormFormat where isactive=1 and type='POS' and setdefault=1"); POSNEW bd = new POSNEW(); DefaultPOS dlg = new DefaultPOS(master, tabControl); if (dt1.Rows[0]["formname"].ToString() == dlg.Text) { dlg.Update(1, iid); master.AddNewTab(dlg); dlg.Show(); } else { bd.Update(1, iid); bd.Size = new Size(this.Height, this.Width); bd.StartPosition = FormStartPosition.CenterScreen; bd.ShowDialog(); } } finally { this.Enabled = true; } }
public void open() { try { this.Enabled = false; iid = LVpos.Items[LVpos.FocusedItem.Index].SubItems[1].Text; DefaultPOS dlg = new DefaultPOS(master, tabControl); dlg.Update(1, iid); master.AddNewTab(dlg); dlg.Show(); } finally { this.Enabled = true; } }