private void Import() { try { string region = this.tbRegion.Text.Trim() != string.Empty ? this.tbRegion.Text.Trim() : string.Empty; string flowCode = this.tbFlow.Text.Trim() != string.Empty ? this.tbFlow.Text.Trim() : string.Empty; DateTime date = DateTime.Parse(this.tbDate.Text); string shiftCode = this.ucShift.ShiftCode; decimal leadTime = decimal.Parse(this.tbLeadTime.Text.Trim()); IList <ShiftPlanSchedule> spsList = TheImportMgr.ReadPSModelFromXls(fileUpload.PostedFile.InputStream, this.CurrentUser, region, flowCode, date, shiftCode); TheShiftPlanScheduleMgr.SaveShiftPlanSchedule(spsList, this.CurrentUser); IList <OrderHead> ohList = TheOrderMgr.ConvertShiftPlanScheduleToOrders(spsList, leadTime); if (ImportEvent != null) { ImportEvent(new object[] { ohList }, null); } ShowSuccessMessage("Import.Result.Successfully"); } catch (BusinessErrorException ex) { ShowErrorMessage(ex); } }