Ejemplo n.º 1
0
        public ActionResult WaferSbin(DetailWaferQuery query, int pageIndex, int pageSize)
        {
            int           recordCount = 0;
            IList <Wafer> list        = service.GetWaferByLotid(query, pageIndex, pageSize, out recordCount);

            if (list != null && list.Count > 0)
            {
                foreach (Wafer item in list)
                {
                    if (item.StartTime != null)
                    {
                        if (item.StartTime.Year == 1900)
                        {
                            item.StrStartTime = "";
                        }
                        else
                        {
                            item.StrStartTime = item.StartTime.ToString("yyyy/MM/dd");
                        }
                    }

                    item.ListSbin = sbinService.GetWaferSbin(query.TransformID, item.ID);
                }
            }
            var json = JsonConvert.SerializeObject(new
            {
                currentPage = pageIndex,
                totalPages  = PagerUtility.GetPageCount(recordCount, pageSize),
                rows        = list,
            });

            base.Response.Write(json);
            return(null);
        }
Ejemplo n.º 2
0
        public ActionResult HistorySearch(int pageSize, int pageIndex)
        {
            HistoryQuery            query       = HistoryQueryUtility.GetHistoryQuery(base.Request);
            int                     recordCount = 0;
            IList <VwWafer_History> list        = historyService.HistoryList(query, pageSize, pageIndex, 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);
                    }
                }
            }
            var json = JsonConvert.SerializeObject(new
            {
                currentPage = pageIndex,
                totalPages  = PagerUtility.GetPageCount(recordCount, pageSize),
                rows        = list,
            });

            base.Response.Write(json);
            return(null);
        }
Ejemplo n.º 3
0
        public ActionResult CommentList(string lotID, int pageIndex = 0, int pageSize = 5)
        {
            int recordCount = 0;
            IList <TranformedComment> list = null;

            if (CurrentUserInfo.Role == UserRoles.Fab || CurrentUserInfo.Role == UserRoles.FabAdmin)
            {
                list = service.GetCommentsByLotID(lotID, "", true, pageIndex, pageSize, out recordCount);
            }
            else
            {
                list = service.GetCommentsByLotID(lotID, "", false, pageIndex, pageSize, out recordCount);
            }
            bool   flag = ConfigurationManager.AppSettings["LocalDownload"] == "1";
            string str  = ConfigurationManager.AppSettings["RemoteDownloadUrlPrefix"];

            for (int i = 0; i <= (list.Count - 1); i++)
            {
                for (int j = 0; j <= (list[i].Attachments.Count - 1); j++)
                {
                    if (!flag)
                    {
                        list[i].Attachments[j].StoreRelativePath = str + list[i].Attachments[j].StoreRelativePath;
                    }
                }
            }
            var data = new
            {
                currentPage = pageIndex,
                totalPages  = PagerUtility.GetPageCount(recordCount, pageSize),
                rows        = list
            };

            return(base.Json(data));
        }
Ejemplo n.º 4
0
        public ActionResult getSWBin(string lotID, string code, string defect, string qty, string failRate, string isPassed, string limited, string orderBy, bool desc = false, int pageIndex = 0, int pageSize = 5)
        {
            int           recordCount = 0;
            IList <SWBin> list        = LotService.GetSWBinsBy(lotID, code, defect, qty, failRate, isPassed, limited, orderBy, desc, pageIndex, pageSize, out recordCount);
            var           data        = new {
                currentPage = pageIndex,
                totalPages  = PagerUtility.GetPageCount(recordCount, pageSize),
                rows        = list
            };

            return(base.Json(data));
        }
Ejemplo n.º 5
0
        public ActionResult Search(int pageSize, int pageIndex = 0, string orderBy = "", bool desc = false)
        {
            //if (DateTime.Now <= Convert.ToDateTime("2017-12-31"))
            //{
            //    if (StringHelper.isNullOrEmpty(orderBy))
            //    {
            //        orderBy = "UpdateTime";
            //        desc = true;
            //    }
            //    int recordCount = 0;
            //    LotQuery queryFromRequest = QueryUtility.GetQueryFromRequest(base.Request, BaseController.CurrentUserInfo.UserID);
            //    if ((BaseController.CurrentUserInfo.Role == UserRoles.OSAT) || (BaseController.CurrentUserInfo.Role == UserRoles.OSATAdmin))
            //    {
            //        queryFromRequest.Osat = BaseController.CurrentUserInfo.BUName;
            //    }
            //    IList<LotView> list = LotService.GetLotViews(queryFromRequest, orderBy, desc, pageIndex, pageSize, out recordCount);
            //    string s = JsonConvert.SerializeObject(new { currentPage = pageIndex, totalPages = PagerUtility.GetPageCount(recordCount, pageSize), rows = list });
            //    base.Response.Write(s);
            //}
            //return null;
            if (StringHelper.isNullOrEmpty(orderBy))
            {
                orderBy = "UpdateTime";
                desc    = true;
            }
            int      recordCount      = 0;
            LotQuery queryFromRequest = QueryUtility.GetQueryFromRequest(base.Request, BaseController.CurrentUserInfo.UserID);

            if (BaseController.CurrentUserInfo.Role == UserRoles.OSAT || BaseController.CurrentUserInfo.Role == UserRoles.OSATAdmin)
            {
                queryFromRequest.Osat = BaseController.CurrentUserInfo.BUName;
            }
            IList <LotView> lotViews = LotService.GetLotViews(queryFromRequest, orderBy, desc, pageIndex, pageSize, out recordCount);

            foreach (LotView lv in lotViews)
            {
                lv.HoldReason = lv.HoldReason.Replace("failed sublot:", "");
            }
            string s = JsonConvert.SerializeObject(new
            {
                currentPage = pageIndex,
                totalPages  = PagerUtility.GetPageCount(recordCount, pageSize),
                rows        = lotViews
            });

            base.Response.Write(s);
            return(null);
        }
Ejemplo n.º 6
0
        public ActionResult Search(int pageSize, int pageIndex)
        {
            WaferQuery query = WaferQueryUtility.GetWaferQuery(base.Request);

            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;
            }
            int           recordCount = 0;
            IList <Wafer> list        = service.GetAllWaferBy(query, pageSize, pageIndex, 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);
                    Boolean            IsTriggered = false;
                    IList <Wafer_Sbin> ListSbin    = sbinService.GetWaferSbin(item.TransformID, item.ID);
                    foreach (Wafer_Sbin sbin in ListSbin)
                    {
                        if (sbin.IsTriggered)
                        {
                            IsTriggered = true;
                        }
                    }
                    item.IsTriggered = IsTriggered;
                }
            }
            var json = JsonConvert.SerializeObject(new
            {
                currentPage = pageIndex,
                totalPages  = PagerUtility.GetPageCount(recordCount, pageSize),
                rows        = list,
            });

            base.Response.Write(json);
            return(null);
        }
Ejemplo n.º 7
0
        public ActionResult Search(int pageSize, int pageIndex)
        {
            Lot_TransformedQuery query = TransformQueryUtility.GetLotTransformQuery(base.Request);

            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;
                //query.PeVendorState = (int)WaferStatus.WaitPEVendor;
            }
            int recordCount = 0;
            IList <Lot_Transformed> list = service.GetAllLots(query, pageSize, pageIndex, out recordCount);

            if (list != null && list.Count > 0)
            {
                DateTime dt = DateTime.Parse(DateTime.Now.ToLocalTime().ToShortDateString());
                foreach (Lot_Transformed lot in list)
                {
                    lot.StatusText = WaferHelper.waferStatusDes(lot.Status);
                    int          recordcount = 0;
                    IList <File> listFile    = FileSystemService.GetFilesBy(lot.ID, "", "", "", "", FileStates.NotSpecified, FileTypes.NotSpecifiled, "", false, 0xf423f, 0, out recordcount);
                    lot.FileCount     = recordcount;
                    lot.DiesposRemark = waferService.LoadCountByDispose(lot.ID, lot.Status);
                    lot.dayCount      = (dt - DateTime.Parse(lot.CompletionDate.ToShortDateString())).Days;
                }
            }
            var json = JsonConvert.SerializeObject(new
            {
                currentPage = pageIndex,
                totalPages  = PagerUtility.GetPageCount(recordCount, pageSize),
                rows        = list
            });

            base.Response.Write(json);
            return(null);
        }
Ejemplo n.º 8
0
        public ActionResult DisplayUsersByRole(int pageSize, int pageIndex, string hidCurrentRole, string selJobType)
        {
            int    recordCount  = 0;
            string email        = base.Request.QueryString["txtEmail"];
            string role         = base.Request.QueryString["cmbRoleText"];
            string accountState = base.Request.QueryString["cmbAccountState"];

            switch (accountState)
            {
            case "":
            case null:
                accountState = "Active";
                break;
            }
            IList <User> list = UserService.GetUsersBy(base.Request.QueryString["txtFullName"], email, role, selJobType, accountState, pageIndex, pageSize, out recordCount);
            string       s    = JsonConvert.SerializeObject(new { currentPage = pageIndex, totalPages = PagerUtility.GetPageCount(recordCount, pageSize), rows = list });

            base.Response.Write(s);
            return(null);
        }