private void A1Btn_Click(object sender, EventArgs e) { Boolean b = checkUser(Parameter.userName, Parameter.userRole, "清洁分切工序生产指令"); if (b) { Instru form4 = new Instru(base.mainform); form4.ShowDialog(); } else { MessageBox.Show("您无权查看该页面!"); return; } }
//双击弹出界面 private void dgv_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && e.ColumnIndex >= 0) { try { int selectIndex = this.dgv.CurrentRow.Index; int ID = Convert.ToInt32(this.dgv.Rows[selectIndex].Cells["ID"].Value); bool b; switch (processName) { case "吹膜": b = mySystem.ExtructionMainForm.checkUser(Parameter.userName, Parameter.userRole, "生产指令信息表"); if (b) { BatchProductRecord.ProcessProductInstru form1 = new BatchProductRecord.ProcessProductInstru(base.mainform, ID); form1.Owner = this; form1.ShowDialog(); } else { MessageBox.Show("您无权查看该页面!"); return; } break; case "清洁分切": mySystem.Process.CleanCut.Instru form2 = new Process.CleanCut.Instru(mainform, ID); form2.ShowDialog(); break; case "CS制袋": mySystem.Process.Bag.CS.CS制袋生产指令 form3 = new Process.Bag.CS.CS制袋生产指令(mainform, ID); form3.ShowDialog(); break; case "PE制袋": mySystem.Process.Bag.LDPE.LDPEBag_productioninstruction form4 = new Process.Bag.LDPE.LDPEBag_productioninstruction(mainform, ID); form4.ShowDialog(); break; case "BPV制袋": mySystem.Process.Bag.BTV.BPV制袋生产指令 form5 = new Process.Bag.BTV.BPV制袋生产指令(mainform, ID); form5.ShowDialog(); break; case "PTV制袋": mySystem.Process.Bag.PTV.PTVBag_productioninstruction form6 = new Process.Bag.PTV.PTVBag_productioninstruction(mainform, ID); form6.ShowDialog(); break; } } catch (Exception ee) { MessageBox.Show(ee.Message + "\n" + ee.StackTrace); } } }