Example #1
0
        private void uToolBar_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            lstHint1.Items.Clear();
            lstHint2.Items.Clear();
            switch (e.Tool.Key.ToString())
            {
            case "Cancel":
            {
                doUpdate(1);
                showGridInfo();
                break;
            }

            case "find":
            {
                if (!getStrWhere())
                {
                    break;
                }
                sapClass.chkCardNo("DT_GX_STORAGEWEIGHTMAIN");
                showGridInfo();
                break;
            }

            case "Edit":
            {
                doUpdate(0);
                showGridInfo();
                break;
            }

            case "UpSap":
            {
                upLoadData();
                break;
            }

            case "ToExcel":
            {
                Constant.ExportGrid2Excel(this, this.ultraGridExcelExporter1, uGridData);
                if (Constant.WaitingForm != null)
                {
                    Constant.WaitingForm.Close();
                }
                break;
            }

            case "inExcel":
            {
                openExcel();
                break;
            }
            }
        }