public static Asset GetHistory(string num, string date)
 {
     try
     {
         num = ParseBarCode(num);
         var connected = Extensions.CheckForInternetConnection();
         if (!connected)
         {
             var a     = from ass in Global.Library.Assets where ass.AssetNumber == num select ass;
             var al    = a.ToList();
             var asset = al.FirstOrDefault();
             asset.Images = asset.Images.Replace(",,,", "<@#$>").Replace(",", "").Replace("<@#$>", ",").Replace("Images", "").Replace("\\", "");
             HttpContext.Current.Session["CurrentAsset"] = asset;
             var ret = GetAssetByDateShipped(asset, date);
             return(ret);
         }
         //barcode was scanned or manually inputted
         num = ParseScanInput(num);
         SQL_Request req = new SQL_Request().OpenConnection();
         req.GetAsset(num);
         if (req.Tag is Asset)
         {
             (req.Tag as Asset).Images = (req.Tag as Asset).Images.Replace(",,,", "<@#$>").Replace(",", "").Replace("<@#$>", ",").Replace("Images", "").Replace("\\", "");
             HttpContext.Current.Session["CurrentAsset"] = req.Tag as Asset;
             var ret = GetAssetByDateShipped((req.Tag as Asset), date);
             return(ret);
         }
         else
         {
             return(new Asset());
         }
     }
     catch { return(new Asset()); }
 }