在代码中可以,Environment.NewLine
如:
public string GetCheckNote(string plantext)
        {
            string checknote = "";
            string sql = "SELECT Checker,CheckNote FROM emsCheckPlanRecordCheck WHERE PlanText=@PlanText  order by lastedited asc";
            SqlParameter[] pars = 
                    { 
                        new SqlParameter("@PlanText",SqlDbType.NVarChar)
                    };
            pars[0].Value = plantext;
            DataSet set = !CommonWebDataServer.CheckServer() ? GetDataSet(sql, pars, CommonWebDataServer.ChLoginServerStr()) : GetDataSet(sql, pars);
            if (set != null && set.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row in set.Tables[0].Rows)
                {
                    checknote += row["Checker"].ToString() + ":" + row["CheckNote"].ToString() + Environment.NewLine;
                }
            }
            checknote = !string.IsNullOrEmpty(checknote) && checknote.EndsWith(Environment.NewLine) ? checknote.Substring(0, checknote.Length - 1) : checknote;
            return checknote;
        }

 

相关文章:

  • 2022-01-07
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-25
  • 2021-10-28
  • 2021-06-19
  • 2021-10-15
  • 2022-12-23
  • 2022-01-25
相关资源
相似解决方案