private void btnreceiving_Click(object sender, EventArgs e) { String useraccess = get_useraccess(); String userlogin = Properties.Settings.Default.username; if (useraccess.Contains("receiving")) { Boolean status = false; status = Is_integration_supplierapps(); if (status) { Supplier_Integration frm = new Supplier_Integration(); frm.ShowDialog(); return; } else { InputReceiving frm = new InputReceiving(); frm.load_supplier_all(); frm.ShowDialog(); } } else { MessageBox.Show("No access for receiving module"); return; } }
private void txtscansupplier_KeyPress(object sender, KeyPressEventArgs e) { if (Convert.ToInt32(e.KeyChar) == 13) { string[] datasupplier = txtscansupplier.Text.Split(';'); //InputReceiving frm = new InputReceiving(); String global_suppcode = datasupplier[0].ToString(); List <object[]> data = new List <object[]>(); MainMenu frm = new MainMenu(); data = frm.get_data_table_string("tbsupplier", "registration_code", global_suppcode); if (data.Count > 0) { String suppliercode = data[0][2].ToString(); //this.Hide(); var frmInputReceiving = new InputReceiving(); frmInputReceiving.Closed += (s, args) => this.Close(); frmInputReceiving.set_supplier_integration(global_suppcode, sender, e); frmInputReceiving.ShowDialog(); } else { MessageBox.Show("Data Supplier for global registration " + global_suppcode + " is not available"); txtscansupplier.Clear(); txtscansupplier.Focus(); } } }