private void button_Click(object sender, EventArgs e) { Button btn = ( Button )sender; switch (btn.Name) { case "buttonVol": if (formMenuCostVol == null || formMenuCostVol.IsDisposed) { formMenuCostVol = new FormMenuCostVol(hp); formMenuCostVol.Show(); } else { MessageBox.Show(MsgAlready); } break; case "buttonPlan": if (formMenuEstPlan == null || formMenuEstPlan.IsDisposed) { formMenuEstPlan = new FormMenuEstPlan(hp); formMenuEstPlan.Show(); } else { MessageBox.Show(MsgAlready); } break; case "buttonInfo": if (formMenuInfo == null || formMenuInfo.IsDisposed) { formMenuInfo = new FormMenuInfo(hp); formMenuInfo.Show(); } else { MessageBox.Show(MsgAlready); } break; default: break; } }
private void button_Click(object sender, EventArgs e) { Button btn = (Button)sender; switch (btn.Name) { case "buttonVol": if (formMenuCostVol == null || formMenuCostVol.IsDisposed) { formMenuCostVol = new FormMenuCostVol(hp); formMenuCostVol.Show(); } else { MessageBox.Show(MsgAlready); } break; case "buttonPlan": if (formMenuEstPlan == null || formMenuEstPlan.IsDisposed) { formMenuEstPlan = new FormMenuEstPlan(hp); formMenuEstPlan.Show(); } else { MessageBox.Show(MsgAlready); } break; case "buttonOs": if (formMenuOutsource == null || formMenuOutsource.IsDisposed) { formMenuOutsource = new FormMenuOutsource(hp); formMenuOutsource.Show(); } else { MessageBox.Show(MsgAlready); } break; case "buttonInfo": if (formMenuInfo == null || formMenuInfo.IsDisposed) { formMenuInfo = new FormMenuInfo(hp); formMenuInfo.Show(); } else { MessageBox.Show(MsgAlready); } break; //case "buttonCostInfo": // //内訳書入力状況 // if (formCostInformation == null || formCostInformation.IsDisposed) // { // formCostInformation = new FormCostInformation(hp); // formCostInformation.Show(); // } // else // { // MessageBox.Show("すでにこのプログラムは開始されています。"); // } // break; //case "buttonImportOsWkReports": // if (formImpOsWkReport == null || formImpOsWkReport.IsDisposed) // { // formImpOsWkReport = new FormImpOsWkReports(); // formImpOsWkReport.Show(); // } // else // { // MessageBox.Show("すでにこのプログラムは開始されています。"); // } // break; //case "buttonOsWkReportSetup": // if (formOsWkReportSetup == null || formOsWkReportSetup.IsDisposed) // { // formOsWkReportSetup = new FormOsWkReportSetup(hp); // formOsWkReportSetup.Show(); // } // else // { // MessageBox.Show("すでにこのプログラムは開始されています。"); // } // break; //case "buttonPayOff": // //外注精算書 // if (formOsPayOff == null || formOsPayOff.IsDisposed) // { // formOsPayOff = new FormOsPayOff(hp); // formOsPayOff.Show(); // } // else // { // MessageBox.Show("すでにこのプログラムは開始されています。"); // } // break; //case "buttonPayOffSurvey": // //外注精算書 // if (formOsPayOffSurvey == null || formOsPayOffSurvey.IsDisposed) // { // formOsPayOffSurvey = new FormOsPayOffSurvey(hp); // formOsPayOffSurvey.Show(); // } // else // { // MessageBox.Show("すでにこのプログラムは開始されています。"); // } // break; //case "buttonPayment": // //外注出来高調書一覧表 // if (formOsPayment == null || formOsPayment.IsDisposed) // { // formOsPayment = new FormOsPayment(hp); // formOsPayment.Show(); // } // else // { // MessageBox.Show("すでにこのプログラムは開始されています。"); // } // break; default: break; } }
private void button_Click(object sender, EventArgs e) { Button btn = (Button)sender; // Login->当Menu の順に処理される時 switch (btn.Name) { case "buttonWeb": System.Diagnostics.Process.Start("http://server-ma/CostVolumeOptW/Form/Login"); break; case "buttonPlan": if (formMenuEstPlan == null || formMenuEstPlan.IsDisposed) { formMenuEstPlan = new FormMenuEstPlan(hp); formMenuEstPlan.Show(); } else { MessageBox.Show(MsgAlready); } break; case "buttonVol": if (formMenuCostVol == null || formMenuCostVol.IsDisposed) { formMenuCostVol = new FormMenuCostVol(hp); formMenuCostVol.Show(); } else { MessageBox.Show(MsgAlready); } break; case "buttonOs": if (formMenuOutsource == null || formMenuOutsource.IsDisposed) { formMenuOutsource = new FormMenuOutsource(hp); formMenuOutsource.Show(); } else { MessageBox.Show(MsgAlready); } break; case "buttonInfo": if (formMenuInfo == null || formMenuInfo.IsDisposed) { formMenuInfo = new FormMenuInfo(hp); formMenuInfo.Show(); } else { MessageBox.Show(MsgAlready); } break; case "buttonSyo": if (formMenuSYO == null || formMenuSYO.IsDisposed) { formMenuSYO = new FormMenuSYO(hp); formMenuSYO.Show(); } else { MessageBox.Show(MsgAlready); } break; default: if (formMenuDataMnt == null || formMenuDataMnt.IsDisposed) { formMenuDataMnt = new FormMenuDataMnt(hp); formMenuDataMnt.Show(); } else { MessageBox.Show(MsgAlready); } break; } }