private void GetSearchData(int pageidx) { SlmScr048Biz bz = new SlmScr048Biz(); //var lst = bz.GetDataForScreen(tdmIncFrom.DateValue, tdmIncTo.DateValue, tdmCovFrom.DateValue, tdmCovTo.DateValue, tdmLeadFrom.DateValue, tdmLeadTo.DateValue, cmbTelesale.SelectedValue, cmbTelesaleName.SelectedValue, cmbType.SelectedValue);// tdmIncFrom.DateValue, tdmIncTo.DateValue, tdmFrom.DateValue, tdmTo.DateValue, cmbTeamTelesale.SelectedValue, cmbTelsameName.SelectedValue, cmbStaffCategory.SelectedValue, cmbIncentiveFlat.SelectedValue); var lst = bz.GetDataForScreen2(tdmIncFrom.DateValue, tdmIncTo.DateValue, cmbTelesale.SelectedValue, cmbTelesaleName.SelectedValue, cmbType.SelectedValue); BindData(pgTop, pgBot, lst.ToArray(), pageidx); }
protected void btnExcel_Click(object sender, EventArgs e) { try { SlmScr048Biz bz = new SlmScr048Biz(); var filename = Path.GetTempPath() + "\\tmpexcel_048_" + Page.User.Identity.Name + ".xls";// Path.GetTempFileName(); if (bz.CreateExcel2(filename, tdmIncFrom.DateValue, tdmIncTo.DateValue, tdmCovFrom.DateValue, tdmCovTo.DateValue, tdmLeadFrom.DateValue, tdmLeadTo.DateValue, cmbTelesale.SelectedValue, cmbTelesaleName.SelectedValue, cmbType.SelectedValue)) { ExportExcel(filename, "ผลงานประจำวันที่_" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".xls"); } else { AppUtil.ClientAlert(this, bz.ErrorMessage); } } catch (Exception ex) { string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message; _log.Error(message); AppUtil.ClientAlert(Page, message); } }