public override void AssemblyTemporaryTableNameAndPrimaryKey() { base.AssemblyTemporaryTableNameAndPrimaryKey(); int bracket = FormatLineText.IndexOf("{") + 1; if (bracket <= 1) { throw new ExceptionOwnerEx(LineNo); } OrgPrimaryKeyLineContent = OrgLineText.Substring(OrgLineText.IndexOf("{") + 1).TrimStart(); string tempText = FormatLineText.Substring(bracket).Trim(); if (!string.IsNullOrEmpty(tempText)) { FormatLineText = tempText; RecodePrimaryKeyContent(); AssemblyManager(); } }
/// <summary> /// 生成简单属性动作代理 /// </summary> public override void GenerateSimpleProperty() { base.GenerateSimpleProperty(); if ("}".Equals(OrgLineText)) { SimplePropertyCompletedFlag = true; return; } else if (OrgLineText.Contains("}")) { throw new ExceptionOwnerEx(LineNo); } AssemblyFormatLineContent(); AssemblyManager(); GenerateNotes(SimplePropertyBuilder); if (IsBusinessType) { SimplePropertyBuilder.AppendLine(" defaultType.RegisterSimpleProperty(\"" + PropertyName + "\", _businessTypeSrv.Simple" + BusinessTypeName + "Type, " + DefaultValue + ", false, new Attribute[] { _businessTypeSrv.Simple" + BusinessTypeName + " });"); } else { SimplePropertyBuilder.AppendLine(" simplePropertyAttribute = new SimplePropertyAttribute(GeneralDBType." + GeneralDBTypeName + ");"); if (Length > 0) { SimplePropertyBuilder.AppendLine(" simplePropertyAttribute.Size = " + Length + ";"); } if (Accuray > 0) { SimplePropertyBuilder.AppendLine(" simplePropertyAttribute.Scale = " + Accuray + ";"); } SimplePropertyBuilder.AppendLine(" defaultType.RegisterSimpleProperty(\"" + PropertyName + "\", typeof(" + TypeName + "), " + DefaultValue + ", false, new Attribute[] { simplePropertyAttribute });"); } }