public ActionResult ExportHistory() { string xlsName = string.Format("History_{0}", DateTime.Now.ToString("yyyyMMdd_hhmmss")); HistoryQuery query = HistoryQueryUtility.GetHistoryQuery(base.Request); int recordCount = 0; IList <VwWafer_History> list = historyService.HistoryList(query, 0xf423f, 0, out recordCount); if (list != null && list.Count > 0) { foreach (VwWafer_History history in list) { if (history.IsVendor) { history.DisposeText = "Confirmed"; } else { history.DisposeText = WaferHelper.WaferSelectionDes(history.Dispose); } } } string nextUrl = Exporthelper.GetExport <VwWafer_History>("Historys", list, "/Export/Excels/History/", "/Content/Exports/ExportHistory.xml", xlsName, 0, 0); ResponseTypes redirect = ResponseTypes.Redirect; TipTypes information = TipTypes.Information; base.Response.Write(new HandlerResponse("0", "导出Excel文件", redirect.ToString(), information.ToString(), nextUrl, "", "").GenerateJsonResponse()); return(null); }
public ActionResult ExportData(Lot_TransformedQuery query) { int recordCount = 0; string xlsName = string.Format("Transform_{0}", DateTime.Now.ToString("yyyyMMdd_hhmmss")); if (StringHelper.isNullOrEmpty(query.OrderBy)) { query.OrderBy = "CreateDate"; query.OrderDesc = true; } if (CurrentUserInfo.Role == UserRoles.Fab || CurrentUserInfo.Role == UserRoles.FabAdmin) { query.Osat = CurrentUserInfo.BUName; query.Status = (int)WaferStatus.WaitVendor; } IList <Lot_Transformed> list = service.GetAllLots(query, 0xf423f, 0, out recordCount); if (list != null && list.Count > 0) { foreach (Lot_Transformed lot in list) { lot.StatusText = WaferHelper.waferStatusDes(lot.Status); } } string nextUrl = Exporthelper.GetExport <Lot_Transformed>("LOTS", list, "/Export/Excels/Transform/", "/Content/Exports/ExportTransform.xml", xlsName, 0, 0); ResponseTypes redirect = ResponseTypes.Redirect; TipTypes information = TipTypes.Information; base.Response.Write(new HandlerResponse("0", "导出Excel文件", redirect.ToString(), information.ToString(), nextUrl, "", "").GenerateJsonResponse()); return(null); }
public ActionResult ExportLots(string orderBy, bool desc) { int recordCount = 0; string xlsName = string.Format("LOTS_{0}", DateTime.Now.ToString("yyyyMMdd_hhmmss")); if (StringHelper.isNullOrEmpty(orderBy)) { orderBy = "CreateTime"; desc = true; } IList <LotView> tList = LotService.GetLotViews(QueryUtility.GetQueryFromRequest(base.Request, BaseController.CurrentUserInfo.UserID), orderBy, desc, 0, 0xf423f, out recordCount); string nextUrl = Exporthelper.GetExport <LotView>("LOTS", tList, "/Export/Excels/Lots/", "/Content/Exports/ExportLots.xml", xlsName, 0, 0); ResponseTypes redirect = ResponseTypes.Redirect; TipTypes information = TipTypes.Information; base.Response.Write(new HandlerResponse("0", "导出Excel文件", redirect.ToString(), information.ToString(), nextUrl, "", "").GenerateJsonResponse()); return(null); }
public ActionResult ExportSwbin(string lotID, string code, string defect, string qty, string failRate, string isPassed, string limited, string orderBy, bool desc = false) { int recordCount = 0; LotView lotViewByLotID = LotService.GetLotViewByLotID(lotID); if (StringHelper.isNullOrEmpty(orderBy)) { orderBy = "Code"; } desc = false; string xlsName = "LOT_" + lotViewByLotID.LotNO + "_SWBin"; IList <SWBin> tList = LotService.GetSWBinsBy(lotID, code, defect, qty, failRate, isPassed, limited, orderBy, desc, 0, 0x1869f, out recordCount); string nextUrl = Exporthelper.GetExport <SWBin>("SW Bin", tList, "/Export/Excels/Swbins/", "/Content/Exports/ExportSwbins.xml", xlsName, 0, 0); ResponseTypes redirect = ResponseTypes.Redirect; TipTypes information = TipTypes.Information; base.Response.Write(new HandlerResponse("0", "导出Excel文件", redirect.ToString(), information.ToString(), nextUrl, "", "").GenerateJsonResponse()); return(null); }
public ActionResult ExportData() { WaferQuery query = WaferQueryUtility.GetWaferQuery(base.Request); int recordCount = 0; string xlsName = string.Format("Wafer_{0}", DateTime.Now.ToString("yyyyMMdd_hhmmss")); if (StringHelper.isNullOrEmpty(query.OrderBy)) { query.OrderBy = "CreateDate"; query.OrderDesc = true; } if (CurrentUserInfo.Role == UserRoles.Fab || CurrentUserInfo.Role == UserRoles.FabAdmin) { query.Osat = CurrentUserInfo.BUName; query.Status = (int)WaferStatus.WaitVendor; } IList <Wafer> list = service.GetAllWaferBy(query, 0xf423f, 0, out recordCount); if (list != null && list.Count > 0) { foreach (Wafer item in list) { item.StatusText = WaferHelper.waferStatusDes(item.Status); item.PEDisposeText = WaferHelper.WaferSelectionDes(item.PEDispose); item.QADisposeText = WaferHelper.WaferSelectionDes(item.QADispose); item.SPRDDecisionText = WaferHelper.WaferSelectionDes(item.SPRDDecision); } } string path = "/Export/Excels/Wafer/"; string mp = Server.MapPath("~") + path; if (!Directory.Exists(mp)) { Directory.CreateDirectory(mp); } string nextUrl = Exporthelper.GetExport <Wafer>("LOTS", list, "/Export/Excels/Wafer/", "/Content/Exports/ExportWafer.xml", xlsName, 0, 0); ResponseTypes redirect = ResponseTypes.Redirect; TipTypes information = TipTypes.Information; base.Response.Write(new HandlerResponse("0", "导出Excel文件", redirect.ToString(), information.ToString(), nextUrl, "", "").GenerateJsonResponse()); return(null); }
public ActionResult ExportWafer(DetailWaferQuery query) { DataTable dt = new DataTable(); dt.Columns.Add("Wafer_Code"); dt.Columns.Add("Wafer_id"); dt.Columns.Add("Program"); dt.Columns.Add("Start Time"); dt.Columns.Add("Total die count"); dt.Columns.Add("Yield(%)"); IList <Wafer_Sbin> list = sbinService.GetSbinTextByLotId(query.TransformID); if (list != null && list.Count > 0) { foreach (Wafer_Sbin item in list) { dt.Columns.Add(item.SbinText); } } int recordCount = 0; IList <Wafer_Sbin> listValue = null; IList <Wafer> waferlist = service.GetWaferByLotid(query, 0, 0xf423f, out recordCount); if (waferlist != null && waferlist.Count > 0) { var index = 0; var columnindex = 0; foreach (Wafer item in waferlist) { dt.Rows.Add(dt.NewRow()); dt.Rows[index][0] = item.WaferCode; dt.Rows[index][1] = item.WaferID; dt.Rows[index][2] = item.Program; if (item.StartTime != null) { if (item.StartTime.Year == 1900) { dt.Rows[index][3] = ""; } else { dt.Rows[index][3] = item.StartTime.ToString("yyyy/MM/dd"); } } // dt.Rows[index][3] = item.StartTime; dt.Rows[index][4] = item.TotalDieCount; dt.Rows[index][5] = item.Yield + "%"; listValue = sbinService.GetWaferSbin(query.TransformID, item.ID); if (listValue != null && listValue.Count > 0) { columnindex = 6; foreach (Wafer_Sbin sbin in listValue) { dt.Rows[index][columnindex] = sbin.SbinValue; columnindex++; } } index++; } } if (dt.Rows.Count > 0) { string xlsName = string.Format("Wafer_{0}", DateTime.Now.ToString("yyyyMMdd_hhmmss")); Exporthelper.ExportToExecel(System.Web.HttpContext.Current.Response, dt, xlsName + ".xls"); } return(null); }