Exemple #1
0
        public string GetOneHisList([FromBody]History history)
        {
            if (history.Start_Date > history.End_Date)
                return "";
            DateTime beijing = DateTime.Now.ToUniversalTime().AddHours(8);
            var html = "";
            if (history.Start_Date.Year == 1 || history.End_Date.Year == 1 || history.Start_Date < beijing.AddMonths(-3))
            {
                history.Start_Date = beijing.AddMonths(-3);
                history.End_Date = beijing;
            }
            MysqlHelper mysqlhelper = new MysqlHelper();
            List<History> his_list = mysqlhelper.GetAccountHistory(history);
            foreach (History his in his_list)
            {
                  html += string.Format("<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td></tr>", his.Type, his.Start_Date,his.Amount, his.Currency);

            }
            return html;
        }