SetProperties.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.ComponentModel;
  5. namespace CreateTableColumnFile
  6. {
  7. public class SetProperties
  8. {
  9. private string _namespace = "SysDataLibs.TableClass";
  10. [Description("产生的代码空间命名"), CategoryAttribute("基础配置")]
  11. public string NameSpace
  12. {
  13. get { return _namespace; }
  14. set { _namespace = value; }
  15. }
  16. private string _TablesClassName = "Tn";
  17. [Description("表所在的类名"), CategoryAttribute("基础配置")]
  18. public string TablesClassName
  19. {
  20. get { return _TablesClassName; }
  21. set { _TablesClassName = value; }
  22. }
  23. //private string _TableColumnName = "cn_";
  24. //[Description("表类的命名前缀"), CategoryAttribute("基础配置")]
  25. //public string TableColumnName
  26. //{
  27. // get { return _TableColumnName; }
  28. // set { _TableColumnName = value; }
  29. //}
  30. private string _server = "120.25.240.119";
  31. [Description("服务器名"), CategoryAttribute("数据库链接配置")]
  32. public string SERVER
  33. {
  34. get { return _server; }
  35. set { _server = value; }
  36. }
  37. private string _database = "GsMarket";
  38. [Description("数据库名"), CategoryAttribute("数据库链接配置")]
  39. public string database
  40. {
  41. get { return _database; }
  42. set { _database = value; }
  43. }
  44. private string _uid = "sa";
  45. [Description("登录用户名"), CategoryAttribute("数据库链接配置")]
  46. public string uid
  47. {
  48. get { return _uid; }
  49. set { _uid = value; }
  50. }
  51. private string _pwd = "syfsz,./";
  52. [Description("登录密码"), CategoryAttribute("数据库链接配置")]
  53. public string pwd
  54. {
  55. get { return _pwd; }
  56. set { _pwd = value; }
  57. }
  58. private bool _IsCreateMotheds = true;
  59. [Description("是否要创建表类的相关方法"), CategoryAttribute("其他配置")]
  60. public bool IsCreateMotheds
  61. {
  62. get { return _IsCreateMotheds; }
  63. set { _IsCreateMotheds = value; }
  64. }
  65. public string GetConnString()
  66. {
  67. return "server=" + _server + ";database=" + _database + ";uid=" + _uid + ";pwd=" + _pwd + ";";
  68. }
  69. // server=songyf;database=dbshwashar;uid=sa;pwd=;
  70. }
  71. }