protected override int GetRowCount()
        {
            if (facade == null)
            {
                facade = new WarehouseFacade(base.DataProvider);
            }



            object[] objs = this.facade.QueryOnshelvesDetail(
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtCartonNoEdit.Text)),
                FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtLocationNO.Text))
                );

            List <string> stnos = new List <string>();

            if (objs != null && objs.Length > 0)
            {
                foreach (Asndetailexp o in objs)
                {
                    if (!stnos.Contains(o.Stno))
                    {
                        stnos.Add(o.Stno);
                    }
                }
            }

            BenQGuru.eMES.Domain.IQC.AsnIQC[] iqcs = facade.GetASNIQCFromASN(stnos);
            List <string> IQCNos = new List <string>();

            foreach (BenQGuru.eMES.Domain.IQC.AsnIQC iqc in iqcs)
            {
                if (iqc.IqcType == "SpotCheck")
                {
                    IQCNos.Add(iqc.IqcNo);
                }
            }
            BenQGuru.eMES.Domain.IQC.AsnIQCDetailEc[] ECs = facade.GetIQCECFromIQCNo(IQCNos);
            List <object> passObjs = new List <object>();

            if (objs != null && objs.Length > 0)
            {
                foreach (Asndetailexp o in objs)
                {
                    bool isOk = true;
                    foreach (BenQGuru.eMES.Domain.IQC.AsnIQCDetailEc ec in ECs)
                    {
                        if (ec.StNo == o.Stno)
                        {
                            isOk = false;
                        }
                    }
                    if (isOk)
                    {
                        passObjs.Add(o);
                    }
                }
            }
            return(passObjs.Count);
        }