private void cmbsaletype_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { if (cmbsaletype.Text != "") { txtitemname.Focus(); } else { MessageBox.Show("Please Select Sale type"); cmbsaletype.Focus(); } } if (e.KeyCode == Keys.F3) { PurchaseTypeEntry pt = new PurchaseTypeEntry(this); pt.Show(); } if (e.KeyCode == Keys.F2) { PurchaseTypeEntry pt = new PurchaseTypeEntry(this); pt.updatemode("Purchase", cmbsaletype.Text, 1); pt.Show(); } }
private void btnnew_Click(object sender, EventArgs e) { PurchaseTypeEntry frm = new PurchaseTypeEntry(master, tabControl); master.AddNewTab(frm); // frm.MdiParent = this; //frm.StartPosition = FormStartPosition.WindowsDefaultLocation; //frm.Show(); }
public void open() { try { this.Enabled = false; String str = LVDayBook.Items[LVDayBook.FocusedItem.Index].SubItems[1].Text; PurchaseTypeEntry bd = new PurchaseTypeEntry(this, master, tabControl); bd.updatemode(str, LVDayBook.Items[LVDayBook.FocusedItem.Index].SubItems[0].Text, LVDayBook.Items[LVDayBook.FocusedItem.Index].SubItems[4].Text); // bd.Show(); master.AddNewTab(bd); } finally { this.Enabled = true; } }