Exemplo n.º 1
0
 private void Index_Load(object sender, EventArgs e)
 {
     setControl           = new Set();
     setControl.SetEvent += SetControl_SetEvent;
     homeControl          = new ViewReport();
     view = new Controls.View();
     navigate1.NavigateEvent += Navigate1_NavigateEvent;
     navigateTabContent.Controls.Add(homeControl);
     importExcel = new Controls.ImportExcel();
     sheet       = homeControl.sheet;
     workBook    = homeControl.workBook;
     //this.Closed += Index_Closed;
     //sheet.DeleteRows(0, 2);//删除模板第一行
 }
Exemplo n.º 2
0
        private void Navigate1_NavigateEvent(object sender, MessageEventArgs e)
        {
            navigateTabContent.Controls.Clear();
            currentOperation = e.Message;
            switch (e.Message)
            {
            case "Home":
                homeControl = new ViewReport();
                navigateTabContent.Controls.Add(homeControl);
                sheet    = homeControl.sheet;
                workBook = homeControl.workBook;
                break;

            case "Import":
                importExcel = new Controls.ImportExcel();
                navigateTabContent.Controls.Add(importExcel);
                sheet = null;
                break;

            case "View":
                view = new Controls.View();
                navigateTabContent.Controls.Add(view);
                sheet    = view.sheet;
                workBook = view.workBook;
                break;

            case "Set":
                setControl = new Set();
                navigateTabContent.Controls.Add(setControl);
                sheet = null;
                break;

            case "ModifyPassword":
                break;
            }
        }