protected void Init() { rpAttrList = CommFun.GetQuickDataBaseAttr <T>(); if (rpAttrList.Count <= 0) { throw new Exception("无法操作空表!"); } tabName = rpAttrList[0].TableName; selPara = new List <Mess_Three <string, string, object> >(); orderByList = new List <DBOrderby>(); if (!rpAttrList.Exists(r => r.isKey)) { throw new Exception("表需要一个定义一个主键!"); } if (rpAttrList.Where(r => r.isKey).Count() > 1) { throw new Exception("key太多。"); } keyName = rpAttrList.Find(r => r.isKey).Column; }