public static void Insert(ZhubiDTO dto) { var sql = @"INSERT INTO `svc`.`zhubi` (`StockCode`, `InDate`, `xls`) VALUES (@StockCode, @InDate, @Xls);"; SqlHelper.ExecuteNonQuery(sql, dto); }
public static ZhubiDTO GetZhubiDTO(string code, DateTime date) { var dto = ZhubiDAL.GetZhubi(code, date); if (dto == null) { var xls = SinaBiz.GetZhubi(code, date); if (!string.IsNullOrEmpty(xls)) { dto = new ZhubiDTO { StockCode = StockHelper.GetShortCode(code) , InDate = date.Date , Xls = xls }; ZhubiDAL.Insert(dto); } } return(dto); }