public List <SuggestionsProduct> GetListAuto(string keword, int showLimit, int agencyId, int type = 1) { var name = FomatString.Slug(keword); var date = DateTime.Now; var query = FDIDB.AutoSelectProduct(name, showLimit).Select(c => new SuggestionsProduct { ID = c.ID, IdDetail = c.IdDetail, IsCombo = 0, name = "<span>BarCode: <b>" + (c.BarCode ?? "") + "</b>- SL: <b>" + (c.Quantity ?? 0) + "</b></span>", UrlImg = c.UrlImg ?? "/Content/Admin/images/auto-default.jpg", value = c.BarCode, BarCode = c.BarCode, QuantityDay = c.QuantityDay, Quantity = c.Quantity, DateS = date.ToString("yyyy-MM-dd"), DateE = date.AddMonths(c.QuantityDay ?? 0).ToString("yyyy-MM-dd"), data = c.PriceNew.ToString(), title = c.Name, pricenew = c.PriceNew, Type = type, }); return(query.ToList()); }
public List <SuggestionsProduct> GetListAuto(string keword, int showLimit, int type = 1) { var name = FDIUtils.Slug(keword); var query = FDIDB.AutoSelectProduct(name, showLimit).Select(c => new SuggestionsProduct { ID = c.ID, UrlImg = c.UrlImg ?? "/Content/Admin/images/auto-default.jpg", name = "", code = c.BarCode ?? "", value = c.BarCode ?? "", data = "<span class='maskPrice'>" + c.PriceNew + "</span> đ", title = c.Name, pricenew = c.PriceNew, Type = type }); return(query.ToList()); }