public Object Get(string ActionType, string CardNo, string ProductClass, string ProductModel,
                   string BatchNo, string Customer)
 {
     using (SqlConnection con = new SqlConnection(conString))
     {
         string         strWhere = "";
         CardInfo       item     = new CardInfo();
         BllProductCard Bll      = new BllProductCard(con);
         if (ActionType == "First")
         {
             if (CardNo.StartsWith("BH"))
             {
                 strWhere = " where chrOrderId='" + CardNo + "' ";
             }
             else if (CardNo.StartsWith("ZD"))
             {
                 strWhere = " where chrID='" + CardNo + "' ";
             }
             else if (CardNo.StartsWith("LB"))
             {
                 strWhere = " where chrId='" + CardNo + "' ";
             }
         }
         //else if(ActionType=="FeedBackToControl")
         //{
         //    if (CardNo.StartsWith("BH"))
         //    {
         //        strWhere = " where chrOrderId='" + CardNo + "' "
         //            + "' and chritemid like '%" + ProductModel
         //                + "' and chrLot='" + BatchNo + "'";
         //    }
         //    else if (CardNo.StartsWith("ZD"))
         //    {
         //        strWhere = " where chrID='" + CardNo + "' "
         //            + "' and chrGHXH1 like '%" + ProductModel
         //                + "' and chrLOT='" + BatchNo + "' ";
         //    }
         //    else if (CardNo.StartsWith("LB"))
         //    {
         //        strWhere = " where chrId='" + CardNo + "' "
         //            + "' and chrItemId='" + ProductModel
         //            + "' and  chrLot='" + BatchNo + "'";
         //    }
         //}
         else
         {
             if (CardNo.StartsWith("BH"))
             {
                 strWhere = " where chrOrderId='" + CardNo + "' and chrkind='"
                            + ProductClass + "' and chritemid like '%" + ProductModel
                            + "' and chrLot='" + BatchNo + "'";
             }
             else if (CardNo.StartsWith("ZD"))
             {
                 strWhere = " where chrID='" + CardNo + "' and chrGHXH1 like '%" + ProductModel
                            + "' and left(chrGHXH1,2)='" + ProductClass
                            + "' and chrKHName='" + Customer + "' and chrLOT='" + BatchNo + "' ";
             }
             else if (CardNo.StartsWith("LB"))
             {
                 strWhere = " where chrId='" + CardNo + "' and chrItemId='" + ProductModel
                            + "' and chrQualityType='" + ProductClass + "' and chrLot='" + BatchNo + "'";
             }
         }
         if (CardNo.StartsWith("BH"))
         {
             ProductCard.BraidStockCard BraidStockCard = Bll.GetBraidStockCard(strWhere);
             if (BraidStockCard != null)
             {
                 item.cardNo       = CardNo;
                 item.tempAmount   = BraidStockCard.decBraidQuanty;
                 item.batchNo      = BraidStockCard.chrLot;
                 item.cardNo       = BraidStockCard.chrOrderId;
                 item.tempmodel    = BraidStockCard.chrItem;
                 item.productModel = (BraidStockCard.chritemid).Substring(2, (BraidStockCard.chritemid).Length - 2);
                 item.tempClass    = BraidStockCard.chrType;
                 item.batchNo      = BraidStockCard.chrLot;
                 item.productClass = BraidStockCard.chrkind;
             }
         }
         else if (CardNo.StartsWith("ZD"))
         {
             ProductCard.InvoiceCard InvoiceCard = Bll.InvoiceCard(strWhere);
             if (InvoiceCard != null)
             {
                 item.cardNo       = CardNo;
                 item.orderNo      = InvoiceCard.chrOrderID;
                 item.customer     = InvoiceCard.chrKHName;
                 item.tempClass    = InvoiceCard.chrKHType;
                 item.tempmodel    = InvoiceCard.chrKHXH;
                 item.productModel = (InvoiceCard.chrGHXH1).Substring(4, (InvoiceCard.chrGHXH1).Length - 4);
                 item.tempAmount   = InvoiceCard.intBH;
                 item.batchNo      = InvoiceCard.chrLOT;
                 item.productClass = InvoiceCard.chrGHXH1.Substring(0, 2);
             }
         }
         else if (CardNo.StartsWith("LB"))
         {
             ProductCard.PacketBraidCard PacketBraidCard = Bll.PacketBraidCard(strWhere);
             if (PacketBraidCard != null)
             {
                 item.cardNo       = CardNo;
                 item.tempAmount   = PacketBraidCard.decBraidQuantity;
                 item.amount       = PacketBraidCard.decQuantity;
                 item.cardNo       = PacketBraidCard.chrId;
                 item.tempmodel    = PacketBraidCard.chrPlanItemid;
                 item.productModel = PacketBraidCard.chrItemId;
                 item.tempClass    = PacketBraidCard.chrPlanQualityType;
                 item.productClass = PacketBraidCard.chrQualityType;
                 item.batchNo      = PacketBraidCard.chrLot;
             }
         }
         return(item);
     }
 }