private void uToolBar_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e) { sapClass = new SapClass(this.ob); lstHint1.Items.Clear(); lstHint2.Items.Clear(); switch (e.Tool.Key.ToString()) { //case "Cancel": // { // doUpdate(1); // showGridInfo(); // break; // } case "Find": { if (!getStrWhere()) break; showGridInfo(); break; } case "Edit": { doUpdate(); showGridInfo(); break; } case "UpSap": { upLoadData(); break; } case "ToExcel": { Constant.ExportGrid2Excel(this, this.ultraGridExcelExporter1, uGridData); if(Constant.WaitingForm!=null) Constant.WaitingForm.Close(); break; } case "InExcel": { ArrayList lstTmp = new ArrayList(); // lstTmp = sapClass.ExcelToDatabase(2, "棒线厂四作"); lstTmp = sapClass.ExcelToDatabase(2, CoreFS.SA06.CoreUserInfo.UserInfo.GetDepartment()); foreach (string strTmpValue in lstTmp) { lstHint2.Items.Add(strTmpValue); } showGridInfo(); break; } } }
private void uToolBar_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e) { sapClass = new SapClass(this.ob); lstHint1.Items.Clear(); lstHint2.Items.Clear(); switch (e.Tool.Key.ToString()) { //case "Cancel": // { // doUpdate(1); // showGridInfo(); // break; // } case "Find": { if (!getStrWhere()) { break; } showGridInfo(); break; } case "Edit": { doUpdate(); showGridInfo(); break; } case "UpSap": { upLoadData(); break; } case "ToExcel": { Constant.ExportGrid2Excel(this, this.ultraGridExcelExporter1, uGridData); if (Constant.WaitingForm != null) { Constant.WaitingForm.Close(); } break; } case "InExcel": { ArrayList lstTmp = new ArrayList(); // lstTmp = sapClass.ExcelToDatabase(2, "棒线厂四作"); lstTmp = sapClass.ExcelToDatabase(2, CoreFS.SA06.CoreUserInfo.UserInfo.GetDepartment()); foreach (string strTmpValue in lstTmp) { lstHint2.Items.Add(strTmpValue); } showGridInfo(); break; } } }