public ActionResult Base(UserModel Model)
        {
            Model.Tel = string.Format("{0}-{1}", Model.Areacode, Model.Tel);
            Model.Fax = string.Format("{0}-{1}", Model.Areacode, Model.Fax);
            Model.UserTypeID = Convert.ToInt16(ControllerContext.RouteData.Values["id"]);
            foreach (System.Reflection.PropertyInfo info in typeof(UserModel).GetProperties())
            {
                try
                { 
                    log.Info((info.Name + "  " + info.GetValue(Model, null).ToString()));
                }
                catch(Exception e)
                {
                    log.Error(string.Format("错误字段:{0}", info.Name), e);
                }
            }
            return View();
        }

 

相关文章:

  • 2022-12-23
  • 2021-09-27
  • 2021-10-19
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-05
  • 2021-10-20
  • 2021-11-22
  • 2022-01-10
相关资源
相似解决方案