적정인원보고서 완료
This commit is contained in:
33
Project/AdoNetEFMain.Context.cs
Normal file
33
Project/AdoNetEFMain.Context.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Project
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
|
||||
public partial class EEEntitiesMain : DbContext
|
||||
{
|
||||
public EEEntitiesMain()
|
||||
: base("name=EEEntitiesMain")
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||
{
|
||||
throw new UnintentionalCodeFirstException();
|
||||
}
|
||||
|
||||
public virtual DbSet<EETGW_GroupUser> EETGW_GroupUser { get; set; }
|
||||
public virtual DbSet<UserGroup> UserGroup { get; set; }
|
||||
public virtual DbSet<Users> Users { get; set; }
|
||||
public virtual DbSet<vGroupUser> vGroupUser { get; set; }
|
||||
}
|
||||
}
|
||||
636
Project/AdoNetEFMain.Context.tt
Normal file
636
Project/AdoNetEFMain.Context.tt
Normal file
@@ -0,0 +1,636 @@
|
||||
<#@ template language="C#" debug="false" hostspecific="true"#>
|
||||
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
|
||||
output extension=".cs"#><#
|
||||
|
||||
const string inputFile = @"AdoNetEFMain.edmx";
|
||||
var textTransform = DynamicTextTransformation.Create(this);
|
||||
var code = new CodeGenerationTools(this);
|
||||
var ef = new MetadataTools(this);
|
||||
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
|
||||
var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
|
||||
var itemCollection = loader.CreateEdmItemCollection(inputFile);
|
||||
var modelNamespace = loader.GetModelNamespace(inputFile);
|
||||
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
|
||||
|
||||
var container = itemCollection.OfType<EntityContainer>().FirstOrDefault();
|
||||
if (container == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
#>
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
|
||||
//
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
<#
|
||||
|
||||
var codeNamespace = code.VsNamespaceSuggestion();
|
||||
if (!String.IsNullOrEmpty(codeNamespace))
|
||||
{
|
||||
#>
|
||||
namespace <#=code.EscapeNamespace(codeNamespace)#>
|
||||
{
|
||||
<#
|
||||
PushIndent(" ");
|
||||
}
|
||||
|
||||
#>
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
<#
|
||||
if (container.FunctionImports.Any())
|
||||
{
|
||||
#>
|
||||
using System.Data.Entity.Core.Objects;
|
||||
using System.Linq;
|
||||
<#
|
||||
}
|
||||
#>
|
||||
|
||||
<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
|
||||
{
|
||||
public <#=code.Escape(container)#>()
|
||||
: base("name=<#=container.Name#>")
|
||||
{
|
||||
<#
|
||||
if (!loader.IsLazyLoadingEnabled(container))
|
||||
{
|
||||
#>
|
||||
this.Configuration.LazyLoadingEnabled = false;
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
|
||||
{
|
||||
// Note: the DbSet members are defined below such that the getter and
|
||||
// setter always have the same accessibility as the DbSet definition
|
||||
if (Accessibility.ForReadOnlyProperty(entitySet) != "public")
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.DbSetInitializer(entitySet)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||
{
|
||||
throw new UnintentionalCodeFirstException();
|
||||
}
|
||||
|
||||
<#
|
||||
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.DbSet(entitySet)#>
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var edmFunction in container.FunctionImports)
|
||||
{
|
||||
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
|
||||
if (!String.IsNullOrEmpty(codeNamespace))
|
||||
{
|
||||
PopIndent();
|
||||
#>
|
||||
}
|
||||
<#
|
||||
}
|
||||
#>
|
||||
<#+
|
||||
|
||||
private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
if (typeMapper.IsComposable(edmFunction))
|
||||
{
|
||||
#>
|
||||
|
||||
[DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
|
||||
<#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
|
||||
{
|
||||
<#+
|
||||
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
|
||||
#>
|
||||
<#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
|
||||
}
|
||||
<#+
|
||||
}
|
||||
else
|
||||
{
|
||||
#>
|
||||
|
||||
<#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
|
||||
{
|
||||
<#+
|
||||
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
|
||||
#>
|
||||
<#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
|
||||
}
|
||||
<#+
|
||||
if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
|
||||
{
|
||||
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
|
||||
{
|
||||
#>
|
||||
var <#=name#> = <#=isNotNull#> ?
|
||||
<#=notNullInit#> :
|
||||
<#=nullInit#>;
|
||||
|
||||
<#+
|
||||
}
|
||||
|
||||
public const string TemplateId = "CSharp_DbContext_Context_EF6";
|
||||
|
||||
public class CodeStringGenerator
|
||||
{
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly TypeMapper _typeMapper;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(typeMapper, "typeMapper");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
|
||||
_code = code;
|
||||
_typeMapper = typeMapper;
|
||||
_ef = ef;
|
||||
}
|
||||
|
||||
public string Property(EdmProperty edmProperty)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
Accessibility.ForProperty(edmProperty),
|
||||
_typeMapper.GetTypeName(edmProperty.TypeUsage),
|
||||
_code.Escape(edmProperty),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
|
||||
}
|
||||
|
||||
public string NavigationProperty(NavigationProperty navProp)
|
||||
{
|
||||
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
|
||||
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
|
||||
_code.Escape(navProp),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
|
||||
}
|
||||
|
||||
public string AccessibilityAndVirtual(string accessibility)
|
||||
{
|
||||
return accessibility + (accessibility != "private" ? " virtual" : "");
|
||||
}
|
||||
|
||||
public string EntityClassOpening(EntityType entity)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1}partial class {2}{3}",
|
||||
Accessibility.ForType(entity),
|
||||
_code.SpaceAfter(_code.AbstractOption(entity)),
|
||||
_code.Escape(entity),
|
||||
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
|
||||
}
|
||||
|
||||
public string EnumOpening(SimpleType enumType)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} enum {1} : {2}",
|
||||
Accessibility.ForType(enumType),
|
||||
_code.Escape(enumType),
|
||||
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
|
||||
}
|
||||
|
||||
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
|
||||
{
|
||||
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
|
||||
{
|
||||
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
|
||||
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
|
||||
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
|
||||
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
|
||||
}
|
||||
}
|
||||
|
||||
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} IQueryable<{1}> {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
_code.Escape(edmFunction),
|
||||
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
|
||||
}
|
||||
|
||||
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
edmFunction.NamespaceName,
|
||||
edmFunction.Name,
|
||||
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
|
||||
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
|
||||
}
|
||||
|
||||
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
|
||||
if (includeMergeOption)
|
||||
{
|
||||
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
_code.Escape(edmFunction),
|
||||
paramList);
|
||||
}
|
||||
|
||||
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
|
||||
if (includeMergeOption)
|
||||
{
|
||||
callParams = ", mergeOption" + callParams;
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
|
||||
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
edmFunction.Name,
|
||||
callParams);
|
||||
}
|
||||
|
||||
public string DbSet(EntitySet entitySet)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
|
||||
Accessibility.ForReadOnlyProperty(entitySet),
|
||||
_typeMapper.GetTypeName(entitySet.ElementType),
|
||||
_code.Escape(entitySet));
|
||||
}
|
||||
|
||||
public string DbSetInitializer(EntitySet entitySet)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} = Set<{1}>();",
|
||||
_code.Escape(entitySet),
|
||||
_typeMapper.GetTypeName(entitySet.ElementType));
|
||||
}
|
||||
|
||||
public string UsingDirectives(bool inHeader, bool includeCollections = true)
|
||||
{
|
||||
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
|
||||
? string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0}using System;{1}" +
|
||||
"{2}",
|
||||
inHeader ? Environment.NewLine : "",
|
||||
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
|
||||
inHeader ? "" : Environment.NewLine)
|
||||
: "";
|
||||
}
|
||||
}
|
||||
|
||||
public class TypeMapper
|
||||
{
|
||||
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
|
||||
|
||||
private readonly System.Collections.IList _errors;
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public static string FixNamespaces(string typeName)
|
||||
{
|
||||
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
|
||||
}
|
||||
|
||||
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
ArgumentNotNull(errors, "errors");
|
||||
|
||||
_code = code;
|
||||
_ef = ef;
|
||||
_errors = errors;
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, string modelNamespace)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
|
||||
{
|
||||
if (edmType == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var collectionType = edmType as CollectionType;
|
||||
if (collectionType != null)
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
|
||||
}
|
||||
|
||||
var typeName = _code.Escape(edmType.MetadataProperties
|
||||
.Where(p => p.Name == ExternalTypeNameAttributeName)
|
||||
.Select(p => (string)p.Value)
|
||||
.FirstOrDefault())
|
||||
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
|
||||
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
|
||||
_code.Escape(edmType));
|
||||
|
||||
if (edmType is StructuralType)
|
||||
{
|
||||
return typeName;
|
||||
}
|
||||
|
||||
if (edmType is SimpleType)
|
||||
{
|
||||
var clrType = UnderlyingClrType(edmType);
|
||||
if (!IsEnumType(edmType))
|
||||
{
|
||||
typeName = _code.Escape(clrType);
|
||||
}
|
||||
|
||||
typeName = FixNamespaces(typeName);
|
||||
|
||||
return clrType.IsValueType && isNullable == true ?
|
||||
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
|
||||
typeName;
|
||||
}
|
||||
|
||||
throw new ArgumentException("edmType");
|
||||
}
|
||||
|
||||
public Type UnderlyingClrType(EdmType edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
var primitiveType = edmType as PrimitiveType;
|
||||
if (primitiveType != null)
|
||||
{
|
||||
return primitiveType.ClrEquivalentType;
|
||||
}
|
||||
|
||||
if (IsEnumType(edmType))
|
||||
{
|
||||
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
|
||||
}
|
||||
|
||||
return typeof(object);
|
||||
}
|
||||
|
||||
public object GetEnumMemberValue(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var valueProperty = enumMember.GetType().GetProperty("Value");
|
||||
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public string GetEnumMemberName(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var nameProperty = enumMember.GetType().GetProperty("Name");
|
||||
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var membersProperty = enumType.GetType().GetProperty("Members");
|
||||
return membersProperty != null
|
||||
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
|
||||
: Enumerable.Empty<MetadataItem>();
|
||||
}
|
||||
|
||||
public bool EnumIsFlags(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
|
||||
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public bool IsEnumType(GlobalItem edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
return edmType.GetType().Name == "EnumType";
|
||||
}
|
||||
|
||||
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public string CreateLiteral(object value)
|
||||
{
|
||||
if (value == null || value.GetType() != typeof(TimeSpan))
|
||||
{
|
||||
return _code.CreateLiteral(value);
|
||||
}
|
||||
|
||||
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
|
||||
}
|
||||
|
||||
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
|
||||
{
|
||||
ArgumentNotNull(types, "types");
|
||||
ArgumentNotNull(sourceFile, "sourceFile");
|
||||
|
||||
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
|
||||
if (types.Any(item => !hash.Add(item)))
|
||||
{
|
||||
_errors.Add(
|
||||
new CompilerError(sourceFile, -1, -1, "6023",
|
||||
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return GetItemsToGenerate<SimpleType>(itemCollection)
|
||||
.Where(e => IsEnumType(e));
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
|
||||
{
|
||||
return itemCollection
|
||||
.OfType<T>()
|
||||
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
|
||||
.OrderBy(i => i.Name);
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return itemCollection
|
||||
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
|
||||
.Select(g => GetGlobalItemName(g));
|
||||
}
|
||||
|
||||
public string GetGlobalItemName(GlobalItem item)
|
||||
{
|
||||
if (item is EdmType)
|
||||
{
|
||||
return ((EdmType)item).Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((EntityContainer)item).Name;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
|
||||
}
|
||||
|
||||
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
|
||||
return returnParamsProperty == null
|
||||
? edmFunction.ReturnParameter
|
||||
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
|
||||
}
|
||||
|
||||
public bool IsComposable(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
|
||||
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
|
||||
}
|
||||
|
||||
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
|
||||
{
|
||||
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
}
|
||||
|
||||
public TypeUsage GetReturnType(EdmFunction edmFunction)
|
||||
{
|
||||
var returnParam = GetReturnParameter(edmFunction);
|
||||
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
|
||||
}
|
||||
|
||||
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
|
||||
{
|
||||
var returnType = GetReturnType(edmFunction);
|
||||
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ArgumentNotNull<T>(T arg, string name) where T : class
|
||||
{
|
||||
if (arg == null)
|
||||
{
|
||||
throw new ArgumentNullException(name);
|
||||
}
|
||||
}
|
||||
#>
|
||||
10
Project/AdoNetEFMain.Designer.cs
generated
Normal file
10
Project/AdoNetEFMain.Designer.cs
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// 모델 'D:\Source\##### 완료아이템\(014) GroupWare\Source\Project\AdoNetEFMain.edmx'에 대해 T4 코드 생성이 사용됩니다.
|
||||
// 레거시 코드 생성을 사용하려면 '코드 생성 전략' 디자이너 속성의 값을
|
||||
// 'Legacy ObjectContext'로 변경하십시오. 이 속성은 모델이 디자이너에서 열릴 때
|
||||
// 속성 창에서 사용할 수 있습니다.
|
||||
|
||||
// 컨텍스트 및 엔터티 클래스가 생성되지 않은 경우 빈 모델을 만들었기 때문일 수도 있지만
|
||||
// 사용할 Entity Framework 버전을 선택하지 않았기 때문일 수도 있습니다. 모델에 맞는 컨텍스트 클래스 및
|
||||
// 엔터티 클래스를 생성하려면 디자이너에서 모델을 열고 디자이너 화면에서 마우스 오른쪽 단추를 클릭한
|
||||
// 다음 '데이터베이스에서 모델 업데이트...', '모델에서 데이터베이스 생성...' 또는 '코드 생성 항목 추가...'를
|
||||
// 선택하십시오.
|
||||
9
Project/AdoNetEFMain.cs
Normal file
9
Project/AdoNetEFMain.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
294
Project/AdoNetEFMain.edmx
Normal file
294
Project/AdoNetEFMain.edmx
Normal file
@@ -0,0 +1,294 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- EF Runtime content -->
|
||||
<edmx:Runtime>
|
||||
<!-- SSDL content -->
|
||||
<edmx:StorageModels>
|
||||
<Schema Namespace="EEModelMain.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2008" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
|
||||
<EntityType Name="EETGW_GroupUser">
|
||||
<Key>
|
||||
<PropertyRef Name="idx" />
|
||||
</Key>
|
||||
<Property Name="idx" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" Nullable="false" />
|
||||
<Property Name="uid" Type="varchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="level" Type="smallint" />
|
||||
<Property Name="Process" Type="varchar" MaxLength="50" />
|
||||
<Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="wdate" Type="smalldatetime" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="UserGroup">
|
||||
<Key>
|
||||
<PropertyRef Name="dept" />
|
||||
</Key>
|
||||
<Property Name="dept" Type="varchar" MaxLength="100" Nullable="false" />
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" />
|
||||
<Property Name="path_kj" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="advpurchase" Type="bit" />
|
||||
<Property Name="permission" Type="int" />
|
||||
</EntityType>
|
||||
<EntityType Name="Users">
|
||||
<Key>
|
||||
<PropertyRef Name="id" />
|
||||
</Key>
|
||||
<Property Name="id" Type="varchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" />
|
||||
<Property Name="password" Type="varchar" MaxLength="50" />
|
||||
<Property Name="nameE" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="name" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="dept" Type="varchar" MaxLength="100" />
|
||||
<Property Name="grade" Type="varchar" MaxLength="10" />
|
||||
<Property Name="email" Type="varchar" MaxLength="100" />
|
||||
<Property Name="level" Type="smallint" />
|
||||
<Property Name="indate" Type="varchar" MaxLength="20" />
|
||||
<Property Name="outdate" Type="varchar" MaxLength="20" />
|
||||
<Property Name="tel" Type="varchar" MaxLength="20" />
|
||||
<Property Name="hp" Type="varchar" MaxLength="20" />
|
||||
<Property Name="place" Type="varchar" MaxLength="100" />
|
||||
<Property Name="ads_employNo" Type="varchar" MaxLength="50" />
|
||||
<Property Name="ads_title" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="ads_created" Type="varchar" MaxLength="50" />
|
||||
<Property Name="memo" Type="nvarchar" MaxLength="255" />
|
||||
<Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="wdate" Type="smalldatetime" Nullable="false" />
|
||||
<Property Name="processs" Type="nvarchar" MaxLength="100" />
|
||||
</EntityType>
|
||||
<!--생성 중 오류 발생:
|
||||
경고 6002: 테이블/뷰 'EE.dbo.vGroupUser'에 기본 키가 정의되지 않았습니다. 키가 유추되었고 읽기 전용 테이블/뷰로 정의되었습니다.-->
|
||||
<EntityType Name="vGroupUser">
|
||||
<Key>
|
||||
<PropertyRef Name="gcode" />
|
||||
</Key>
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" Nullable="false" />
|
||||
<Property Name="dept" Type="varchar" MaxLength="100" />
|
||||
<Property Name="level" Type="smallint" />
|
||||
<Property Name="name" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="nameE" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="grade" Type="varchar" MaxLength="10" />
|
||||
<Property Name="email" Type="varchar" MaxLength="100" />
|
||||
<Property Name="tel" Type="varchar" MaxLength="20" />
|
||||
<Property Name="indate" Type="varchar" MaxLength="20" />
|
||||
<Property Name="outdate" Type="varchar" MaxLength="20" />
|
||||
<Property Name="hp" Type="varchar" MaxLength="20" />
|
||||
<Property Name="place" Type="varchar" MaxLength="100" />
|
||||
<Property Name="ads_employNo" Type="varchar" MaxLength="50" />
|
||||
<Property Name="ads_title" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="ads_created" Type="varchar" MaxLength="50" />
|
||||
<Property Name="memo" Type="nvarchar" MaxLength="255" />
|
||||
<Property Name="processs" Type="varchar" MaxLength="50" />
|
||||
<Property Name="id" Type="varchar" MaxLength="20" />
|
||||
</EntityType>
|
||||
<EntityContainer Name="EEModelMainStoreContainer">
|
||||
<EntitySet Name="EETGW_GroupUser" EntityType="Self.EETGW_GroupUser" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="UserGroup" EntityType="Self.UserGroup" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="vGroupUser" EntityType="Self.vGroupUser" store:Type="Views" store:Schema="dbo">
|
||||
<DefiningQuery>SELECT
|
||||
[vGroupUser].[gcode] AS [gcode],
|
||||
[vGroupUser].[dept] AS [dept],
|
||||
[vGroupUser].[level] AS [level],
|
||||
[vGroupUser].[name] AS [name],
|
||||
[vGroupUser].[nameE] AS [nameE],
|
||||
[vGroupUser].[grade] AS [grade],
|
||||
[vGroupUser].[email] AS [email],
|
||||
[vGroupUser].[tel] AS [tel],
|
||||
[vGroupUser].[indate] AS [indate],
|
||||
[vGroupUser].[outdate] AS [outdate],
|
||||
[vGroupUser].[hp] AS [hp],
|
||||
[vGroupUser].[place] AS [place],
|
||||
[vGroupUser].[ads_employNo] AS [ads_employNo],
|
||||
[vGroupUser].[ads_title] AS [ads_title],
|
||||
[vGroupUser].[ads_created] AS [ads_created],
|
||||
[vGroupUser].[memo] AS [memo],
|
||||
[vGroupUser].[processs] AS [processs],
|
||||
[vGroupUser].[id] AS [id]
|
||||
FROM [dbo].[vGroupUser] AS [vGroupUser]</DefiningQuery>
|
||||
</EntitySet>
|
||||
</EntityContainer>
|
||||
</Schema>
|
||||
</edmx:StorageModels>
|
||||
<!-- CSDL content -->
|
||||
<edmx:ConceptualModels>
|
||||
<Schema Namespace="EEModelMain" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
|
||||
<EntityType Name="EETGW_GroupUser">
|
||||
<Key>
|
||||
<PropertyRef Name="idx" />
|
||||
</Key>
|
||||
<Property Name="idx" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="gcode" Type="String" MaxLength="10" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="uid" Type="String" MaxLength="20" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="level" Type="Int16" />
|
||||
<Property Name="Process" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="wuid" Type="String" MaxLength="20" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="wdate" Type="DateTime" Nullable="false" Precision="0" />
|
||||
</EntityType>
|
||||
<EntityType Name="UserGroup">
|
||||
<Key>
|
||||
<PropertyRef Name="dept" />
|
||||
</Key>
|
||||
<Property Name="dept" Type="String" MaxLength="100" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="gcode" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="path_kj" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="advpurchase" Type="Boolean" />
|
||||
<Property Name="permission" Type="Int32" />
|
||||
</EntityType>
|
||||
<EntityType Name="Users">
|
||||
<Key>
|
||||
<PropertyRef Name="id" />
|
||||
</Key>
|
||||
<Property Name="id" Type="String" MaxLength="20" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="gcode" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="password" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="nameE" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="dept" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="grade" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="email" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="level" Type="Int16" />
|
||||
<Property Name="indate" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="outdate" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="tel" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="hp" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="place" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ads_employNo" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ads_title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ads_created" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="memo" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
|
||||
<Property Name="wuid" Type="String" MaxLength="20" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="wdate" Type="DateTime" Nullable="false" Precision="0" />
|
||||
<Property Name="processs" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="vGroupUser">
|
||||
<Key>
|
||||
<PropertyRef Name="gcode" />
|
||||
</Key>
|
||||
<Property Name="gcode" Type="String" MaxLength="10" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="dept" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="level" Type="Int16" />
|
||||
<Property Name="name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="nameE" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="grade" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="email" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="tel" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="indate" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="outdate" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="hp" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="place" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ads_employNo" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ads_title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ads_created" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="memo" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
|
||||
<Property Name="processs" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="id" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
</EntityType>
|
||||
<EntityContainer Name="EEEntitiesMain" annotation:LazyLoadingEnabled="true">
|
||||
<EntitySet Name="EETGW_GroupUser" EntityType="Self.EETGW_GroupUser" />
|
||||
<EntitySet Name="UserGroup" EntityType="Self.UserGroup" />
|
||||
<EntitySet Name="Users" EntityType="Self.Users" />
|
||||
<EntitySet Name="vGroupUser" EntityType="Self.vGroupUser" />
|
||||
</EntityContainer>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
<edmx:Mappings>
|
||||
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
|
||||
<EntityContainerMapping StorageEntityContainer="EEModelMainStoreContainer" CdmEntityContainer="EEEntitiesMain">
|
||||
<EntitySetMapping Name="EETGW_GroupUser">
|
||||
<EntityTypeMapping TypeName="EEModelMain.EETGW_GroupUser">
|
||||
<MappingFragment StoreEntitySet="EETGW_GroupUser">
|
||||
<ScalarProperty Name="idx" ColumnName="idx" />
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
<ScalarProperty Name="uid" ColumnName="uid" />
|
||||
<ScalarProperty Name="level" ColumnName="level" />
|
||||
<ScalarProperty Name="Process" ColumnName="Process" />
|
||||
<ScalarProperty Name="wuid" ColumnName="wuid" />
|
||||
<ScalarProperty Name="wdate" ColumnName="wdate" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="UserGroup">
|
||||
<EntityTypeMapping TypeName="EEModelMain.UserGroup">
|
||||
<MappingFragment StoreEntitySet="UserGroup">
|
||||
<ScalarProperty Name="dept" ColumnName="dept" />
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
<ScalarProperty Name="path_kj" ColumnName="path_kj" />
|
||||
<ScalarProperty Name="advpurchase" ColumnName="advpurchase" />
|
||||
<ScalarProperty Name="permission" ColumnName="permission" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="Users">
|
||||
<EntityTypeMapping TypeName="EEModelMain.Users">
|
||||
<MappingFragment StoreEntitySet="Users">
|
||||
<ScalarProperty Name="id" ColumnName="id" />
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
<ScalarProperty Name="password" ColumnName="password" />
|
||||
<ScalarProperty Name="nameE" ColumnName="nameE" />
|
||||
<ScalarProperty Name="name" ColumnName="name" />
|
||||
<ScalarProperty Name="dept" ColumnName="dept" />
|
||||
<ScalarProperty Name="grade" ColumnName="grade" />
|
||||
<ScalarProperty Name="email" ColumnName="email" />
|
||||
<ScalarProperty Name="level" ColumnName="level" />
|
||||
<ScalarProperty Name="indate" ColumnName="indate" />
|
||||
<ScalarProperty Name="outdate" ColumnName="outdate" />
|
||||
<ScalarProperty Name="tel" ColumnName="tel" />
|
||||
<ScalarProperty Name="hp" ColumnName="hp" />
|
||||
<ScalarProperty Name="place" ColumnName="place" />
|
||||
<ScalarProperty Name="ads_employNo" ColumnName="ads_employNo" />
|
||||
<ScalarProperty Name="ads_title" ColumnName="ads_title" />
|
||||
<ScalarProperty Name="ads_created" ColumnName="ads_created" />
|
||||
<ScalarProperty Name="memo" ColumnName="memo" />
|
||||
<ScalarProperty Name="wuid" ColumnName="wuid" />
|
||||
<ScalarProperty Name="wdate" ColumnName="wdate" />
|
||||
<ScalarProperty Name="processs" ColumnName="processs" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="vGroupUser">
|
||||
<EntityTypeMapping TypeName="EEModelMain.vGroupUser">
|
||||
<MappingFragment StoreEntitySet="vGroupUser">
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
<ScalarProperty Name="dept" ColumnName="dept" />
|
||||
<ScalarProperty Name="level" ColumnName="level" />
|
||||
<ScalarProperty Name="name" ColumnName="name" />
|
||||
<ScalarProperty Name="nameE" ColumnName="nameE" />
|
||||
<ScalarProperty Name="grade" ColumnName="grade" />
|
||||
<ScalarProperty Name="email" ColumnName="email" />
|
||||
<ScalarProperty Name="tel" ColumnName="tel" />
|
||||
<ScalarProperty Name="indate" ColumnName="indate" />
|
||||
<ScalarProperty Name="outdate" ColumnName="outdate" />
|
||||
<ScalarProperty Name="hp" ColumnName="hp" />
|
||||
<ScalarProperty Name="place" ColumnName="place" />
|
||||
<ScalarProperty Name="ads_employNo" ColumnName="ads_employNo" />
|
||||
<ScalarProperty Name="ads_title" ColumnName="ads_title" />
|
||||
<ScalarProperty Name="ads_created" ColumnName="ads_created" />
|
||||
<ScalarProperty Name="memo" ColumnName="memo" />
|
||||
<ScalarProperty Name="processs" ColumnName="processs" />
|
||||
<ScalarProperty Name="id" ColumnName="id" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
</edmx:Runtime>
|
||||
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
|
||||
<Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<Connection>
|
||||
<DesignerInfoPropertySet>
|
||||
<DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
|
||||
</DesignerInfoPropertySet>
|
||||
</Connection>
|
||||
<Options>
|
||||
<DesignerInfoPropertySet>
|
||||
<DesignerProperty Name="ValidateOnBuild" Value="true" />
|
||||
<DesignerProperty Name="EnablePluralization" Value="false" />
|
||||
<DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
|
||||
<DesignerProperty Name="UseLegacyProvider" Value="false" />
|
||||
<DesignerProperty Name="CodeGenerationStrategy" Value="없음" />
|
||||
</DesignerInfoPropertySet>
|
||||
</Options>
|
||||
<!-- Diagram content (shape and connector positions) -->
|
||||
<Diagrams></Diagrams>
|
||||
</Designer>
|
||||
</edmx:Edmx>
|
||||
15
Project/AdoNetEFMain.edmx.diagram
Normal file
15
Project/AdoNetEFMain.edmx.diagram
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
|
||||
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- Diagram content (shape and connector positions) -->
|
||||
<edmx:Diagrams>
|
||||
<Diagram DiagramId="1357493607fd4a93b6b3d9fc19689b4f" Name="Diagram1">
|
||||
<EntityTypeShape EntityType="EEModelMain.EETGW_GroupUser" Width="1.5" PointX="0.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModelMain.UserGroup" Width="1.5" PointX="2.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModelMain.Users" Width="1.5" PointX="2.75" PointY="3.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModelMain.vGroupUser" Width="1.5" PointX="4.75" PointY="0.75" IsExpanded="true" />
|
||||
</Diagram>
|
||||
</edmx:Diagrams>
|
||||
</edmx:Designer>
|
||||
</edmx:Edmx>
|
||||
733
Project/AdoNetEFMain.tt
Normal file
733
Project/AdoNetEFMain.tt
Normal file
@@ -0,0 +1,733 @@
|
||||
<#@ template language="C#" debug="false" hostspecific="true"#>
|
||||
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
|
||||
output extension=".cs"#><#
|
||||
|
||||
const string inputFile = @"AdoNetEFMain.edmx";
|
||||
var textTransform = DynamicTextTransformation.Create(this);
|
||||
var code = new CodeGenerationTools(this);
|
||||
var ef = new MetadataTools(this);
|
||||
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
|
||||
var fileManager = EntityFrameworkTemplateFileManager.Create(this);
|
||||
var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
|
||||
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
|
||||
|
||||
if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
WriteHeader(codeStringGenerator, fileManager);
|
||||
|
||||
foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection))
|
||||
{
|
||||
fileManager.StartNewFile(entity.Name + ".cs");
|
||||
BeginNamespace(code);
|
||||
#>
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
|
||||
<#=codeStringGenerator.EntityClassOpening(entity)#>
|
||||
{
|
||||
<#
|
||||
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
|
||||
var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
|
||||
var complexProperties = typeMapper.GetComplexProperties(entity);
|
||||
|
||||
if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public <#=code.Escape(entity)#>()
|
||||
{
|
||||
<#
|
||||
foreach (var edmProperty in propertiesWithDefaultValues)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var navigationProperty in collectionNavigationProperties)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var complexProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
|
||||
<#
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
<#
|
||||
}
|
||||
|
||||
var simpleProperties = typeMapper.GetSimpleProperties(entity);
|
||||
if (simpleProperties.Any())
|
||||
{
|
||||
foreach (var edmProperty in simpleProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(edmProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
if (complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
|
||||
<#
|
||||
foreach(var complexProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(complexProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
var navigationProperties = typeMapper.GetNavigationProperties(entity);
|
||||
if (navigationProperties.Any())
|
||||
{
|
||||
#>
|
||||
|
||||
<#
|
||||
foreach (var navigationProperty in navigationProperties)
|
||||
{
|
||||
if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
|
||||
{
|
||||
#>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
<#
|
||||
}
|
||||
#>
|
||||
<#=codeStringGenerator.NavigationProperty(navigationProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
EndNamespace(code);
|
||||
}
|
||||
|
||||
foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection))
|
||||
{
|
||||
fileManager.StartNewFile(complex.Name + ".cs");
|
||||
BeginNamespace(code);
|
||||
#>
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
|
||||
<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
|
||||
{
|
||||
<#
|
||||
var complexProperties = typeMapper.GetComplexProperties(complex);
|
||||
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
|
||||
|
||||
if (propertiesWithDefaultValues.Any() || complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
public <#=code.Escape(complex)#>()
|
||||
{
|
||||
<#
|
||||
foreach (var edmProperty in propertiesWithDefaultValues)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var complexProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
|
||||
<#
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
<#
|
||||
}
|
||||
|
||||
var simpleProperties = typeMapper.GetSimpleProperties(complex);
|
||||
if (simpleProperties.Any())
|
||||
{
|
||||
foreach(var edmProperty in simpleProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(edmProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
if (complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
|
||||
<#
|
||||
foreach(var edmProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(edmProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
EndNamespace(code);
|
||||
}
|
||||
|
||||
foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
|
||||
{
|
||||
fileManager.StartNewFile(enumType.Name + ".cs");
|
||||
BeginNamespace(code);
|
||||
#>
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
|
||||
<#
|
||||
if (typeMapper.EnumIsFlags(enumType))
|
||||
{
|
||||
#>
|
||||
[Flags]
|
||||
<#
|
||||
}
|
||||
#>
|
||||
<#=codeStringGenerator.EnumOpening(enumType)#>
|
||||
{
|
||||
<#
|
||||
var foundOne = false;
|
||||
|
||||
foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
|
||||
{
|
||||
foundOne = true;
|
||||
#>
|
||||
<#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
|
||||
<#
|
||||
}
|
||||
|
||||
if (foundOne)
|
||||
{
|
||||
this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
EndNamespace(code);
|
||||
}
|
||||
|
||||
fileManager.Process();
|
||||
|
||||
#>
|
||||
<#+
|
||||
|
||||
public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
|
||||
{
|
||||
fileManager.StartHeader();
|
||||
#>
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
|
||||
//
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
|
||||
<#+
|
||||
fileManager.EndBlock();
|
||||
}
|
||||
|
||||
public void BeginNamespace(CodeGenerationTools code)
|
||||
{
|
||||
var codeNamespace = code.VsNamespaceSuggestion();
|
||||
if (!String.IsNullOrEmpty(codeNamespace))
|
||||
{
|
||||
#>
|
||||
namespace <#=code.EscapeNamespace(codeNamespace)#>
|
||||
{
|
||||
<#+
|
||||
PushIndent(" ");
|
||||
}
|
||||
}
|
||||
|
||||
public void EndNamespace(CodeGenerationTools code)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
|
||||
{
|
||||
PopIndent();
|
||||
#>
|
||||
}
|
||||
<#+
|
||||
}
|
||||
}
|
||||
|
||||
public const string TemplateId = "CSharp_DbContext_Types_EF6";
|
||||
|
||||
public class CodeStringGenerator
|
||||
{
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly TypeMapper _typeMapper;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(typeMapper, "typeMapper");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
|
||||
_code = code;
|
||||
_typeMapper = typeMapper;
|
||||
_ef = ef;
|
||||
}
|
||||
|
||||
public string Property(EdmProperty edmProperty)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
Accessibility.ForProperty(edmProperty),
|
||||
_typeMapper.GetTypeName(edmProperty.TypeUsage),
|
||||
_code.Escape(edmProperty),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
|
||||
}
|
||||
|
||||
public string NavigationProperty(NavigationProperty navProp)
|
||||
{
|
||||
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
|
||||
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
|
||||
_code.Escape(navProp),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
|
||||
}
|
||||
|
||||
public string AccessibilityAndVirtual(string accessibility)
|
||||
{
|
||||
return accessibility + (accessibility != "private" ? " virtual" : "");
|
||||
}
|
||||
|
||||
public string EntityClassOpening(EntityType entity)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1}partial class {2}{3}",
|
||||
Accessibility.ForType(entity),
|
||||
_code.SpaceAfter(_code.AbstractOption(entity)),
|
||||
_code.Escape(entity),
|
||||
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
|
||||
}
|
||||
|
||||
public string EnumOpening(SimpleType enumType)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} enum {1} : {2}",
|
||||
Accessibility.ForType(enumType),
|
||||
_code.Escape(enumType),
|
||||
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
|
||||
}
|
||||
|
||||
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
|
||||
{
|
||||
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
|
||||
{
|
||||
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
|
||||
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
|
||||
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
|
||||
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
|
||||
}
|
||||
}
|
||||
|
||||
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} IQueryable<{1}> {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
_code.Escape(edmFunction),
|
||||
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
|
||||
}
|
||||
|
||||
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
edmFunction.NamespaceName,
|
||||
edmFunction.Name,
|
||||
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
|
||||
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
|
||||
}
|
||||
|
||||
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
|
||||
if (includeMergeOption)
|
||||
{
|
||||
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
_code.Escape(edmFunction),
|
||||
paramList);
|
||||
}
|
||||
|
||||
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
|
||||
if (includeMergeOption)
|
||||
{
|
||||
callParams = ", mergeOption" + callParams;
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
|
||||
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
edmFunction.Name,
|
||||
callParams);
|
||||
}
|
||||
|
||||
public string DbSet(EntitySet entitySet)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
|
||||
Accessibility.ForReadOnlyProperty(entitySet),
|
||||
_typeMapper.GetTypeName(entitySet.ElementType),
|
||||
_code.Escape(entitySet));
|
||||
}
|
||||
|
||||
public string UsingDirectives(bool inHeader, bool includeCollections = true)
|
||||
{
|
||||
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
|
||||
? string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0}using System;{1}" +
|
||||
"{2}",
|
||||
inHeader ? Environment.NewLine : "",
|
||||
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
|
||||
inHeader ? "" : Environment.NewLine)
|
||||
: "";
|
||||
}
|
||||
}
|
||||
|
||||
public class TypeMapper
|
||||
{
|
||||
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
|
||||
|
||||
private readonly System.Collections.IList _errors;
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
ArgumentNotNull(errors, "errors");
|
||||
|
||||
_code = code;
|
||||
_ef = ef;
|
||||
_errors = errors;
|
||||
}
|
||||
|
||||
public static string FixNamespaces(string typeName)
|
||||
{
|
||||
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, string modelNamespace)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
|
||||
{
|
||||
if (edmType == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var collectionType = edmType as CollectionType;
|
||||
if (collectionType != null)
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
|
||||
}
|
||||
|
||||
var typeName = _code.Escape(edmType.MetadataProperties
|
||||
.Where(p => p.Name == ExternalTypeNameAttributeName)
|
||||
.Select(p => (string)p.Value)
|
||||
.FirstOrDefault())
|
||||
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
|
||||
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
|
||||
_code.Escape(edmType));
|
||||
|
||||
if (edmType is StructuralType)
|
||||
{
|
||||
return typeName;
|
||||
}
|
||||
|
||||
if (edmType is SimpleType)
|
||||
{
|
||||
var clrType = UnderlyingClrType(edmType);
|
||||
if (!IsEnumType(edmType))
|
||||
{
|
||||
typeName = _code.Escape(clrType);
|
||||
}
|
||||
|
||||
typeName = FixNamespaces(typeName);
|
||||
|
||||
return clrType.IsValueType && isNullable == true ?
|
||||
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
|
||||
typeName;
|
||||
}
|
||||
|
||||
throw new ArgumentException("edmType");
|
||||
}
|
||||
|
||||
public Type UnderlyingClrType(EdmType edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
var primitiveType = edmType as PrimitiveType;
|
||||
if (primitiveType != null)
|
||||
{
|
||||
return primitiveType.ClrEquivalentType;
|
||||
}
|
||||
|
||||
if (IsEnumType(edmType))
|
||||
{
|
||||
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
|
||||
}
|
||||
|
||||
return typeof(object);
|
||||
}
|
||||
|
||||
public object GetEnumMemberValue(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var valueProperty = enumMember.GetType().GetProperty("Value");
|
||||
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public string GetEnumMemberName(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var nameProperty = enumMember.GetType().GetProperty("Name");
|
||||
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var membersProperty = enumType.GetType().GetProperty("Members");
|
||||
return membersProperty != null
|
||||
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
|
||||
: Enumerable.Empty<MetadataItem>();
|
||||
}
|
||||
|
||||
public bool EnumIsFlags(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
|
||||
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public bool IsEnumType(GlobalItem edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
return edmType.GetType().Name == "EnumType";
|
||||
}
|
||||
|
||||
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public string CreateLiteral(object value)
|
||||
{
|
||||
if (value == null || value.GetType() != typeof(TimeSpan))
|
||||
{
|
||||
return _code.CreateLiteral(value);
|
||||
}
|
||||
|
||||
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
|
||||
}
|
||||
|
||||
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
|
||||
{
|
||||
ArgumentNotNull(types, "types");
|
||||
ArgumentNotNull(sourceFile, "sourceFile");
|
||||
|
||||
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
|
||||
if (types.Any(item => !hash.Add(item)))
|
||||
{
|
||||
_errors.Add(
|
||||
new CompilerError(sourceFile, -1, -1, "6023",
|
||||
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return GetItemsToGenerate<SimpleType>(itemCollection)
|
||||
.Where(e => IsEnumType(e));
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
|
||||
{
|
||||
return itemCollection
|
||||
.OfType<T>()
|
||||
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
|
||||
.OrderBy(i => i.Name);
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return itemCollection
|
||||
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
|
||||
.Select(g => GetGlobalItemName(g));
|
||||
}
|
||||
|
||||
public string GetGlobalItemName(GlobalItem item)
|
||||
{
|
||||
if (item is EdmType)
|
||||
{
|
||||
return ((EdmType)item).Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((EntityContainer)item).Name;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
|
||||
}
|
||||
|
||||
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
|
||||
return returnParamsProperty == null
|
||||
? edmFunction.ReturnParameter
|
||||
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
|
||||
}
|
||||
|
||||
public bool IsComposable(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
|
||||
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
|
||||
}
|
||||
|
||||
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
|
||||
{
|
||||
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
}
|
||||
|
||||
public TypeUsage GetReturnType(EdmFunction edmFunction)
|
||||
{
|
||||
var returnParam = GetReturnParameter(edmFunction);
|
||||
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
|
||||
}
|
||||
|
||||
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
|
||||
{
|
||||
var returnType = GetReturnType(edmFunction);
|
||||
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ArgumentNotNull<T>(T arg, string name) where T : class
|
||||
{
|
||||
if (arg == null)
|
||||
{
|
||||
throw new ArgumentNullException(name);
|
||||
}
|
||||
}
|
||||
#>
|
||||
@@ -1,70 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><Database Name="EE" Class="DataClasses1DataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
|
||||
<Connection Mode="AppSettings" ConnectionString="Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser" SettingsObjectName="Project.Properties.Settings" SettingsPropertyName="gwcs" Provider="System.Data.SqlClient" />
|
||||
<Table Name="dbo.UserGroup" Member="UserGroup">
|
||||
<Type Name="UserGroup">
|
||||
<Column Name="dept" Type="System.String" DbType="VarChar(100) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
|
||||
<Column Name="gcode" Type="System.String" DbType="VarChar(10)" CanBeNull="true" />
|
||||
<Column Name="path_kj" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
|
||||
<Column Name="advpurchase" Type="System.Boolean" DbType="Bit" CanBeNull="true" />
|
||||
<Column Name="permission" Type="System.Int32" DbType="Int" CanBeNull="true" />
|
||||
</Type>
|
||||
</Table>
|
||||
<Table Name="dbo.vGroupUser" Member="vGroupUser">
|
||||
<Type Name="vGroupUser">
|
||||
<Column Name="gcode" Type="System.String" DbType="VarChar(10) NOT NULL" CanBeNull="false" />
|
||||
<Column Name="[level]" Member="level" Type="System.Int16" DbType="SmallInt" CanBeNull="true" />
|
||||
<Column Name="name" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
|
||||
<Column Name="nameE" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
|
||||
<Column Name="dept" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
|
||||
<Column Name="grade" Type="System.String" DbType="VarChar(10)" CanBeNull="true" />
|
||||
<Column Name="email" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
|
||||
<Column Name="tel" Type="System.String" DbType="VarChar(20)" CanBeNull="true" />
|
||||
<Column Name="indate" Type="System.String" DbType="VarChar(20)" CanBeNull="true" />
|
||||
<Column Name="outdate" Type="System.String" DbType="VarChar(20)" CanBeNull="true" />
|
||||
<Column Name="hp" Type="System.String" DbType="VarChar(20)" CanBeNull="true" />
|
||||
<Column Name="place" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
|
||||
<Column Name="ads_employNo" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
|
||||
<Column Name="ads_title" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
|
||||
<Column Name="ads_created" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
|
||||
<Column Name="memo" Type="System.String" DbType="NVarChar(255)" CanBeNull="true" />
|
||||
<Column Name="processs" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
|
||||
<Column Name="id" Type="System.String" DbType="VarChar(20)" CanBeNull="true" />
|
||||
</Type>
|
||||
</Table>
|
||||
<Table Name="dbo.Users" Member="Users">
|
||||
<Type Name="Users">
|
||||
<Column Name="id" Type="System.String" DbType="VarChar(20) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
|
||||
<Column Name="gcode" Type="System.String" DbType="VarChar(10)" CanBeNull="true" />
|
||||
<Column Name="password" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
|
||||
<Column Name="nameE" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
|
||||
<Column Name="name" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
|
||||
<Column Name="dept" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
|
||||
<Column Name="grade" Type="System.String" DbType="VarChar(10)" CanBeNull="true" />
|
||||
<Column Name="email" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
|
||||
<Column Name="[level]" Member="level" Type="System.Int16" DbType="SmallInt" CanBeNull="true" />
|
||||
<Column Name="indate" Type="System.String" DbType="VarChar(20)" CanBeNull="true" />
|
||||
<Column Name="outdate" Type="System.String" DbType="VarChar(20)" CanBeNull="true" />
|
||||
<Column Name="tel" Type="System.String" DbType="VarChar(20)" CanBeNull="true" />
|
||||
<Column Name="hp" Type="System.String" DbType="VarChar(20)" CanBeNull="true" />
|
||||
<Column Name="place" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
|
||||
<Column Name="ads_employNo" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
|
||||
<Column Name="ads_title" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
|
||||
<Column Name="ads_created" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
|
||||
<Column Name="memo" Type="System.String" DbType="NVarChar(255)" CanBeNull="true" />
|
||||
<Column Name="wuid" Type="System.String" DbType="VarChar(20) NOT NULL" CanBeNull="false" />
|
||||
<Column Name="wdate" Type="System.DateTime" DbType="SmallDateTime NOT NULL" CanBeNull="false" />
|
||||
<Column Name="processs" Type="System.String" DbType="NVarChar(100)" CanBeNull="true" />
|
||||
</Type>
|
||||
</Table>
|
||||
<Table Name="dbo.EETGW_GroupUser" Member="EETGW_GroupUser">
|
||||
<Type Name="EETGW_GroupUser">
|
||||
<Column Name="idx" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
|
||||
<Column Name="gcode" Type="System.String" DbType="VarChar(10) NOT NULL" CanBeNull="false" />
|
||||
<Column Name="uid" Type="System.String" DbType="VarChar(20) NOT NULL" CanBeNull="false" />
|
||||
<Column Name="[level]" Member="level" Type="System.Int16" DbType="SmallInt" CanBeNull="true" />
|
||||
<Column Name="Process" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
|
||||
<Column Name="wuid" Type="System.String" DbType="VarChar(20) NOT NULL" CanBeNull="false" />
|
||||
<Column Name="wdate" Type="System.DateTime" DbType="SmallDateTime NOT NULL" CanBeNull="false" />
|
||||
</Type>
|
||||
</Table>
|
||||
</Database>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 11, 8.5" name="DataClasses1">
|
||||
<DataContextMoniker Name="/DataClasses1DataContext" />
|
||||
<nestedChildShapes>
|
||||
<classShape Id="486a7958-9de9-4b1b-b914-8d09e15675ba" absoluteBounds="3, 1.125, 2, 1.7708968098958331">
|
||||
<DataClassMoniker Name="/DataClasses1DataContext/UserGroup" />
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="4a357cd8-d050-4b32-958a-c51511d5a1b5" absoluteBounds="3.015, 1.585, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</classShape>
|
||||
<classShape Id="838b3622-14a7-484e-ba99-0c14d626efcb" absoluteBounds="5.5, 1.5, 2, 4.2708154296875">
|
||||
<DataClassMoniker Name="/DataClasses1DataContext/vGroupUser" />
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="8dd6b41e-f39d-4833-a216-88cdea23b90b" absoluteBounds="5.515, 1.96, 1.9700000000000002, 3.7108154296875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</classShape>
|
||||
<classShape Id="e31194d4-dbfc-43be-a990-631a80608c92" absoluteBounds="0.875, 1.625, 2, 4.8477197265625">
|
||||
<DataClassMoniker Name="/DataClasses1DataContext/Users" />
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="52fa12b5-277e-4bfd-9f56-b4ab546c5ba6" absoluteBounds="0.89000000000000012, 2.085, 1.9700000000000002, 4.2877197265625" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</classShape>
|
||||
<classShape Id="67aa0d78-d2b2-48d3-8222-95fb2aa74729" absoluteBounds="3.375, 3.375, 2, 2.1554996744791666">
|
||||
<DataClassMoniker Name="/DataClasses1DataContext/EETGW_GroupUser" />
|
||||
<nestedChildShapes>
|
||||
<elementListCompartment Id="37147d17-6849-4a80-9c7c-bce471e8fdd5" absoluteBounds="3.39, 3.835, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
|
||||
</nestedChildShapes>
|
||||
</classShape>
|
||||
</nestedChildShapes>
|
||||
</ordesignerObjectsDiagram>
|
||||
1346
Project/DataClasses1.designer.cs
generated
1346
Project/DataClasses1.designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -124,6 +124,12 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\DLL\ArSetting.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FarPoint.Localization, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457, processorArchitecture=MSIL" />
|
||||
<Reference Include="FarPoint.Win, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457, processorArchitecture=MSIL" />
|
||||
<Reference Include="FarPoint.Win.Spread, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457, processorArchitecture=MSIL" />
|
||||
@@ -134,12 +140,15 @@
|
||||
<Reference Include="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
|
||||
<Reference Include="Microsoft.ReportViewer.WinForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.Linq" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
@@ -157,12 +166,22 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CResult.cs" />
|
||||
<Compile Include="DataClasses1.designer.cs">
|
||||
<Compile Include="AdoNetEFMain.Context.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DataClasses1.dbml</DependentUpon>
|
||||
<DependentUpon>AdoNetEFMain.Context.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AdoNetEFMain.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AdoNetEFMain.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AdoNetEFMain.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AdoNetEFMain.edmx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CResult.cs" />
|
||||
<Compile Include="DataSet1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -227,6 +246,9 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DsPMPDatabase.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EETGW_GroupUser.cs">
|
||||
<DependentUpon>AdoNetEFMain.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="fLog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -252,6 +274,15 @@
|
||||
<Compile Include="MessageWindow.cs" />
|
||||
<Compile Include="MethodExtentions.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="UserGroup.cs">
|
||||
<DependentUpon>AdoNetEFMain.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Users.cs">
|
||||
<DependentUpon>AdoNetEFMain.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="vGroupUser.cs">
|
||||
<DependentUpon>AdoNetEFMain.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="_Common\fADSUserList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -378,15 +409,14 @@
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<EntityDeploy Include="AdoNetEFMain.edmx">
|
||||
<Generator>EntityModelCodeGenerator</Generator>
|
||||
<LastGenOutput>AdoNetEFMain.Designer.cs</LastGenOutput>
|
||||
</EntityDeploy>
|
||||
<None Include="AdoNetEFMain.edmx.diagram">
|
||||
<DependentUpon>AdoNetEFMain.edmx</DependentUpon>
|
||||
</None>
|
||||
<None Include="app.config" />
|
||||
<None Include="DataClasses1.dbml">
|
||||
<Generator>MSLinqToSQLGenerator</Generator>
|
||||
<LastGenOutput>DataClasses1.designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="DataClasses1.dbml.layout">
|
||||
<DependentUpon>DataClasses1.dbml</DependentUpon>
|
||||
</None>
|
||||
<None Include="DataSet1.xsc">
|
||||
<DependentUpon>DataSet1.xsd</DependentUpon>
|
||||
</None>
|
||||
@@ -420,6 +450,7 @@
|
||||
<None Include="DsPMPDatabase.xss">
|
||||
<DependentUpon>DsPMPDatabase.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\app.manifest" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
@@ -435,6 +466,16 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AdoNetEFMain.Context.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<DependentUpon>AdoNetEFMain.edmx</DependentUpon>
|
||||
<LastGenOutput>AdoNetEFMain.Context.cs</LastGenOutput>
|
||||
</Content>
|
||||
<Content Include="AdoNetEFMain.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<DependentUpon>AdoNetEFMain.edmx</DependentUpon>
|
||||
<LastGenOutput>AdoNetEFMain.cs</LastGenOutput>
|
||||
</Content>
|
||||
<Content Include="History.txt" />
|
||||
<Content Include="icons8-realtime-64.ico" />
|
||||
<Content Include="libxl.dll">
|
||||
@@ -509,6 +550,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}" />
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
25
Project/EETGW_GroupUser.cs
Normal file
25
Project/EETGW_GroupUser.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Project
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class EETGW_GroupUser
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string uid { get; set; }
|
||||
public Nullable<short> level { get; set; }
|
||||
public string Process { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
|
||||
// 지정되도록 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("20.10.27.1200")]
|
||||
[assembly: AssemblyFileVersion("20.10.27.1200")]
|
||||
[assembly: AssemblyVersion("20.10.29.1100")]
|
||||
[assembly: AssemblyFileVersion("20.10.29.1100")]
|
||||
|
||||
14
Project/Properties/Settings.Designer.cs
generated
14
Project/Properties/Settings.Designer.cs
generated
@@ -34,20 +34,6 @@ namespace Project.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("using System; \r\nnamespace HelloWorld \r\n{ \r\n public static class HelloWorldCla" +
|
||||
"ss \r\n { \r\n public static string test() \r\n { \r\n " +
|
||||
" return {0};\r\n } \r\n } \r\n};")]
|
||||
public string nilliila {
|
||||
get {
|
||||
return ((string)(this["nilliila"]));
|
||||
}
|
||||
set {
|
||||
this["nilliila"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||
|
||||
@@ -10,19 +10,6 @@
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!</Value>
|
||||
</Setting>
|
||||
<Setting Name="nilliila" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">using System;
|
||||
namespace HelloWorld
|
||||
{
|
||||
public static class HelloWorldClass
|
||||
{
|
||||
public static string test()
|
||||
{
|
||||
return {0};
|
||||
}
|
||||
}
|
||||
};</Value>
|
||||
</Setting>
|
||||
<Setting Name="PMPCS" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
23
Project/UserGroup.cs
Normal file
23
Project/UserGroup.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Project
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class UserGroup
|
||||
{
|
||||
public string dept { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string path_kj { get; set; }
|
||||
public Nullable<bool> advpurchase { get; set; }
|
||||
public Nullable<int> permission { get; set; }
|
||||
}
|
||||
}
|
||||
39
Project/Users.cs
Normal file
39
Project/Users.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Project
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Users
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string password { get; set; }
|
||||
public string nameE { get; set; }
|
||||
public string name { get; set; }
|
||||
public string dept { get; set; }
|
||||
public string grade { get; set; }
|
||||
public string email { get; set; }
|
||||
public Nullable<short> level { get; set; }
|
||||
public string indate { get; set; }
|
||||
public string outdate { get; set; }
|
||||
public string tel { get; set; }
|
||||
public string hp { get; set; }
|
||||
public string place { get; set; }
|
||||
public string ads_employNo { get; set; }
|
||||
public string ads_title { get; set; }
|
||||
public string ads_created { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
public string processs { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ namespace Project._Common
|
||||
return;
|
||||
}
|
||||
|
||||
var db = new DataClasses1DataContext();
|
||||
var db = new EEEntitiesMain();
|
||||
var dr_user = db.Users.Where(t => t.id == id).FirstOrDefault();
|
||||
if (dr_user == null)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ namespace Project._Common
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Validate();
|
||||
var db = new DataClasses1DataContext();
|
||||
var db = new EEEntitiesMain();
|
||||
|
||||
//해당 그룹에 데이터를 추가한다.
|
||||
var drDept = db.UserGroup.Where(t => t.dept == tbDept.Text).FirstOrDefault();
|
||||
@@ -98,11 +98,12 @@ namespace Project._Common
|
||||
drGuser.uid = this.tbId.Text.Trim();
|
||||
|
||||
drGuser.Process = this.tbProcess.Text.Trim();
|
||||
db.EETGW_GroupUser.InsertOnSubmit(drGuser);
|
||||
//db.EETGW_GroupUser.InsertOnSubmit(drGuser);
|
||||
db.EETGW_GroupUser.Add(drGuser);
|
||||
}
|
||||
|
||||
//사용자 목록에 없다면 추가한다
|
||||
var drUser = db.Users.Where(t => t.id == tbId.Text.Trim()).FirstOrDefault();
|
||||
var drUser = db.Users.SingleOrDefault(t => t.id == tbId.Text.Trim());
|
||||
if(drUser == null)
|
||||
{
|
||||
drUser = new Users();
|
||||
@@ -122,7 +123,7 @@ namespace Project._Common
|
||||
drUser.outdate = tbDateO.Text;
|
||||
drUser.memo = tbMemo.Text;
|
||||
drUser.processs = tbProcess.Text;
|
||||
db.Users.InsertOnSubmit(drUser);
|
||||
db.Users.Add(drUser);
|
||||
}
|
||||
|
||||
else
|
||||
@@ -138,7 +139,7 @@ namespace Project._Common
|
||||
drUser.memo = tbMemo.Text;
|
||||
drUser.processs = tbProcess.Text;
|
||||
}
|
||||
db.SubmitChanges();
|
||||
db.SaveChanges();
|
||||
this.DialogResult = DialogResult.OK;
|
||||
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Project._Common
|
||||
}
|
||||
|
||||
//부서목록 업데이트
|
||||
var db = new DataClasses1DataContext();
|
||||
var db = new EEEntitiesMain();
|
||||
var GrpList = db.UserGroup.Where(t => t.gcode != null && t.permission != null && t.gcode != "" && t.permission > 0);
|
||||
|
||||
//var tagrp = new dsMSSQLTableAdapters.UserGroupTableAdapter();
|
||||
@@ -176,7 +176,7 @@ namespace Project._Common
|
||||
if (tbProcess.Text.Trim() == "") tbProcess.Text = "%";
|
||||
this.dsMSSQL.Users.Clear();
|
||||
|
||||
var db = new DataClasses1DataContext();
|
||||
var db = new EEEntitiesMain();
|
||||
if (tbProcess.Text.Trim() != "" && tbProcess.Text.Trim() != "%")
|
||||
this.bs.DataSource = db.vGroupUser.Where(t => t.dept == this.cmbdept.Text && t.processs.Contains(tbProcess.Text.Trim()));
|
||||
else
|
||||
|
||||
@@ -1,43 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="Project.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="Project.Properties.Settings.gwcs" connectionString="Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!"
|
||||
providerName="System.Data.SqlClient" />
|
||||
<add name="Project.Properties.Settings.PMPCS" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Temp\PMP\SPMaster.mdb"
|
||||
providerName="System.Data.OleDb" />
|
||||
</connectionStrings>
|
||||
<userSettings>
|
||||
<Project.Properties.Settings>
|
||||
<setting name="nilliila" serializeAs="String">
|
||||
<value>using System;
|
||||
namespace HelloWorld
|
||||
{
|
||||
public static class HelloWorldClass
|
||||
{
|
||||
public static string test()
|
||||
{
|
||||
return {0};
|
||||
}
|
||||
}
|
||||
};</value>
|
||||
</setting>
|
||||
</Project.Properties.Settings>
|
||||
</userSettings>
|
||||
<add name="Project.Properties.Settings.gwcs" connectionString="Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!" providerName="System.Data.SqlClient" />
|
||||
<add name="Project.Properties.Settings.PMPCS" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Temp\PMP\SPMaster.mdb" providerName="System.Data.OleDb" /><add name="EEEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=10.131.15.18;initial catalog=EE;persist security info=True;user id=eeuser;password=Amkor123!;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /><add name="EEEntities1" connectionString="metadata=res://*/ModelMain.csdl|res://*/ModelMain.ssdl|res://*/ModelMain.msl;provider=System.Data.SqlClient;provider connection string="data source=10.131.15.18;initial catalog=EE;user id=eeuser;password=Amkor123!;connect timeout=30;encrypt=False;trustservercertificate=False;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /><add name="EEEntitiesMain" connectionString="metadata=res://*/AdoNetEFMain.csdl|res://*/AdoNetEFMain.ssdl|res://*/AdoNetEFMain.msl;provider=System.Data.SqlClient;provider connection string="data source=10.131.15.18;initial catalog=EE;user id=eeuser;password=Amkor123!;connect timeout=30;encrypt=False;trustservercertificate=False;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /></connectionStrings>
|
||||
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0"/>
|
||||
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0"/>
|
||||
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup></configuration>
|
||||
|
||||
5
Project/packages.config
Normal file
5
Project/packages.config
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.2.0" targetFramework="net45" />
|
||||
<package id="EntityFramework.ko" version="6.2.0" targetFramework="net45" />
|
||||
</packages>
|
||||
36
Project/vGroupUser.cs
Normal file
36
Project/vGroupUser.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Project
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class vGroupUser
|
||||
{
|
||||
public string gcode { get; set; }
|
||||
public string dept { get; set; }
|
||||
public Nullable<short> level { get; set; }
|
||||
public string name { get; set; }
|
||||
public string nameE { get; set; }
|
||||
public string grade { get; set; }
|
||||
public string email { get; set; }
|
||||
public string tel { get; set; }
|
||||
public string indate { get; set; }
|
||||
public string outdate { get; set; }
|
||||
public string hp { get; set; }
|
||||
public string place { get; set; }
|
||||
public string ads_employNo { get; set; }
|
||||
public string ads_title { get; set; }
|
||||
public string ads_created { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string processs { get; set; }
|
||||
public string id { get; set; }
|
||||
}
|
||||
}
|
||||
BIN
ReportForUser.xlsx
Normal file
BIN
ReportForUser.xlsx
Normal file
Binary file not shown.
28
SubProject/FPJ0000/Common.cs
Normal file
28
SubProject/FPJ0000/Common.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Common
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string grp { get; set; }
|
||||
public string code { get; set; }
|
||||
public string svalue { get; set; }
|
||||
public Nullable<int> ivalue { get; set; }
|
||||
public Nullable<double> fvalue { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,12 @@
|
||||
<Reference Include="ArSetting.Net4">
|
||||
<HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\EntityFramework.6.2.0\lib\net40\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\EntityFramework.6.2.0\lib\net40\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FarPoint.CalcEngine, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457, processorArchitecture=MSIL" />
|
||||
<Reference Include="FarPoint.Excel, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457, processorArchitecture=MSIL" />
|
||||
<Reference Include="FarPoint.Localization, Version=11.40.20177.0, Culture=neutral, PublicKeyToken=327c3516b1b18457, processorArchitecture=MSIL" />
|
||||
@@ -80,8 +86,11 @@
|
||||
<HintPath>..\..\packages\RichTextBoxEx.1.0.0\lib\RichTextBoxEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
@@ -99,6 +108,9 @@
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Common.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataBaseManager.cs" />
|
||||
<Compile Include="dsMail.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -143,6 +155,9 @@
|
||||
<Compile Include="fMailList.Designer.cs">
|
||||
<DependentUpon>fMailList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HolidayLIst.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="JobReport\fJobChartMenu.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -155,6 +170,27 @@
|
||||
<Compile Include="JobReport\rJobChart.Designer.cs">
|
||||
<DependentUpon>rJobChart.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="JobReport\rJobReportUser.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="JobReport\rJobReportUser.Designer.cs">
|
||||
<DependentUpon>rJobReportUser.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model1.Context.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Model1.Context.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model1.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Model1.edmx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Note\fNote.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -297,6 +333,24 @@
|
||||
<DependentUpon>fProjectPartImport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="UserGroup.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Users.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="vGroupUser.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="vHoliday_uselist.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="vJobReportForUser.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="vUserWorkTimeList.cs">
|
||||
<DependentUpon>Model1.tt</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="fHistAdd.resx">
|
||||
<DependentUpon>fHistAdd.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -313,6 +367,9 @@
|
||||
<EmbeddedResource Include="JobReport\rJobChart.resx">
|
||||
<DependentUpon>rJobChart.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="JobReport\rJobReportUser.resx">
|
||||
<DependentUpon>rJobReportUser.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Note\fNote.resx">
|
||||
<DependentUpon>fNote.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -452,6 +509,13 @@
|
||||
<None Include="dsReport.xss">
|
||||
<DependentUpon>dsReport.xsd</DependentUpon>
|
||||
</None>
|
||||
<EntityDeploy Include="Model1.edmx">
|
||||
<Generator>EntityModelCodeGenerator</Generator>
|
||||
<LastGenOutput>Model1.Designer.cs</LastGenOutput>
|
||||
</EntityDeploy>
|
||||
<None Include="Model1.edmx.diagram">
|
||||
<DependentUpon>Model1.edmx</DependentUpon>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
@@ -482,6 +546,9 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReportForUser.xlsx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Resources\accept.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -496,6 +563,21 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\action_refresh.gif" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Model1.Context.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>Model1.Context.cs</LastGenOutput>
|
||||
<DependentUpon>Model1.edmx</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Model1.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<DependentUpon>Model1.edmx</DependentUpon>
|
||||
<LastGenOutput>Model1.cs</LastGenOutput>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
24
SubProject/FPJ0000/HolidayLIst.cs
Normal file
24
SubProject/FPJ0000/HolidayLIst.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class HolidayLIst
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string pdate { get; set; }
|
||||
public Nullable<bool> free { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
146
SubProject/FPJ0000/JobReport/fJobReport.Designer.cs
generated
146
SubProject/FPJ0000/JobReport/fJobReport.Designer.cs
generated
@@ -38,10 +38,11 @@
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType6 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType7 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType8 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType9 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType2 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType3 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType9 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType10 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
this.bn = new System.Windows.Forms.BindingNavigator(this.components);
|
||||
this.bs = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.dsMSSQL = new FPJ0000.dsPRJ();
|
||||
@@ -66,6 +67,7 @@
|
||||
this.btReport = new System.Windows.Forms.ToolStripButton();
|
||||
this.btReportDay = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
|
||||
this.cm = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.columnSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.autoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -137,15 +139,16 @@
|
||||
this.btFind,
|
||||
this.btReport,
|
||||
this.btReportDay,
|
||||
this.toolStripButton1});
|
||||
this.bn.Location = new System.Drawing.Point(0, 564);
|
||||
this.toolStripButton1,
|
||||
this.toolStripButton3});
|
||||
this.bn.Location = new System.Drawing.Point(0, 607);
|
||||
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
|
||||
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
|
||||
this.bn.MoveNextItem = this.bindingNavigatorMoveNextItem;
|
||||
this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
|
||||
this.bn.Name = "bn";
|
||||
this.bn.PositionItem = this.bindingNavigatorPositionItem;
|
||||
this.bn.Size = new System.Drawing.Size(1142, 25);
|
||||
this.bn.Size = new System.Drawing.Size(1240, 25);
|
||||
this.bn.TabIndex = 0;
|
||||
this.bn.Text = "bindingNavigator1";
|
||||
//
|
||||
@@ -329,6 +332,16 @@
|
||||
this.toolStripButton1.Text = "작업분포";
|
||||
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
|
||||
//
|
||||
// toolStripButton3
|
||||
//
|
||||
this.toolStripButton3.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||
this.toolStripButton3.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton3.Image")));
|
||||
this.toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButton3.Name = "toolStripButton3";
|
||||
this.toolStripButton3.Size = new System.Drawing.Size(111, 22);
|
||||
this.toolStripButton3.Text = "적정인원보고서";
|
||||
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click);
|
||||
//
|
||||
// cm
|
||||
//
|
||||
this.cm.Font = new System.Drawing.Font("맑은 고딕", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
@@ -475,7 +488,7 @@
|
||||
this.fpSpread1.Name = "fpSpread1";
|
||||
this.fpSpread1.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] {
|
||||
this.fpSpread1_Sheet1});
|
||||
this.fpSpread1.Size = new System.Drawing.Size(1142, 467);
|
||||
this.fpSpread1.Size = new System.Drawing.Size(1240, 510);
|
||||
this.fpSpread1.StatusBarVisible = true;
|
||||
this.fpSpread1.TabIndex = 2;
|
||||
//
|
||||
@@ -485,22 +498,23 @@
|
||||
this.fpSpread1_Sheet1.SheetName = "Sheet1";
|
||||
// Formulas and custom names must be loaded with R1C1 reference style
|
||||
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1;
|
||||
this.fpSpread1_Sheet1.ColumnCount = 12;
|
||||
this.fpSpread1_Sheet1.ColumnCount = 13;
|
||||
this.fpSpread1_Sheet1.ActiveColumnIndex = -1;
|
||||
this.fpSpread1_Sheet1.ActiveRowIndex = -1;
|
||||
this.fpSpread1_Sheet1.AutoGenerateColumns = false;
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 0).Value = "날짜";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 1).Value = "WW";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 2).Value = "요청부서";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 3).Value = "패키지";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 4).Value = "상태";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 5).Value = "업무형태";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 6).Value = "업무분류";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 7).Value = "프로젝트(아이템)";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 8).Value = "*";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 9).Value = "시간";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 10).Value = "초과";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 11).Value = "비고";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 2).Value = "담당";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 3).Value = "요청부서";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 4).Value = "패키지";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 5).Value = "상태";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 6).Value = "업무형태";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 7).Value = "업무분류";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 8).Value = "프로젝트(아이템)";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 9).Value = "*";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 10).Value = "시간";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 11).Value = "초과";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 12).Value = "비고";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Rows.Get(0).Height = 28F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).CellType = textCellType1;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).DataField = "pdate";
|
||||
@@ -512,66 +526,71 @@
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).Label = "WW";
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType3;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).DataField = "requestpart";
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).Label = "요청부서";
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).Width = 78F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).DataField = "username";
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).Label = "담당";
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).CellType = textCellType4;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).DataField = "package";
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).Label = "패키지";
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).Width = 86F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).DataField = "requestpart";
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).Label = "요청부서";
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).Width = 78F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType5;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).DataField = "status";
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).Label = "상태";
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).DataField = "package";
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).Label = "패키지";
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).Width = 86F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType6;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).DataField = "type";
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).Label = "업무형태";
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).Width = 84F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).DataField = "status";
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).Label = "상태";
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).CellType = textCellType7;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).DataField = "process";
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).Label = "업무분류";
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).Width = 80F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).DataField = "type";
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).Label = "업무형태";
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).Width = 84F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).CellType = textCellType8;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).DataField = "projectName";
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).Label = "프로젝트(아이템)";
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).Width = 158F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).DataField = "process";
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).Label = "업무분류";
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).Width = 80F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).AllowAutoFilter = true;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).CellType = textCellType9;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).DataField = "projectName";
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Label = "프로젝트(아이템)";
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Width = 158F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
numberCellType1.DecimalPlaces = 0;
|
||||
numberCellType1.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
|
||||
numberCellType1.MaximumValue = 2147483647D;
|
||||
numberCellType1.MinimumValue = -2147483648D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).CellType = numberCellType1;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).DataField = "pidx";
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Label = "*";
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Tag = "pidx";
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Width = 39F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).CellType = numberCellType1;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).DataField = "pidx";
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Label = "*";
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Tag = "pidx";
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Width = 39F;
|
||||
numberCellType2.MaximumValue = 999999999999999D;
|
||||
numberCellType2.MinimumValue = -999999999999999D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).CellType = numberCellType2;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).DataField = "hrs";
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Label = "시간";
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Width = 52F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).CellType = numberCellType2;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).DataField = "hrs";
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).Label = "시간";
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).Width = 52F;
|
||||
numberCellType3.MaximumValue = 999999999999999D;
|
||||
numberCellType3.MinimumValue = -999999999999999D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).CellType = numberCellType3;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).DataField = "ot";
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).ForeColor = System.Drawing.Color.Red;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).Label = "초과";
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).CellType = textCellType9;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).DataField = "description";
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).Label = "비고";
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).CellType = numberCellType3;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).DataField = "ot";
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).ForeColor = System.Drawing.Color.Red;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).Label = "초과";
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).Width = 113F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).CellType = textCellType10;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).DataField = "description";
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).Label = "비고";
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).Width = 113F;
|
||||
this.fpSpread1_Sheet1.DataAutoSizeColumns = false;
|
||||
this.fpSpread1_Sheet1.DataSource = this.bs;
|
||||
this.fpSpread1_Sheet1.RowHeader.Columns.Default.Resizable = false;
|
||||
@@ -595,7 +614,7 @@
|
||||
this.toolStripButton2});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(1142, 37);
|
||||
this.toolStrip1.Size = new System.Drawing.Size(1240, 37);
|
||||
this.toolStrip1.TabIndex = 4;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
@@ -694,10 +713,10 @@
|
||||
this.richTextBox1.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.richTextBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "description", true));
|
||||
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.richTextBox1.Location = new System.Drawing.Point(0, 504);
|
||||
this.richTextBox1.Location = new System.Drawing.Point(0, 547);
|
||||
this.richTextBox1.Name = "richTextBox1";
|
||||
this.richTextBox1.ReadOnly = true;
|
||||
this.richTextBox1.Size = new System.Drawing.Size(1142, 60);
|
||||
this.richTextBox1.Size = new System.Drawing.Size(1240, 60);
|
||||
this.richTextBox1.TabIndex = 5;
|
||||
this.richTextBox1.Text = "";
|
||||
//
|
||||
@@ -705,7 +724,7 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1142, 589);
|
||||
this.ClientSize = new System.Drawing.Size(1240, 632);
|
||||
this.Controls.Add(this.fpSpread1);
|
||||
this.Controls.Add(this.richTextBox1);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
@@ -784,9 +803,10 @@
|
||||
private System.Windows.Forms.ToolStripButton btReportDay;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton2;
|
||||
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
|
||||
private System.Windows.Forms.ToolStripLabel toolStripLabel1;
|
||||
private System.Windows.Forms.ToolStripComboBox cmbProcess;
|
||||
private System.Windows.Forms.RichTextBox richTextBox1;
|
||||
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton3;
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,7 @@ namespace FPJ0000
|
||||
{
|
||||
//담당자목록 - 사용자목록으로 처리한다.
|
||||
this.cmbUser.Items.Clear();
|
||||
this.cmbUser.Items.Add("-- 전체 --");
|
||||
var taUserList = new dsReportTableAdapters.ProcessUserListTableAdapter();
|
||||
|
||||
var processStr = "%";
|
||||
@@ -74,7 +75,7 @@ namespace FPJ0000
|
||||
UpdateUserList(); //현재사용자의 이름을 반환한다
|
||||
cmbUser.Text = namestr;
|
||||
|
||||
if(cmbUser.SelectedIndex < 0)
|
||||
if (cmbUser.SelectedIndex < 0)
|
||||
{
|
||||
//내 아이템이 없다면, 목록을 추가해서 선택해줘야 한다
|
||||
this.cmbUser.Items.Add(namestr);
|
||||
@@ -200,7 +201,7 @@ namespace FPJ0000
|
||||
FCOMMON.Util.MsgE("담당자가 선택되지 않았습니다.");
|
||||
return;
|
||||
}
|
||||
if (cmbUser.Text.IndexOf("(") == -1 || cmbUser.Text.IndexOf(")") == -1)
|
||||
if (cmbUser.SelectedIndex > 0 && ( cmbUser.Text.IndexOf("(") == -1 || cmbUser.Text.IndexOf(")") == -1))
|
||||
{
|
||||
FCOMMON.Util.MsgE("담당자 번호를 확인할 수 없습니다.(문의 T.8567)");
|
||||
return;
|
||||
@@ -208,7 +209,9 @@ namespace FPJ0000
|
||||
string request = cmbUser.Text.Substring(cmbUser.Text.LastIndexOf('(') + 1);
|
||||
request = request.Substring(0, request.Length - 1);
|
||||
|
||||
this.ta.Fill(this.dsMSSQL.JobReport, dtSD.Text, dtED.Text, request,FCOMMON.info.Login.gcode);
|
||||
if (cmbUser.SelectedIndex == 0) request = "%"; //전체검색 201028 - chi(임현대)
|
||||
|
||||
this.ta.Fill(this.dsMSSQL.JobReport, dtSD.Text, dtED.Text, request, FCOMMON.info.Login.gcode);
|
||||
RefreshTime();
|
||||
FPUtil.ColSizeLoad(ref this.fpSpread1, fn_fpcolsize);
|
||||
FormattingData();
|
||||
@@ -396,7 +399,7 @@ namespace FPJ0000
|
||||
var drv = this.bs.Current as DataRowView;
|
||||
if (drv == null) return;
|
||||
var dr = drv.Row as dsPRJ.JobReportRow;
|
||||
if(dr.uid != FCOMMON.info.Login.no && FCOMMON.info.Login.level<5)
|
||||
if (dr.uid != FCOMMON.info.Login.no && FCOMMON.info.Login.level < 5)
|
||||
{
|
||||
FCOMMON.Util.MsgE("타인의 자료는 추가/변경/삭제 할 수 없습니다.");
|
||||
return;
|
||||
@@ -554,6 +557,10 @@ namespace FPJ0000
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
private void toolStripButton3_Click(object sender, EventArgs e)
|
||||
{
|
||||
var f = new JobReport.rJobReportUser();
|
||||
f.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,6 +244,17 @@
|
||||
hB/a9r+CVAG4Auj5g7iA5/1NACaptgIVLHkb0wWVw13ZL60p2+uerqkCJs1mMgwUU6d1k/xJwI10RZj1
|
||||
9TPUN7Wam9dgTMC75QR7TjCBkRQs5Jd1jQS8c1ewtZLTPcQW/peADpC44cudgnjZOQ1OCGjTwkwaGBon
|
||||
GoSrpcVIQqmAj6LZftFBup9vWiUlUQdIDCbsQrsGZRJKBbOXyA++SlEsu6QjvQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVDhPnZIxS8NQFEb7W/wLjh0Fl9a1SxBHBekkWFd1
|
||||
qYg4Ci5dndSCg2AHl4LQSaRSKDqoFUE7VAjUmvTKueWmL2mw2gunL7zmO+/mJhmZoTJusdF868vpXUfO
|
||||
b5/lpPEox9f3SvnsRtk8uojxHQ7HEgSEkXS6vrz3xqtdu+xdfUiheEBsJOGCk/mz/hROUHsIIrp+qIKY
|
||||
hB/a9r+CVAG4Auj5g7iA5/1NACaptgIVLHkb0wWVw13ZL60p2+uerqkCJs1mMgwUU6d1k/xJwI10RZj1
|
||||
9TPUN7Wam9dgTMC75QR7TjCBkRQs5Jd1jQS8c1ewtZLTPcQW/peADpC44cudgnjZOQ1OCGjTwkwaGBon
|
||||
GoSrpcVIQqmAj6LZftFBup9vWiUlUQdIDCbsQrsGZRJKBbOXyA++SlEsu6QjvQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="cm.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
|
||||
@@ -256,7 +256,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -295,7 +294,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -334,7 +332,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -636,7 +633,7 @@
|
||||
</SortExpressions>
|
||||
<Top>13.29972cm</Top>
|
||||
<Height>1.2cm</Height>
|
||||
<Width>19.01255cm</Width>
|
||||
<Width>19.01256cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -653,12 +650,12 @@
|
||||
<GroupExpression>=Fields!type.Value</GroupExpression>
|
||||
</GroupExpressions>
|
||||
</Group>
|
||||
<Label>=Fields!projectName.Value</Label>
|
||||
<SortExpressions>
|
||||
<SortExpression>
|
||||
<Value>=Fields!projectName.Value</Value>
|
||||
</SortExpression>
|
||||
</SortExpressions>
|
||||
<Label>=Fields!projectName.Value</Label>
|
||||
</ChartMember>
|
||||
</ChartMembers>
|
||||
</ChartCategoryHierarchy>
|
||||
@@ -693,6 +690,7 @@
|
||||
</ChartDataPoint>
|
||||
</ChartDataPoints>
|
||||
<Type>Shape</Type>
|
||||
<Subtype>Doughnut</Subtype>
|
||||
<Style />
|
||||
<ChartEmptyPoints>
|
||||
<Style />
|
||||
@@ -703,10 +701,13 @@
|
||||
<Style />
|
||||
</ChartDataLabel>
|
||||
</ChartEmptyPoints>
|
||||
<LegendName>Default</LegendName>
|
||||
<ValueAxisName>Primary</ValueAxisName>
|
||||
<CategoryAxisName>Primary</CategoryAxisName>
|
||||
<ChartSmartLabel>
|
||||
<CalloutLineColor>Black</CalloutLineColor>
|
||||
<ShowOverlapped>true</ShowOverlapped>
|
||||
<MarkerOverlapping>true</MarkerOverlapping>
|
||||
<MinMovingDistance>0pt</MinMovingDistance>
|
||||
</ChartSmartLabel>
|
||||
</ChartSeries>
|
||||
|
||||
220
SubProject/FPJ0000/JobReport/rJobReportUser.Designer.cs
generated
Normal file
220
SubProject/FPJ0000/JobReport/rJobReportUser.Designer.cs
generated
Normal file
@@ -0,0 +1,220 @@
|
||||
namespace FPJ0000.JobReport
|
||||
{
|
||||
partial class rJobReportUser
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.bs = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.dsReport = new FPJ0000.dsReport();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.cmbUser = new System.Windows.Forms.ComboBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.dte = new System.Windows.Forms.DateTimePicker();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.dts = new System.Windows.Forms.DateTimePicker();
|
||||
this.tbProcess = new System.Windows.Forms.ComboBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btRefresh = new System.Windows.Forms.Button();
|
||||
this.ta = new FPJ0000.dsReportTableAdapters.JobReportDayTableAdapter();
|
||||
this.fpSpread1 = new FarPoint.Win.Spread.FpSpread();
|
||||
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dsReport)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// bs
|
||||
//
|
||||
this.bs.DataMember = "JobReportDay";
|
||||
this.bs.DataSource = this.dsReport;
|
||||
//
|
||||
// dsReport
|
||||
//
|
||||
this.dsReport.DataSetName = "dsReport";
|
||||
this.dsReport.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.cmbUser);
|
||||
this.panel1.Controls.Add(this.label4);
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Controls.Add(this.dte);
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
this.panel1.Controls.Add(this.dts);
|
||||
this.panel1.Controls.Add(this.tbProcess);
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
this.panel1.Controls.Add(this.btRefresh);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.panel1.Size = new System.Drawing.Size(1058, 58);
|
||||
this.panel1.TabIndex = 0;
|
||||
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
|
||||
//
|
||||
// cmbUser
|
||||
//
|
||||
this.cmbUser.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbUser.FormattingEnabled = true;
|
||||
this.cmbUser.Location = new System.Drawing.Point(289, 32);
|
||||
this.cmbUser.Name = "cmbUser";
|
||||
this.cmbUser.Size = new System.Drawing.Size(180, 20);
|
||||
this.cmbUser.TabIndex = 11;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(254, 36);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(29, 12);
|
||||
this.label4.TabIndex = 10;
|
||||
this.label4.Text = "사원";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(261, 12);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(14, 12);
|
||||
this.label3.TabIndex = 9;
|
||||
this.label3.Text = "~";
|
||||
//
|
||||
// dte
|
||||
//
|
||||
this.dte.Location = new System.Drawing.Point(289, 8);
|
||||
this.dte.Name = "dte";
|
||||
this.dte.Size = new System.Drawing.Size(180, 21);
|
||||
this.dte.TabIndex = 8;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(10, 12);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(53, 12);
|
||||
this.label2.TabIndex = 7;
|
||||
this.label2.Text = "검색기간";
|
||||
//
|
||||
// dts
|
||||
//
|
||||
this.dts.Location = new System.Drawing.Point(68, 8);
|
||||
this.dts.Name = "dts";
|
||||
this.dts.Size = new System.Drawing.Size(180, 21);
|
||||
this.dts.TabIndex = 6;
|
||||
//
|
||||
// tbProcess
|
||||
//
|
||||
this.tbProcess.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.tbProcess.FormattingEnabled = true;
|
||||
this.tbProcess.Location = new System.Drawing.Point(68, 32);
|
||||
this.tbProcess.Name = "tbProcess";
|
||||
this.tbProcess.Size = new System.Drawing.Size(180, 20);
|
||||
this.tbProcess.TabIndex = 5;
|
||||
this.tbProcess.SelectedIndexChanged += new System.EventHandler(this.tbProcess_SelectedIndexChanged);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(34, 36);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(29, 12);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "공정";
|
||||
//
|
||||
// btRefresh
|
||||
//
|
||||
this.btRefresh.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btRefresh.Location = new System.Drawing.Point(978, 5);
|
||||
this.btRefresh.Name = "btRefresh";
|
||||
this.btRefresh.Size = new System.Drawing.Size(75, 48);
|
||||
this.btRefresh.TabIndex = 2;
|
||||
this.btRefresh.Text = "새로고침";
|
||||
this.btRefresh.UseVisualStyleBackColor = true;
|
||||
this.btRefresh.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// ta
|
||||
//
|
||||
this.ta.ClearBeforeFill = true;
|
||||
//
|
||||
// fpSpread1
|
||||
//
|
||||
this.fpSpread1.AccessibleDescription = "";
|
||||
this.fpSpread1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.fpSpread1.Location = new System.Drawing.Point(0, 58);
|
||||
this.fpSpread1.Name = "fpSpread1";
|
||||
this.fpSpread1.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] {
|
||||
this.fpSpread1_Sheet1});
|
||||
this.fpSpread1.Size = new System.Drawing.Size(1058, 511);
|
||||
this.fpSpread1.TabIndex = 3;
|
||||
//
|
||||
// fpSpread1_Sheet1
|
||||
//
|
||||
this.fpSpread1_Sheet1.Reset();
|
||||
this.fpSpread1_Sheet1.SheetName = "Sheet1";
|
||||
//
|
||||
// rJobReportUser
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1058, 569);
|
||||
this.Controls.Add(this.fpSpread1);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Name = "rJobReportUser";
|
||||
this.Text = "적정인원 분석 보고서";
|
||||
this.Load += new System.EventHandler(this.rJobReport_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dsReport)).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private dsReport dsReport;
|
||||
private System.Windows.Forms.BindingSource bs;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Button btRefresh;
|
||||
private dsReportTableAdapters.JobReportDayTableAdapter ta;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ComboBox tbProcess;
|
||||
private System.Windows.Forms.DateTimePicker dts;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.DateTimePicker dte;
|
||||
private System.Windows.Forms.ComboBox cmbUser;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private FarPoint.Win.Spread.FpSpread fpSpread1;
|
||||
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
|
||||
}
|
||||
}
|
||||
457
SubProject/FPJ0000/JobReport/rJobReportUser.cs
Normal file
457
SubProject/FPJ0000/JobReport/rJobReportUser.cs
Normal file
@@ -0,0 +1,457 @@
|
||||
using FarPoint.Win;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FPJ0000.JobReport
|
||||
{
|
||||
public partial class rJobReportUser : Form
|
||||
{
|
||||
Boolean binit = false;
|
||||
public rJobReportUser()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.WindowState = FormWindowState.Maximized;
|
||||
this.dts.Value = DateTime.Parse(DateTime.Now.AddMonths(-1).ToString("yyyy-MM-01"));
|
||||
this.dte.Value = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-01")).AddDays(-1);
|
||||
}
|
||||
|
||||
private void rJobReport_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.tbProcess.Items.Clear();
|
||||
|
||||
tbProcess.Items.Add("--전체--");
|
||||
var taProcess = new dsReportTableAdapters.ProcessListTableAdapter();
|
||||
var dtProcessList = taProcess.GetData(FCOMMON.info.Login.gcode);
|
||||
foreach (dsReport.ProcessListRow dr in dtProcessList.Rows)
|
||||
tbProcess.Items.Add(dr.processs);
|
||||
|
||||
//사용자의 공정명을 선택해준다
|
||||
this.tbProcess.Text = FCOMMON.info.Login.process;
|
||||
|
||||
//프로세스가 선택되지 않았다면 전체를 선택해준다.
|
||||
if (tbProcess.SelectedIndex < 0) tbProcess.SelectedIndex = 0;
|
||||
|
||||
//사용자 목록을 선택한다
|
||||
UpdateUserList();
|
||||
|
||||
|
||||
|
||||
//엑셀파일불러오기
|
||||
var file = FCOMMON.Util.CurrentPath + "ReportForUser.xlsx";
|
||||
this.fpSpread1.OpenExcel(file);
|
||||
if (this.fpSpread1.Sheets.Count > 1) this.fpSpread1.ActiveSheetIndex = 0;
|
||||
|
||||
//refrehData();
|
||||
binit = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void UpdateUserList()
|
||||
{
|
||||
var db = new EEEntities();
|
||||
|
||||
cmbUser.Items.Clear();
|
||||
cmbUser.Items.Add("--전체--");
|
||||
|
||||
|
||||
//일반사용자 목록 가져온다
|
||||
IQueryable<IGrouping<String, vJobReportForUser>> userlist;
|
||||
|
||||
if (tbProcess.SelectedIndex <= 0)
|
||||
{
|
||||
//공정구분없이 전체사용자를 가져온다
|
||||
userlist = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode).OrderBy(t => t.name).GroupBy(t => t.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
userlist = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.userProcess == tbProcess.Text).OrderBy(t => t.name).GroupBy(t => t.name);
|
||||
}
|
||||
|
||||
//if (tbProcess.SelectedIndex != 0) userlist = userlist.Where(t => t.processs == tbProcess.Text); //해당 공정의 인원만 처리한다
|
||||
|
||||
foreach (var item in userlist)
|
||||
{
|
||||
var dr = item.First();
|
||||
cmbUser.Items.Add(String.Format("[{0}] {1}", dr.id, dr.name));
|
||||
}
|
||||
if (tbProcess.SelectedIndex > 0)
|
||||
cmbUser.Text = string.Format("[{0}] {1}", FCOMMON.info.Login.no, FCOMMON.info.Login.nameK);
|
||||
|
||||
if (cmbUser.SelectedIndex < 0) cmbUser.SelectedIndex = 0; //기본전체로 선택해준다.
|
||||
}
|
||||
|
||||
void refrehData()
|
||||
{
|
||||
|
||||
var db = new EEEntities();
|
||||
|
||||
|
||||
//조회공정
|
||||
this.fpSpread1.Sheets[0].Cells[3, 2].Value = tbProcess.Text;
|
||||
|
||||
//담당자
|
||||
this.fpSpread1.Sheets[0].Cells[3, 3].Value = cmbUser.Text;
|
||||
|
||||
//시작일:F4
|
||||
this.fpSpread1.Sheets[0].Cells[3, 5].Value = dts.Value;
|
||||
|
||||
//종료일:G4
|
||||
this.fpSpread1.Sheets[0].Cells[3, 6].Value = dte.Value;
|
||||
|
||||
//근문일수,시간
|
||||
var vSD = dts.Value.ToShortDateString();
|
||||
var vED = dte.Value.ToShortDateString();
|
||||
|
||||
//휴가일수확인
|
||||
var drDays = db.HolidayLIst.Where(t => t.free == false && t.pdate.CompareTo(vSD) >= 0 && t.pdate.CompareTo(vED) <= 0);
|
||||
|
||||
//근무일수적용
|
||||
if (drDays == null || drDays.Count() < 1) this.fpSpread1.Sheets[0].Cells[3, 7].Value = 0;
|
||||
else this.fpSpread1.Sheets[0].Cells[3, 7].Value = drDays.Count();
|
||||
|
||||
|
||||
ComplexBorderSide left = new ComplexBorderSide(Color.Gray, 1);
|
||||
ComplexBorderSide top = new ComplexBorderSide(Color.Gray, 1);
|
||||
ComplexBorderSide right = new ComplexBorderSide(Color.Gray, 1);
|
||||
ComplexBorderSide bottom = new ComplexBorderSide(Color.Gray, 1);
|
||||
|
||||
//사용자목록을 가져온다
|
||||
List<vJobReportForUser> baseData;
|
||||
if (cmbUser.SelectedIndex > 0)
|
||||
{
|
||||
//사용자번호
|
||||
var UserNo = cmbUser.Text.Substring(1, cmbUser.Text.IndexOf(']') - 1);
|
||||
baseData = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.id == UserNo).OrderBy(t => t.name).ToList();
|
||||
}
|
||||
else if (tbProcess.SelectedIndex > 0)
|
||||
{
|
||||
baseData = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.userProcess == tbProcess.Text).OrderBy(t => t.name).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
baseData = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode).OrderBy(t => t.name).ToList();
|
||||
}
|
||||
|
||||
|
||||
//사용자로 그룹해서 수량을 세명 , 사용자 숫자가 된다.
|
||||
this.fpSpread1.Sheets[0].Cells[3, 9].Value = baseData.GroupBy(t => t.id).Count(); //인원수
|
||||
|
||||
var col = 0;
|
||||
var row = 0;
|
||||
|
||||
|
||||
//해당 그룹의 기간데이터를 가져온다
|
||||
if (cmbUser.SelectedIndex > 0)
|
||||
{
|
||||
//사용자번호
|
||||
var UserNo = cmbUser.Text.Substring(1, cmbUser.Text.IndexOf(']') - 1);
|
||||
baseData = db.vJobReportForUser
|
||||
.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.id == UserNo && t.pdate.CompareTo(vSD) >= 0 && t.pdate.CompareTo(vED) <= 0)
|
||||
.OrderBy(t => t.name)
|
||||
.OrderBy(t => t.pdate)
|
||||
.ToList();
|
||||
}
|
||||
else if (tbProcess.SelectedIndex > 0)
|
||||
{
|
||||
baseData = db.vJobReportForUser
|
||||
.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.pdate.CompareTo(vSD) >= 0 && t.pdate.CompareTo(vED) <= 0 && t.userProcess == tbProcess.Text)
|
||||
.OrderBy(t => t.name)
|
||||
.OrderBy(t => t.pdate)
|
||||
.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
baseData = db.vJobReportForUser
|
||||
.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.pdate.CompareTo(vSD) >= 0 && t.pdate.CompareTo(vED) <= 0)
|
||||
.OrderBy(t => t.name)
|
||||
.OrderBy(t => t.pdate)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
col = 0;
|
||||
row = 1;
|
||||
fpSpread1.Sheets[1].RowCount = baseData.GroupBy(t => t.id).Count() + 1;
|
||||
foreach (var item in baseData.GroupBy(t => t.id)) //사용자별로 그룹을 해서
|
||||
{
|
||||
var dr = item.FirstOrDefault();
|
||||
this.fpSpread1.Sheets[1].Cells[row, 0].Value = dr.name;
|
||||
this.fpSpread1.Sheets[1].Cells[row, 1].Value = dr.id;
|
||||
this.fpSpread1.Sheets[1].Cells[row, 2].Value = item.Sum(t => t.hrs);
|
||||
this.fpSpread1.Sheets[1].Cells[row, 3].Value = item.Sum(t => t.ot);
|
||||
row += 1;
|
||||
}
|
||||
fpSpread1.Sheets[1].ColumnCount = 5;
|
||||
fpSpread1.Sheets[1].RowCount = row + 1;
|
||||
|
||||
//Raw dat a표시
|
||||
row = 1;
|
||||
this.fpSpread1.Sheets[2].RowCount = baseData.Count + 1;
|
||||
foreach (var item in baseData)
|
||||
{
|
||||
col = 0;
|
||||
this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.id;
|
||||
this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.name;
|
||||
this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.pdate;
|
||||
this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.userProcess;
|
||||
this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.process;
|
||||
this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.svalue;
|
||||
this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.hrs;
|
||||
this.fpSpread1.Sheets[2].Cells[row, col++].Value = item.ot;
|
||||
row += 1;
|
||||
}
|
||||
|
||||
// var dtRaw = db.vJobReportForUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.pdate.CompareTo(vSD) >= 0 && t.pdate.CompareTo(vED) <= 0);
|
||||
|
||||
//인원분석보고용타입설1
|
||||
col = 2;
|
||||
var orTypeName = baseData.Where(t => t.svalue != "휴가").OrderBy(t => t.svalue).GroupBy(t => t.svalue);
|
||||
this.fpSpread1.ActiveSheetIndex = 0;
|
||||
foreach (var item in orTypeName)
|
||||
{
|
||||
var dr = item.FirstOrDefault();
|
||||
this.fpSpread1.Sheets[0].Cells[6, col++].Value = dr.svalue;
|
||||
//col += 1;
|
||||
}
|
||||
|
||||
for (int i = col; i <= 6; i++)
|
||||
this.fpSpread1.Sheets[0].Cells[6, i].Value = "*";
|
||||
|
||||
System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("ko-KR", false);
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
numberCellType1.NegativeRed = true;
|
||||
numberCellType1.NullDisplay = "--";
|
||||
|
||||
|
||||
//프로세스목록을 먼저 기록한다
|
||||
row = 7;
|
||||
this.fpSpread1.Sheets[0].RowCount = 101;
|
||||
var orProcess = baseData.OrderBy(t => t.process).GroupBy(t => t.process);
|
||||
foreach (var item in orProcess)
|
||||
{
|
||||
var processName = item.FirstOrDefault().process;
|
||||
this.fpSpread1.Sheets[0].Cells[row, 1].Value = processName;
|
||||
|
||||
//2번부터는 데이터를 넣어야 한다
|
||||
double sumOt = 0.0;
|
||||
double holytime = 0.0;
|
||||
int coldata = 2;
|
||||
for (int i = 2; i <= 6; i++)
|
||||
{
|
||||
var colName = fpSpread1.Sheets[0].Cells[6, i].Value.ToString();
|
||||
|
||||
//이 이름에 해당하는 데이터의 시간을 가져온다
|
||||
double ot = 0.0;
|
||||
double hrs = 0.0;
|
||||
if (colName != "*")
|
||||
{
|
||||
//double holytime = 0.0;
|
||||
var timeList = item.Where(t => t.svalue == colName);
|
||||
if (timeList != null)
|
||||
{
|
||||
hrs = (double)timeList.Sum(t => t.hrs);
|
||||
ot = (double)timeList.Sum(t => t.ot);
|
||||
sumOt += ot;
|
||||
}
|
||||
}
|
||||
if (ot + hrs == 0.0) fpSpread1.Sheets[0].Cells[row, coldata].Value = null;
|
||||
else fpSpread1.Sheets[0].Cells[row, coldata].Value = ot + hrs; //없음으로한다
|
||||
|
||||
coldata += 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
fpSpread1.Sheets[0].Cells[row, 7].CellType = numberCellType1;
|
||||
fpSpread1.Sheets[0].Cells[row, 7].ParseFormatString = "N1";
|
||||
fpSpread1.Sheets[0].Cells[row, 8].CellType = numberCellType1;
|
||||
fpSpread1.Sheets[0].Cells[row, 8].ParseFormatString = "N1";
|
||||
|
||||
|
||||
|
||||
fpSpread1.Sheets[0].Cells[row, 7].Formula = string.Format("SUM(C{0}:G{0})+K{0}", row + 1);
|
||||
fpSpread1.Sheets[0].Cells[row, 8].Formula = string.Format("H{0}/$I$4", row + 1);
|
||||
//H8 /$I$4
|
||||
if(sumOt == 0.0) fpSpread1.Sheets[0].Cells[row, 9].Value = null; //OT합계
|
||||
else fpSpread1.Sheets[0].Cells[row, 9].Value = sumOt ; //OT합계
|
||||
|
||||
|
||||
|
||||
// process 의 휴가시간을 다시 계산한다.
|
||||
var 휴가데이터 = baseData.Where(t => t.process == processName && t.svalue == "휴가");
|
||||
if (휴가데이터 == null || 휴가데이터.Count() < 1)
|
||||
{
|
||||
fpSpread1.Sheets[0].Cells[row, 10].Value = null;// 0.0; //휴가시간
|
||||
}
|
||||
else fpSpread1.Sheets[0].Cells[row, 10].Value = 휴가데이터.Sum(t => t.hrs); //휴가시간
|
||||
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
fpSpread1.Sheets[0].Cells[row, i].BackColor = Color.White;
|
||||
fpSpread1.Sheets[0].Cells[row, i].Border = new ComplexBorder(left, top, right, bottom);
|
||||
fpSpread1.Sheets[0].Cells[row, i].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
fpSpread1.Sheets[0].Cells[row, i].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
}
|
||||
|
||||
|
||||
row += 1;
|
||||
}
|
||||
|
||||
//합계데이터
|
||||
fpSpread1.Sheets[0].Cells[row, 1].Value = "합계";
|
||||
fpSpread1.Sheets[0].Cells[row, 1].BackColor = Color.LightGray;
|
||||
fpSpread1.Sheets[0].Cells[row, 1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
fpSpread1.Sheets[0].Cells[row, 1].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
fpSpread1.Sheets[0].Cells[row, 1].Border = new ComplexBorder(left, top, right, bottom);
|
||||
for (int i = 2; i < 11; i++)
|
||||
{
|
||||
char basec = 'C';
|
||||
char newc = (char)(basec + (i - 2));
|
||||
fpSpread1.Sheets[0].Cells[row, i].Formula = "SUM(" + newc.ToString() + "8:" + newc.ToString() + row.ToString() + ")";
|
||||
fpSpread1.Sheets[0].Cells[row, i].BackColor = Color.LightGray;
|
||||
|
||||
|
||||
|
||||
fpSpread1.Sheets[0].Cells[row, i].CellType = numberCellType1;
|
||||
fpSpread1.Sheets[0].Cells[row, i].ParseFormatString = "N1";
|
||||
fpSpread1.Sheets[0].Cells[row, i].CellType = numberCellType1;
|
||||
fpSpread1.Sheets[0].Cells[row, i].ParseFormatString = "N1";
|
||||
|
||||
|
||||
fpSpread1.Sheets[0].Cells[row, i].Border = new ComplexBorder(left, top, right, bottom);
|
||||
fpSpread1.Sheets[0].Cells[row, i].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
fpSpread1.Sheets[0].Cells[row, i].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
|
||||
}
|
||||
|
||||
this.fpSpread1.Sheets[0].RowCount = row + 1;
|
||||
|
||||
|
||||
|
||||
|
||||
// this.ta.Fill(this.dsReport.JobReportDay, tbMon.Text, FCOMMON.info.Login.gcode);
|
||||
// //this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
|
||||
// //this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
|
||||
// //this.reportViewer1.RefreshReport();
|
||||
|
||||
// //그리드뷰 생성
|
||||
// this.dataGridView1.Rows.Clear();
|
||||
// this.dataGridView1.Columns.Clear();
|
||||
|
||||
// var Process = tbProcess.Text.Trim();
|
||||
// if (Process == "%" || tbProcess.SelectedIndex == 0) Process = "";
|
||||
|
||||
// var wekklist = new string[] { "일","월","화","수","목","금","토" };
|
||||
|
||||
// //날짜에 해당하는 열을 먼저 생성한다
|
||||
// dataGridView1.Columns.Add("dvcu_damdang", "사원명");
|
||||
//// dataGridView1.Columns.Add("dvcu_process", "공정");
|
||||
// var daylist = dsReport.JobReportDay.OrderBy(t=>t.pdate).GroupBy(t => t.pdate);
|
||||
// foreach (var dayitem in daylist)
|
||||
// {
|
||||
// var dtValue = DateTime.Parse(dayitem.Key);
|
||||
// if(dtValue.DayOfWeek == DayOfWeek.Saturday || dtValue.DayOfWeek == DayOfWeek.Sunday)
|
||||
// {
|
||||
// var week = wekklist[(int)dtValue.DayOfWeek];
|
||||
// this.dataGridView1.Columns.Add("dvcu_pdate", dayitem.Key.Substring(8, 2) + "(" + week.ToString() + ")");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// this.dataGridView1.Columns.Add("dvcu_pdate", dayitem.Key.Substring(8, 2) );
|
||||
// }
|
||||
|
||||
// this.dataGridView1.Columns[this.dataGridView1.Columns.Count -1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
// }
|
||||
// dataGridView1.Columns.Add("dvcu_sum", "합계");
|
||||
// this.dataGridView1.Columns[this.dataGridView1.Columns.Count - 1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||
|
||||
|
||||
// foreach (var item in dsReport.JobReportDay.Where(t=>t.processs.Contains(Process)).OrderBy(t => t.uname + t.uid).GroupBy(t => t.uname))
|
||||
// {
|
||||
// //사용자별로 데이터를 가져온다.
|
||||
// var username = item.Key;
|
||||
// var userid = item.FirstOrDefault().uid;
|
||||
// List<string> rowdata = new List<string>();
|
||||
// rowdata.Add(username);
|
||||
// // rowdata.Add(item.FirstOrDefault().processs);
|
||||
|
||||
// //이 사용자의 데이터를 날짜별로 정렬해서 가져온다.
|
||||
// var sum = 0.0;
|
||||
// var sumOT = 0.0;
|
||||
// for (int i = 1; i < this.dataGridView1.Columns.Count-1; i++)
|
||||
// {
|
||||
// var col = this.dataGridView1.Columns[i];
|
||||
// var dayStr = col.HeaderText.Substring(0, 2);
|
||||
// var daydata = dsReport.JobReportDay.Where(t => t.uid == userid && t.pdate.EndsWith(dayStr)).FirstOrDefault();
|
||||
// if (daydata != null)
|
||||
// {
|
||||
// sum += daydata.hrs;
|
||||
// sumOT += daydata.ot;
|
||||
// rowdata.Add((daydata.hrs.ToString() + "+" + daydata.ot.ToString()));
|
||||
// }
|
||||
// else rowdata.Add("--");
|
||||
// }
|
||||
// rowdata.Add(sum.ToString() + "+" + sumOT.ToString());
|
||||
// this.dataGridView1.Rows.Add(rowdata.ToArray());
|
||||
// }
|
||||
// foreach(DataGridViewRow dvrow in this.dataGridView1.Rows)
|
||||
// {
|
||||
// for(int i = 1;i < this.dataGridView1.ColumnCount-1;i++)
|
||||
// {
|
||||
// var cellvalue = "--";
|
||||
// if(dvrow.Cells[i].Value != null) cellvalue= dvrow.Cells[i].Value.ToString();
|
||||
// if (cellvalue == "--") dvrow.Cells[i].Style.ForeColor = Color.Gray;
|
||||
// else
|
||||
// {
|
||||
// var datasplbu = cellvalue.Split('+');
|
||||
// double hrs;
|
||||
// double ot;
|
||||
// if (double.TryParse(datasplbu[1], out ot) == false) ot = 0;
|
||||
|
||||
// if(double.TryParse(datasplbu[0],out hrs))
|
||||
// {
|
||||
// if (hrs > 8.0) dvrow.Cells[i].Style.ForeColor = Color.Blue;
|
||||
// else if (hrs < 8.0) dvrow.Cells[i].Style.ForeColor = Color.Red;
|
||||
// else
|
||||
// {
|
||||
// if (ot == 0)
|
||||
// dvrow.Cells[i].Style.ForeColor = Color.Black;
|
||||
// else
|
||||
// dvrow.Cells[i].Style.ForeColor = Color.Magenta;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// FCOMMON.Util.MsgE("숫자변경실패 " + cellvalue);
|
||||
// dvrow.Cells[i].Style.ForeColor = Color.Red;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
// this.dataGridView1.AutoResizeColumns();
|
||||
}
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
refrehData();
|
||||
}
|
||||
|
||||
private void tbProcess_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (binit == false) return;
|
||||
UpdateUserList();
|
||||
//if (tbProcess.SelectedIndex >= 0) refrehData();
|
||||
}
|
||||
|
||||
private void panel1_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
135
SubProject/FPJ0000/JobReport/rJobReportUser.resx
Normal file
135
SubProject/FPJ0000/JobReport/rJobReportUser.resx
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>119, 17</value>
|
||||
</metadata>
|
||||
<metadata name="dsReport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="dsReport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ta.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>183, 17</value>
|
||||
</metadata>
|
||||
<metadata name="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>245, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
37
SubProject/FPJ0000/Model1.Context.cs
Normal file
37
SubProject/FPJ0000/Model1.Context.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
|
||||
public partial class EEEntities : DbContext
|
||||
{
|
||||
public EEEntities()
|
||||
: base("name=EEEntities")
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||
{
|
||||
throw new UnintentionalCodeFirstException();
|
||||
}
|
||||
|
||||
public virtual DbSet<Common> Common { get; set; }
|
||||
public virtual DbSet<UserGroup> UserGroup { get; set; }
|
||||
public virtual DbSet<Users> Users { get; set; }
|
||||
public virtual DbSet<vHoliday_uselist> vHoliday_uselist { get; set; }
|
||||
public virtual DbSet<vUserWorkTimeList> vUserWorkTimeList { get; set; }
|
||||
public virtual DbSet<HolidayLIst> HolidayLIst { get; set; }
|
||||
public virtual DbSet<vJobReportForUser> vJobReportForUser { get; set; }
|
||||
public virtual DbSet<vGroupUser> vGroupUser { get; set; }
|
||||
}
|
||||
}
|
||||
636
SubProject/FPJ0000/Model1.Context.tt
Normal file
636
SubProject/FPJ0000/Model1.Context.tt
Normal file
@@ -0,0 +1,636 @@
|
||||
<#@ template language="C#" debug="false" hostspecific="true"#>
|
||||
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
|
||||
output extension=".cs"#><#
|
||||
|
||||
const string inputFile = @"Model1.edmx";
|
||||
var textTransform = DynamicTextTransformation.Create(this);
|
||||
var code = new CodeGenerationTools(this);
|
||||
var ef = new MetadataTools(this);
|
||||
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
|
||||
var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
|
||||
var itemCollection = loader.CreateEdmItemCollection(inputFile);
|
||||
var modelNamespace = loader.GetModelNamespace(inputFile);
|
||||
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
|
||||
|
||||
var container = itemCollection.OfType<EntityContainer>().FirstOrDefault();
|
||||
if (container == null)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
#>
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
|
||||
//
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
<#
|
||||
|
||||
var codeNamespace = code.VsNamespaceSuggestion();
|
||||
if (!String.IsNullOrEmpty(codeNamespace))
|
||||
{
|
||||
#>
|
||||
namespace <#=code.EscapeNamespace(codeNamespace)#>
|
||||
{
|
||||
<#
|
||||
PushIndent(" ");
|
||||
}
|
||||
|
||||
#>
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
<#
|
||||
if (container.FunctionImports.Any())
|
||||
{
|
||||
#>
|
||||
using System.Data.Entity.Core.Objects;
|
||||
using System.Linq;
|
||||
<#
|
||||
}
|
||||
#>
|
||||
|
||||
<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
|
||||
{
|
||||
public <#=code.Escape(container)#>()
|
||||
: base("name=<#=container.Name#>")
|
||||
{
|
||||
<#
|
||||
if (!loader.IsLazyLoadingEnabled(container))
|
||||
{
|
||||
#>
|
||||
this.Configuration.LazyLoadingEnabled = false;
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
|
||||
{
|
||||
// Note: the DbSet members are defined below such that the getter and
|
||||
// setter always have the same accessibility as the DbSet definition
|
||||
if (Accessibility.ForReadOnlyProperty(entitySet) != "public")
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.DbSetInitializer(entitySet)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||
{
|
||||
throw new UnintentionalCodeFirstException();
|
||||
}
|
||||
|
||||
<#
|
||||
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.DbSet(entitySet)#>
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var edmFunction in container.FunctionImports)
|
||||
{
|
||||
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
|
||||
if (!String.IsNullOrEmpty(codeNamespace))
|
||||
{
|
||||
PopIndent();
|
||||
#>
|
||||
}
|
||||
<#
|
||||
}
|
||||
#>
|
||||
<#+
|
||||
|
||||
private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
if (typeMapper.IsComposable(edmFunction))
|
||||
{
|
||||
#>
|
||||
|
||||
[DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
|
||||
<#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
|
||||
{
|
||||
<#+
|
||||
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
|
||||
#>
|
||||
<#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
|
||||
}
|
||||
<#+
|
||||
}
|
||||
else
|
||||
{
|
||||
#>
|
||||
|
||||
<#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
|
||||
{
|
||||
<#+
|
||||
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
|
||||
#>
|
||||
<#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
|
||||
}
|
||||
<#+
|
||||
if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
|
||||
{
|
||||
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
|
||||
{
|
||||
#>
|
||||
var <#=name#> = <#=isNotNull#> ?
|
||||
<#=notNullInit#> :
|
||||
<#=nullInit#>;
|
||||
|
||||
<#+
|
||||
}
|
||||
|
||||
public const string TemplateId = "CSharp_DbContext_Context_EF6";
|
||||
|
||||
public class CodeStringGenerator
|
||||
{
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly TypeMapper _typeMapper;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(typeMapper, "typeMapper");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
|
||||
_code = code;
|
||||
_typeMapper = typeMapper;
|
||||
_ef = ef;
|
||||
}
|
||||
|
||||
public string Property(EdmProperty edmProperty)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
Accessibility.ForProperty(edmProperty),
|
||||
_typeMapper.GetTypeName(edmProperty.TypeUsage),
|
||||
_code.Escape(edmProperty),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
|
||||
}
|
||||
|
||||
public string NavigationProperty(NavigationProperty navProp)
|
||||
{
|
||||
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
|
||||
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
|
||||
_code.Escape(navProp),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
|
||||
}
|
||||
|
||||
public string AccessibilityAndVirtual(string accessibility)
|
||||
{
|
||||
return accessibility + (accessibility != "private" ? " virtual" : "");
|
||||
}
|
||||
|
||||
public string EntityClassOpening(EntityType entity)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1}partial class {2}{3}",
|
||||
Accessibility.ForType(entity),
|
||||
_code.SpaceAfter(_code.AbstractOption(entity)),
|
||||
_code.Escape(entity),
|
||||
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
|
||||
}
|
||||
|
||||
public string EnumOpening(SimpleType enumType)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} enum {1} : {2}",
|
||||
Accessibility.ForType(enumType),
|
||||
_code.Escape(enumType),
|
||||
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
|
||||
}
|
||||
|
||||
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
|
||||
{
|
||||
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
|
||||
{
|
||||
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
|
||||
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
|
||||
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
|
||||
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
|
||||
}
|
||||
}
|
||||
|
||||
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} IQueryable<{1}> {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
_code.Escape(edmFunction),
|
||||
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
|
||||
}
|
||||
|
||||
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
edmFunction.NamespaceName,
|
||||
edmFunction.Name,
|
||||
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
|
||||
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
|
||||
}
|
||||
|
||||
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
|
||||
if (includeMergeOption)
|
||||
{
|
||||
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
_code.Escape(edmFunction),
|
||||
paramList);
|
||||
}
|
||||
|
||||
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
|
||||
if (includeMergeOption)
|
||||
{
|
||||
callParams = ", mergeOption" + callParams;
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
|
||||
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
edmFunction.Name,
|
||||
callParams);
|
||||
}
|
||||
|
||||
public string DbSet(EntitySet entitySet)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
|
||||
Accessibility.ForReadOnlyProperty(entitySet),
|
||||
_typeMapper.GetTypeName(entitySet.ElementType),
|
||||
_code.Escape(entitySet));
|
||||
}
|
||||
|
||||
public string DbSetInitializer(EntitySet entitySet)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} = Set<{1}>();",
|
||||
_code.Escape(entitySet),
|
||||
_typeMapper.GetTypeName(entitySet.ElementType));
|
||||
}
|
||||
|
||||
public string UsingDirectives(bool inHeader, bool includeCollections = true)
|
||||
{
|
||||
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
|
||||
? string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0}using System;{1}" +
|
||||
"{2}",
|
||||
inHeader ? Environment.NewLine : "",
|
||||
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
|
||||
inHeader ? "" : Environment.NewLine)
|
||||
: "";
|
||||
}
|
||||
}
|
||||
|
||||
public class TypeMapper
|
||||
{
|
||||
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
|
||||
|
||||
private readonly System.Collections.IList _errors;
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public static string FixNamespaces(string typeName)
|
||||
{
|
||||
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
|
||||
}
|
||||
|
||||
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
ArgumentNotNull(errors, "errors");
|
||||
|
||||
_code = code;
|
||||
_ef = ef;
|
||||
_errors = errors;
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, string modelNamespace)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
|
||||
{
|
||||
if (edmType == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var collectionType = edmType as CollectionType;
|
||||
if (collectionType != null)
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
|
||||
}
|
||||
|
||||
var typeName = _code.Escape(edmType.MetadataProperties
|
||||
.Where(p => p.Name == ExternalTypeNameAttributeName)
|
||||
.Select(p => (string)p.Value)
|
||||
.FirstOrDefault())
|
||||
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
|
||||
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
|
||||
_code.Escape(edmType));
|
||||
|
||||
if (edmType is StructuralType)
|
||||
{
|
||||
return typeName;
|
||||
}
|
||||
|
||||
if (edmType is SimpleType)
|
||||
{
|
||||
var clrType = UnderlyingClrType(edmType);
|
||||
if (!IsEnumType(edmType))
|
||||
{
|
||||
typeName = _code.Escape(clrType);
|
||||
}
|
||||
|
||||
typeName = FixNamespaces(typeName);
|
||||
|
||||
return clrType.IsValueType && isNullable == true ?
|
||||
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
|
||||
typeName;
|
||||
}
|
||||
|
||||
throw new ArgumentException("edmType");
|
||||
}
|
||||
|
||||
public Type UnderlyingClrType(EdmType edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
var primitiveType = edmType as PrimitiveType;
|
||||
if (primitiveType != null)
|
||||
{
|
||||
return primitiveType.ClrEquivalentType;
|
||||
}
|
||||
|
||||
if (IsEnumType(edmType))
|
||||
{
|
||||
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
|
||||
}
|
||||
|
||||
return typeof(object);
|
||||
}
|
||||
|
||||
public object GetEnumMemberValue(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var valueProperty = enumMember.GetType().GetProperty("Value");
|
||||
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public string GetEnumMemberName(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var nameProperty = enumMember.GetType().GetProperty("Name");
|
||||
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var membersProperty = enumType.GetType().GetProperty("Members");
|
||||
return membersProperty != null
|
||||
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
|
||||
: Enumerable.Empty<MetadataItem>();
|
||||
}
|
||||
|
||||
public bool EnumIsFlags(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
|
||||
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public bool IsEnumType(GlobalItem edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
return edmType.GetType().Name == "EnumType";
|
||||
}
|
||||
|
||||
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public string CreateLiteral(object value)
|
||||
{
|
||||
if (value == null || value.GetType() != typeof(TimeSpan))
|
||||
{
|
||||
return _code.CreateLiteral(value);
|
||||
}
|
||||
|
||||
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
|
||||
}
|
||||
|
||||
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
|
||||
{
|
||||
ArgumentNotNull(types, "types");
|
||||
ArgumentNotNull(sourceFile, "sourceFile");
|
||||
|
||||
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
|
||||
if (types.Any(item => !hash.Add(item)))
|
||||
{
|
||||
_errors.Add(
|
||||
new CompilerError(sourceFile, -1, -1, "6023",
|
||||
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return GetItemsToGenerate<SimpleType>(itemCollection)
|
||||
.Where(e => IsEnumType(e));
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
|
||||
{
|
||||
return itemCollection
|
||||
.OfType<T>()
|
||||
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
|
||||
.OrderBy(i => i.Name);
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return itemCollection
|
||||
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
|
||||
.Select(g => GetGlobalItemName(g));
|
||||
}
|
||||
|
||||
public string GetGlobalItemName(GlobalItem item)
|
||||
{
|
||||
if (item is EdmType)
|
||||
{
|
||||
return ((EdmType)item).Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((EntityContainer)item).Name;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
|
||||
}
|
||||
|
||||
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
|
||||
return returnParamsProperty == null
|
||||
? edmFunction.ReturnParameter
|
||||
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
|
||||
}
|
||||
|
||||
public bool IsComposable(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
|
||||
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
|
||||
}
|
||||
|
||||
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
|
||||
{
|
||||
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
}
|
||||
|
||||
public TypeUsage GetReturnType(EdmFunction edmFunction)
|
||||
{
|
||||
var returnParam = GetReturnParameter(edmFunction);
|
||||
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
|
||||
}
|
||||
|
||||
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
|
||||
{
|
||||
var returnType = GetReturnType(edmFunction);
|
||||
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ArgumentNotNull<T>(T arg, string name) where T : class
|
||||
{
|
||||
if (arg == null)
|
||||
{
|
||||
throw new ArgumentNullException(name);
|
||||
}
|
||||
}
|
||||
#>
|
||||
10
SubProject/FPJ0000/Model1.Designer.cs
generated
Normal file
10
SubProject/FPJ0000/Model1.Designer.cs
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// 모델 'D:\Source\##### 완료아이템\(014) GroupWare\Source\SubProject\FPJ0000\Model1.edmx'에 대해 T4 코드 생성이 사용됩니다.
|
||||
// 레거시 코드 생성을 사용하려면 '코드 생성 전략' 디자이너 속성의 값을
|
||||
// 'Legacy ObjectContext'로 변경하십시오. 이 속성은 모델이 디자이너에서 열릴 때
|
||||
// 속성 창에서 사용할 수 있습니다.
|
||||
|
||||
// 컨텍스트 및 엔터티 클래스가 생성되지 않은 경우 빈 모델을 만들었기 때문일 수도 있지만
|
||||
// 사용할 Entity Framework 버전을 선택하지 않았기 때문일 수도 있습니다. 모델에 맞는 컨텍스트 클래스 및
|
||||
// 엔터티 클래스를 생성하려면 디자이너에서 모델을 열고 디자이너 화면에서 마우스 오른쪽 단추를 클릭한
|
||||
// 다음 '데이터베이스에서 모델 업데이트...', '모델에서 데이터베이스 생성...' 또는 '코드 생성 항목 추가...'를
|
||||
// 선택하십시오.
|
||||
9
SubProject/FPJ0000/Model1.cs
Normal file
9
SubProject/FPJ0000/Model1.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
525
SubProject/FPJ0000/Model1.edmx
Normal file
525
SubProject/FPJ0000/Model1.edmx
Normal file
@@ -0,0 +1,525 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- EF Runtime content -->
|
||||
<edmx:Runtime>
|
||||
<!-- SSDL content -->
|
||||
<edmx:StorageModels>
|
||||
<Schema Namespace="EEModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2008" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
|
||||
<EntityType Name="Common">
|
||||
<Key>
|
||||
<PropertyRef Name="idx" />
|
||||
</Key>
|
||||
<Property Name="idx" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" Nullable="false" />
|
||||
<Property Name="grp" Type="varchar" MaxLength="10" />
|
||||
<Property Name="code" Type="varchar" MaxLength="10" />
|
||||
<Property Name="svalue" Type="varchar" MaxLength="255" />
|
||||
<Property Name="ivalue" Type="int" />
|
||||
<Property Name="fvalue" Type="float" />
|
||||
<Property Name="memo" Type="varchar" MaxLength="250" />
|
||||
<Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="wdate" Type="smalldatetime" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="HolidayLIst">
|
||||
<Key>
|
||||
<PropertyRef Name="idx" />
|
||||
</Key>
|
||||
<Property Name="idx" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="pdate" Type="varchar" MaxLength="10" />
|
||||
<Property Name="free" Type="bit" />
|
||||
<Property Name="memo" Type="nvarchar" MaxLength="255" />
|
||||
<Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="wdate" Type="smalldatetime" Nullable="false" />
|
||||
</EntityType>
|
||||
<EntityType Name="UserGroup">
|
||||
<Key>
|
||||
<PropertyRef Name="dept" />
|
||||
</Key>
|
||||
<Property Name="dept" Type="varchar" MaxLength="100" Nullable="false" />
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" />
|
||||
<Property Name="path_kj" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="advpurchase" Type="bit" />
|
||||
<Property Name="permission" Type="int" />
|
||||
</EntityType>
|
||||
<EntityType Name="Users">
|
||||
<Key>
|
||||
<PropertyRef Name="id" />
|
||||
</Key>
|
||||
<Property Name="id" Type="varchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" />
|
||||
<Property Name="password" Type="varchar" MaxLength="50" />
|
||||
<Property Name="nameE" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="name" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="dept" Type="varchar" MaxLength="100" />
|
||||
<Property Name="grade" Type="varchar" MaxLength="10" />
|
||||
<Property Name="email" Type="varchar" MaxLength="100" />
|
||||
<Property Name="level" Type="smallint" />
|
||||
<Property Name="indate" Type="varchar" MaxLength="20" />
|
||||
<Property Name="outdate" Type="varchar" MaxLength="20" />
|
||||
<Property Name="tel" Type="varchar" MaxLength="20" />
|
||||
<Property Name="hp" Type="varchar" MaxLength="20" />
|
||||
<Property Name="place" Type="varchar" MaxLength="100" />
|
||||
<Property Name="ads_employNo" Type="varchar" MaxLength="50" />
|
||||
<Property Name="ads_title" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="ads_created" Type="varchar" MaxLength="50" />
|
||||
<Property Name="memo" Type="nvarchar" MaxLength="255" />
|
||||
<Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="wdate" Type="smalldatetime" Nullable="false" />
|
||||
<Property Name="processs" Type="nvarchar" MaxLength="100" />
|
||||
</EntityType>
|
||||
<!--생성 중 오류 발생:
|
||||
경고 6002: 테이블/뷰 'EE.dbo.vGroupUser'에 기본 키가 정의되지 않았습니다. 키가 유추되었고 읽기 전용 테이블/뷰로 정의되었습니다.-->
|
||||
<EntityType Name="vGroupUser">
|
||||
<Key>
|
||||
<PropertyRef Name="gcode" />
|
||||
</Key>
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" Nullable="false" />
|
||||
<Property Name="dept" Type="varchar" MaxLength="100" />
|
||||
<Property Name="level" Type="smallint" />
|
||||
<Property Name="name" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="nameE" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="grade" Type="varchar" MaxLength="10" />
|
||||
<Property Name="email" Type="varchar" MaxLength="100" />
|
||||
<Property Name="tel" Type="varchar" MaxLength="20" />
|
||||
<Property Name="indate" Type="varchar" MaxLength="20" />
|
||||
<Property Name="outdate" Type="varchar" MaxLength="20" />
|
||||
<Property Name="hp" Type="varchar" MaxLength="20" />
|
||||
<Property Name="place" Type="varchar" MaxLength="100" />
|
||||
<Property Name="ads_employNo" Type="varchar" MaxLength="50" />
|
||||
<Property Name="ads_title" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="ads_created" Type="varchar" MaxLength="50" />
|
||||
<Property Name="memo" Type="nvarchar" MaxLength="255" />
|
||||
<Property Name="processs" Type="varchar" MaxLength="50" />
|
||||
<Property Name="id" Type="varchar" MaxLength="20" />
|
||||
</EntityType>
|
||||
<!--생성 중 오류 발생:
|
||||
경고 6002: 테이블/뷰 'EE.dbo.vHoliday_uselist'에 기본 키가 정의되지 않았습니다. 키가 유추되었고 읽기 전용 테이블/뷰로 정의되었습니다.-->
|
||||
<EntityType Name="vHoliday_uselist">
|
||||
<Key>
|
||||
<PropertyRef Name="idx" />
|
||||
<PropertyRef Name="gcode" />
|
||||
<PropertyRef Name="termdr" />
|
||||
<PropertyRef Name="wuid" />
|
||||
<PropertyRef Name="wdate" />
|
||||
</Key>
|
||||
<Property Name="idx" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" Nullable="false" />
|
||||
<Property Name="pdate" Type="varchar" MaxLength="10" />
|
||||
<Property Name="term" Type="float" />
|
||||
<Property Name="termdr" Type="int" Nullable="false" />
|
||||
<Property Name="description" Type="nvarchar(max)" />
|
||||
<Property Name="uid" Type="varchar" MaxLength="20" />
|
||||
<Property Name="wuid" Type="varchar" MaxLength="20" Nullable="false" />
|
||||
<Property Name="wdate" Type="smalldatetime" Nullable="false" />
|
||||
</EntityType>
|
||||
<!--생성 중 오류 발생:
|
||||
경고 6002: 테이블/뷰 'EE.dbo.vJobReportForUser'에 기본 키가 정의되지 않았습니다. 키가 유추되었고 읽기 전용 테이블/뷰로 정의되었습니다.-->
|
||||
<EntityType Name="vJobReportForUser">
|
||||
<Key>
|
||||
<PropertyRef Name="idx" />
|
||||
<PropertyRef Name="gcode" />
|
||||
</Key>
|
||||
<Property Name="idx" Type="int" Nullable="false" />
|
||||
<Property Name="pdate" Type="varchar" MaxLength="10" />
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" Nullable="false" />
|
||||
<Property Name="id" Type="varchar" MaxLength="20" />
|
||||
<Property Name="name" Type="nvarchar" MaxLength="100" />
|
||||
<Property Name="process" Type="varchar" MaxLength="50" />
|
||||
<Property Name="type" Type="varchar" MaxLength="50" />
|
||||
<Property Name="svalue" Type="varchar" MaxLength="255" />
|
||||
<Property Name="hrs" Type="float" />
|
||||
<Property Name="ot" Type="float" />
|
||||
<Property Name="userProcess" Type="nvarchar" MaxLength="100" />
|
||||
</EntityType>
|
||||
<!--생성 중 오류 발생:
|
||||
경고 6002: 테이블/뷰 'EE.dbo.vUserWorkTimeList'에 기본 키가 정의되지 않았습니다. 키가 유추되었고 읽기 전용 테이블/뷰로 정의되었습니다.-->
|
||||
<EntityType Name="vUserWorkTimeList">
|
||||
<Key>
|
||||
<PropertyRef Name="gcode" />
|
||||
</Key>
|
||||
<Property Name="gcode" Type="varchar" MaxLength="10" Nullable="false" />
|
||||
<Property Name="yymm" Type="varchar" MaxLength="22" />
|
||||
<Property Name="total" Type="int" />
|
||||
<Property Name="uid" Type="varchar" MaxLength="20" />
|
||||
<Property Name="uname" Type="varchar" MaxLength="200" />
|
||||
<Property Name="hrs" Type="float" />
|
||||
<Property Name="ot" Type="float" />
|
||||
</EntityType>
|
||||
<EntityContainer Name="EEModelStoreContainer">
|
||||
<EntitySet Name="Common" EntityType="Self.Common" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="HolidayLIst" EntityType="Self.HolidayLIst" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="UserGroup" EntityType="Self.UserGroup" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
|
||||
<EntitySet Name="vGroupUser" EntityType="Self.vGroupUser" store:Type="Views" store:Schema="dbo">
|
||||
<DefiningQuery>SELECT
|
||||
[vGroupUser].[gcode] AS [gcode],
|
||||
[vGroupUser].[dept] AS [dept],
|
||||
[vGroupUser].[level] AS [level],
|
||||
[vGroupUser].[name] AS [name],
|
||||
[vGroupUser].[nameE] AS [nameE],
|
||||
[vGroupUser].[grade] AS [grade],
|
||||
[vGroupUser].[email] AS [email],
|
||||
[vGroupUser].[tel] AS [tel],
|
||||
[vGroupUser].[indate] AS [indate],
|
||||
[vGroupUser].[outdate] AS [outdate],
|
||||
[vGroupUser].[hp] AS [hp],
|
||||
[vGroupUser].[place] AS [place],
|
||||
[vGroupUser].[ads_employNo] AS [ads_employNo],
|
||||
[vGroupUser].[ads_title] AS [ads_title],
|
||||
[vGroupUser].[ads_created] AS [ads_created],
|
||||
[vGroupUser].[memo] AS [memo],
|
||||
[vGroupUser].[processs] AS [processs],
|
||||
[vGroupUser].[id] AS [id]
|
||||
FROM [dbo].[vGroupUser] AS [vGroupUser]</DefiningQuery>
|
||||
</EntitySet>
|
||||
<EntitySet Name="vHoliday_uselist" EntityType="Self.vHoliday_uselist" store:Type="Views" store:Schema="dbo">
|
||||
<DefiningQuery>SELECT
|
||||
[vHoliday_uselist].[idx] AS [idx],
|
||||
[vHoliday_uselist].[gcode] AS [gcode],
|
||||
[vHoliday_uselist].[pdate] AS [pdate],
|
||||
[vHoliday_uselist].[term] AS [term],
|
||||
[vHoliday_uselist].[termdr] AS [termdr],
|
||||
[vHoliday_uselist].[description] AS [description],
|
||||
[vHoliday_uselist].[uid] AS [uid],
|
||||
[vHoliday_uselist].[wuid] AS [wuid],
|
||||
[vHoliday_uselist].[wdate] AS [wdate]
|
||||
FROM [dbo].[vHoliday_uselist] AS [vHoliday_uselist]</DefiningQuery>
|
||||
</EntitySet>
|
||||
<EntitySet Name="vJobReportForUser" EntityType="Self.vJobReportForUser" store:Type="Views" store:Schema="dbo">
|
||||
<DefiningQuery>SELECT
|
||||
[vJobReportForUser].[idx] AS [idx],
|
||||
[vJobReportForUser].[pdate] AS [pdate],
|
||||
[vJobReportForUser].[gcode] AS [gcode],
|
||||
[vJobReportForUser].[id] AS [id],
|
||||
[vJobReportForUser].[name] AS [name],
|
||||
[vJobReportForUser].[process] AS [process],
|
||||
[vJobReportForUser].[type] AS [type],
|
||||
[vJobReportForUser].[svalue] AS [svalue],
|
||||
[vJobReportForUser].[hrs] AS [hrs],
|
||||
[vJobReportForUser].[ot] AS [ot],
|
||||
[vJobReportForUser].[userProcess] AS [userProcess]
|
||||
FROM [dbo].[vJobReportForUser] AS [vJobReportForUser]</DefiningQuery>
|
||||
</EntitySet>
|
||||
<EntitySet Name="vUserWorkTimeList" EntityType="Self.vUserWorkTimeList" store:Type="Views" store:Schema="dbo">
|
||||
<DefiningQuery>SELECT
|
||||
[vUserWorkTimeList].[gcode] AS [gcode],
|
||||
[vUserWorkTimeList].[yymm] AS [yymm],
|
||||
[vUserWorkTimeList].[total] AS [total],
|
||||
[vUserWorkTimeList].[uid] AS [uid],
|
||||
[vUserWorkTimeList].[uname] AS [uname],
|
||||
[vUserWorkTimeList].[hrs] AS [hrs],
|
||||
[vUserWorkTimeList].[ot] AS [ot]
|
||||
FROM [dbo].[vUserWorkTimeList] AS [vUserWorkTimeList]</DefiningQuery>
|
||||
</EntitySet>
|
||||
</EntityContainer>
|
||||
</Schema></edmx:StorageModels>
|
||||
<!-- CSDL content -->
|
||||
<edmx:ConceptualModels>
|
||||
<Schema Namespace="EEModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
|
||||
<EntityType Name="Common">
|
||||
<Key>
|
||||
<PropertyRef Name="idx" />
|
||||
</Key>
|
||||
<Property Name="idx" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="gcode" Type="String" MaxLength="10" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="grp" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="code" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="svalue" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ivalue" Type="Int32" />
|
||||
<Property Name="fvalue" Type="Double" />
|
||||
<Property Name="memo" Type="String" MaxLength="250" FixedLength="false" Unicode="false" />
|
||||
<Property Name="wuid" Type="String" MaxLength="20" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="wdate" Type="DateTime" Nullable="false" Precision="0" />
|
||||
</EntityType>
|
||||
<EntityType Name="UserGroup">
|
||||
<Key>
|
||||
<PropertyRef Name="dept" />
|
||||
</Key>
|
||||
<Property Name="dept" Type="String" MaxLength="100" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="gcode" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="path_kj" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="advpurchase" Type="Boolean" />
|
||||
<Property Name="permission" Type="Int32" />
|
||||
</EntityType>
|
||||
<EntityType Name="Users">
|
||||
<Key>
|
||||
<PropertyRef Name="id" />
|
||||
</Key>
|
||||
<Property Name="id" Type="String" MaxLength="20" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="gcode" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="password" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="nameE" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="dept" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="grade" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="email" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="level" Type="Int16" />
|
||||
<Property Name="indate" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="outdate" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="tel" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="hp" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="place" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ads_employNo" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ads_title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ads_created" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="memo" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
|
||||
<Property Name="wuid" Type="String" MaxLength="20" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="wdate" Type="DateTime" Nullable="false" Precision="0" />
|
||||
<Property Name="processs" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="vHoliday_uselist">
|
||||
<Key>
|
||||
<PropertyRef Name="idx" />
|
||||
<PropertyRef Name="gcode" />
|
||||
<PropertyRef Name="termdr" />
|
||||
<PropertyRef Name="wuid" />
|
||||
<PropertyRef Name="wdate" />
|
||||
</Key>
|
||||
<Property Name="idx" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="gcode" Type="String" MaxLength="10" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="pdate" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="term" Type="Double" />
|
||||
<Property Name="termdr" Type="Int32" Nullable="false" />
|
||||
<Property Name="description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
|
||||
<Property Name="uid" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="wuid" Type="String" MaxLength="20" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="wdate" Type="DateTime" Nullable="false" Precision="0" />
|
||||
</EntityType>
|
||||
<EntityType Name="vUserWorkTimeList">
|
||||
<Key>
|
||||
<PropertyRef Name="gcode" />
|
||||
</Key>
|
||||
<Property Name="gcode" Type="String" MaxLength="10" FixedLength="false" Unicode="false" Nullable="false" />
|
||||
<Property Name="yymm" Type="String" MaxLength="22" FixedLength="false" Unicode="false" />
|
||||
<Property Name="total" Type="Int32" />
|
||||
<Property Name="uid" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="uname" Type="String" MaxLength="200" FixedLength="false" Unicode="false" />
|
||||
<Property Name="hrs" Type="Double" />
|
||||
<Property Name="ot" Type="Double" />
|
||||
</EntityType>
|
||||
<EntityContainer Name="EEEntities" annotation:LazyLoadingEnabled="true">
|
||||
<EntitySet Name="Common" EntityType="Self.Common" />
|
||||
<EntitySet Name="UserGroup" EntityType="Self.UserGroup" />
|
||||
<EntitySet Name="Users" EntityType="Self.Users" />
|
||||
<EntitySet Name="vHoliday_uselist" EntityType="Self.vHoliday_uselist" />
|
||||
<EntitySet Name="vUserWorkTimeList" EntityType="Self.vUserWorkTimeList" />
|
||||
<EntitySet Name="HolidayLIst" EntityType="EEModel.HolidayLIst" />
|
||||
<EntitySet Name="vJobReportForUser" EntityType="EEModel.vJobReportForUser" />
|
||||
<EntitySet Name="vGroupUser" EntityType="EEModel.vGroupUser" />
|
||||
</EntityContainer>
|
||||
<EntityType Name="HolidayLIst">
|
||||
<Key>
|
||||
<PropertyRef Name="idx" />
|
||||
</Key>
|
||||
<Property Name="idx" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
|
||||
<Property Name="pdate" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="free" Type="Boolean" />
|
||||
<Property Name="memo" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
|
||||
<Property Name="wuid" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="wdate" Type="DateTime" Nullable="false" Precision="0" />
|
||||
</EntityType>
|
||||
<EntityType Name="vJobReportForUser">
|
||||
<Key>
|
||||
<PropertyRef Name="idx" />
|
||||
<PropertyRef Name="gcode" />
|
||||
</Key>
|
||||
<Property Name="idx" Type="Int32" Nullable="false" />
|
||||
<Property Name="pdate" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="gcode" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="id" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="process" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="type" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="svalue" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
|
||||
<Property Name="hrs" Type="Double" />
|
||||
<Property Name="ot" Type="Double" />
|
||||
<Property Name="userProcess" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="vGroupUser">
|
||||
<Key>
|
||||
<PropertyRef Name="gcode" />
|
||||
</Key>
|
||||
<Property Name="gcode" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="dept" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="level" Type="Int16" />
|
||||
<Property Name="name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="nameE" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="grade" Type="String" MaxLength="10" FixedLength="false" Unicode="false" />
|
||||
<Property Name="email" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="tel" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="indate" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="outdate" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="hp" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
<Property Name="place" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ads_employNo" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="ads_title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
|
||||
<Property Name="ads_created" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="memo" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
|
||||
<Property Name="processs" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
|
||||
<Property Name="id" Type="String" MaxLength="20" FixedLength="false" Unicode="false" />
|
||||
</EntityType>
|
||||
</Schema>
|
||||
</edmx:ConceptualModels>
|
||||
<!-- C-S mapping content -->
|
||||
<edmx:Mappings>
|
||||
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
|
||||
<EntityContainerMapping StorageEntityContainer="EEModelStoreContainer" CdmEntityContainer="EEEntities">
|
||||
<EntitySetMapping Name="Common">
|
||||
<EntityTypeMapping TypeName="EEModel.Common">
|
||||
<MappingFragment StoreEntitySet="Common">
|
||||
<ScalarProperty Name="idx" ColumnName="idx" />
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
<ScalarProperty Name="grp" ColumnName="grp" />
|
||||
<ScalarProperty Name="code" ColumnName="code" />
|
||||
<ScalarProperty Name="svalue" ColumnName="svalue" />
|
||||
<ScalarProperty Name="ivalue" ColumnName="ivalue" />
|
||||
<ScalarProperty Name="fvalue" ColumnName="fvalue" />
|
||||
<ScalarProperty Name="memo" ColumnName="memo" />
|
||||
<ScalarProperty Name="wuid" ColumnName="wuid" />
|
||||
<ScalarProperty Name="wdate" ColumnName="wdate" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="UserGroup">
|
||||
<EntityTypeMapping TypeName="EEModel.UserGroup">
|
||||
<MappingFragment StoreEntitySet="UserGroup">
|
||||
<ScalarProperty Name="dept" ColumnName="dept" />
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
<ScalarProperty Name="path_kj" ColumnName="path_kj" />
|
||||
<ScalarProperty Name="advpurchase" ColumnName="advpurchase" />
|
||||
<ScalarProperty Name="permission" ColumnName="permission" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="Users">
|
||||
<EntityTypeMapping TypeName="EEModel.Users">
|
||||
<MappingFragment StoreEntitySet="Users">
|
||||
<ScalarProperty Name="id" ColumnName="id" />
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
<ScalarProperty Name="password" ColumnName="password" />
|
||||
<ScalarProperty Name="nameE" ColumnName="nameE" />
|
||||
<ScalarProperty Name="name" ColumnName="name" />
|
||||
<ScalarProperty Name="dept" ColumnName="dept" />
|
||||
<ScalarProperty Name="grade" ColumnName="grade" />
|
||||
<ScalarProperty Name="email" ColumnName="email" />
|
||||
<ScalarProperty Name="level" ColumnName="level" />
|
||||
<ScalarProperty Name="indate" ColumnName="indate" />
|
||||
<ScalarProperty Name="outdate" ColumnName="outdate" />
|
||||
<ScalarProperty Name="tel" ColumnName="tel" />
|
||||
<ScalarProperty Name="hp" ColumnName="hp" />
|
||||
<ScalarProperty Name="place" ColumnName="place" />
|
||||
<ScalarProperty Name="ads_employNo" ColumnName="ads_employNo" />
|
||||
<ScalarProperty Name="ads_title" ColumnName="ads_title" />
|
||||
<ScalarProperty Name="ads_created" ColumnName="ads_created" />
|
||||
<ScalarProperty Name="memo" ColumnName="memo" />
|
||||
<ScalarProperty Name="wuid" ColumnName="wuid" />
|
||||
<ScalarProperty Name="wdate" ColumnName="wdate" />
|
||||
<ScalarProperty Name="processs" ColumnName="processs" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="vHoliday_uselist">
|
||||
<EntityTypeMapping TypeName="EEModel.vHoliday_uselist">
|
||||
<MappingFragment StoreEntitySet="vHoliday_uselist">
|
||||
<ScalarProperty Name="idx" ColumnName="idx" />
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
<ScalarProperty Name="pdate" ColumnName="pdate" />
|
||||
<ScalarProperty Name="term" ColumnName="term" />
|
||||
<ScalarProperty Name="termdr" ColumnName="termdr" />
|
||||
<ScalarProperty Name="description" ColumnName="description" />
|
||||
<ScalarProperty Name="uid" ColumnName="uid" />
|
||||
<ScalarProperty Name="wuid" ColumnName="wuid" />
|
||||
<ScalarProperty Name="wdate" ColumnName="wdate" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="vUserWorkTimeList">
|
||||
<EntityTypeMapping TypeName="EEModel.vUserWorkTimeList">
|
||||
<MappingFragment StoreEntitySet="vUserWorkTimeList">
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
<ScalarProperty Name="yymm" ColumnName="yymm" />
|
||||
<ScalarProperty Name="total" ColumnName="total" />
|
||||
<ScalarProperty Name="uid" ColumnName="uid" />
|
||||
<ScalarProperty Name="uname" ColumnName="uname" />
|
||||
<ScalarProperty Name="hrs" ColumnName="hrs" />
|
||||
<ScalarProperty Name="ot" ColumnName="ot" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="HolidayLIst">
|
||||
<EntityTypeMapping TypeName="EEModel.HolidayLIst">
|
||||
<MappingFragment StoreEntitySet="HolidayLIst">
|
||||
<ScalarProperty Name="wdate" ColumnName="wdate" />
|
||||
<ScalarProperty Name="wuid" ColumnName="wuid" />
|
||||
<ScalarProperty Name="memo" ColumnName="memo" />
|
||||
<ScalarProperty Name="free" ColumnName="free" />
|
||||
<ScalarProperty Name="pdate" ColumnName="pdate" />
|
||||
<ScalarProperty Name="idx" ColumnName="idx" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="vJobReportForUser">
|
||||
<EntityTypeMapping TypeName="EEModel.vJobReportForUser">
|
||||
<MappingFragment StoreEntitySet="vJobReportForUser">
|
||||
<ScalarProperty Name="userProcess" ColumnName="userProcess" />
|
||||
<ScalarProperty Name="ot" ColumnName="ot" />
|
||||
<ScalarProperty Name="hrs" ColumnName="hrs" />
|
||||
<ScalarProperty Name="svalue" ColumnName="svalue" />
|
||||
<ScalarProperty Name="type" ColumnName="type" />
|
||||
<ScalarProperty Name="process" ColumnName="process" />
|
||||
<ScalarProperty Name="name" ColumnName="name" />
|
||||
<ScalarProperty Name="id" ColumnName="id" />
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
<ScalarProperty Name="pdate" ColumnName="pdate" />
|
||||
<ScalarProperty Name="idx" ColumnName="idx" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
<EntitySetMapping Name="vGroupUser">
|
||||
<EntityTypeMapping TypeName="EEModel.vGroupUser">
|
||||
<MappingFragment StoreEntitySet="vGroupUser">
|
||||
<ScalarProperty Name="id" ColumnName="id" />
|
||||
<ScalarProperty Name="processs" ColumnName="processs" />
|
||||
<ScalarProperty Name="memo" ColumnName="memo" />
|
||||
<ScalarProperty Name="ads_created" ColumnName="ads_created" />
|
||||
<ScalarProperty Name="ads_title" ColumnName="ads_title" />
|
||||
<ScalarProperty Name="ads_employNo" ColumnName="ads_employNo" />
|
||||
<ScalarProperty Name="place" ColumnName="place" />
|
||||
<ScalarProperty Name="hp" ColumnName="hp" />
|
||||
<ScalarProperty Name="outdate" ColumnName="outdate" />
|
||||
<ScalarProperty Name="indate" ColumnName="indate" />
|
||||
<ScalarProperty Name="tel" ColumnName="tel" />
|
||||
<ScalarProperty Name="email" ColumnName="email" />
|
||||
<ScalarProperty Name="grade" ColumnName="grade" />
|
||||
<ScalarProperty Name="nameE" ColumnName="nameE" />
|
||||
<ScalarProperty Name="name" ColumnName="name" />
|
||||
<ScalarProperty Name="level" ColumnName="level" />
|
||||
<ScalarProperty Name="dept" ColumnName="dept" />
|
||||
<ScalarProperty Name="gcode" ColumnName="gcode" />
|
||||
</MappingFragment>
|
||||
</EntityTypeMapping>
|
||||
</EntitySetMapping>
|
||||
</EntityContainerMapping>
|
||||
</Mapping>
|
||||
</edmx:Mappings>
|
||||
</edmx:Runtime>
|
||||
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
|
||||
<Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<Connection>
|
||||
<DesignerInfoPropertySet>
|
||||
<DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
|
||||
</DesignerInfoPropertySet>
|
||||
</Connection>
|
||||
<Options>
|
||||
<DesignerInfoPropertySet>
|
||||
<DesignerProperty Name="ValidateOnBuild" Value="true" />
|
||||
<DesignerProperty Name="EnablePluralization" Value="false" />
|
||||
<DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
|
||||
<DesignerProperty Name="UseLegacyProvider" Value="false" />
|
||||
<DesignerProperty Name="CodeGenerationStrategy" Value="없음" />
|
||||
</DesignerInfoPropertySet>
|
||||
</Options>
|
||||
<!-- Diagram content (shape and connector positions) -->
|
||||
<Diagrams></Diagrams>
|
||||
</Designer>
|
||||
</edmx:Edmx>
|
||||
19
SubProject/FPJ0000/Model1.edmx.diagram
Normal file
19
SubProject/FPJ0000/Model1.edmx.diagram
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
|
||||
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
|
||||
<!-- Diagram content (shape and connector positions) -->
|
||||
<edmx:Diagrams>
|
||||
<Diagram DiagramId="3623c0c9bafa476a8e7afe5ab09e2ebe" Name="Diagram1">
|
||||
<EntityTypeShape EntityType="EEModel.Common" Width="1.5" PointX="0.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.UserGroup" Width="1.5" PointX="4.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.Users" Width="1.5" PointX="4.75" PointY="3.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.vHoliday_uselist" Width="1.5" PointX="6.75" PointY="0.75" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.vUserWorkTimeList" Width="1.5" PointX="6.875" PointY="4.25" IsExpanded="true" />
|
||||
<EntityTypeShape EntityType="EEModel.HolidayLIst" Width="1.5" PointX="8.375" PointY="1.375" />
|
||||
<EntityTypeShape EntityType="EEModel.vJobReportForUser" Width="1.5" PointX="0.75" PointY="4.75" />
|
||||
<EntityTypeShape EntityType="EEModel.vGroupUser" Width="1.5" PointX="7.375" PointY="7.75" />
|
||||
</Diagram>
|
||||
</edmx:Diagrams>
|
||||
</edmx:Designer>
|
||||
</edmx:Edmx>
|
||||
733
SubProject/FPJ0000/Model1.tt
Normal file
733
SubProject/FPJ0000/Model1.tt
Normal file
@@ -0,0 +1,733 @@
|
||||
<#@ template language="C#" debug="false" hostspecific="true"#>
|
||||
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
|
||||
output extension=".cs"#><#
|
||||
|
||||
const string inputFile = @"Model1.edmx";
|
||||
var textTransform = DynamicTextTransformation.Create(this);
|
||||
var code = new CodeGenerationTools(this);
|
||||
var ef = new MetadataTools(this);
|
||||
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
|
||||
var fileManager = EntityFrameworkTemplateFileManager.Create(this);
|
||||
var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
|
||||
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
|
||||
|
||||
if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
WriteHeader(codeStringGenerator, fileManager);
|
||||
|
||||
foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection))
|
||||
{
|
||||
fileManager.StartNewFile(entity.Name + ".cs");
|
||||
BeginNamespace(code);
|
||||
#>
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
|
||||
<#=codeStringGenerator.EntityClassOpening(entity)#>
|
||||
{
|
||||
<#
|
||||
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
|
||||
var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
|
||||
var complexProperties = typeMapper.GetComplexProperties(entity);
|
||||
|
||||
if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public <#=code.Escape(entity)#>()
|
||||
{
|
||||
<#
|
||||
foreach (var edmProperty in propertiesWithDefaultValues)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var navigationProperty in collectionNavigationProperties)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var complexProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
|
||||
<#
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
<#
|
||||
}
|
||||
|
||||
var simpleProperties = typeMapper.GetSimpleProperties(entity);
|
||||
if (simpleProperties.Any())
|
||||
{
|
||||
foreach (var edmProperty in simpleProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(edmProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
if (complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
|
||||
<#
|
||||
foreach(var complexProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(complexProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
var navigationProperties = typeMapper.GetNavigationProperties(entity);
|
||||
if (navigationProperties.Any())
|
||||
{
|
||||
#>
|
||||
|
||||
<#
|
||||
foreach (var navigationProperty in navigationProperties)
|
||||
{
|
||||
if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
|
||||
{
|
||||
#>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
<#
|
||||
}
|
||||
#>
|
||||
<#=codeStringGenerator.NavigationProperty(navigationProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
EndNamespace(code);
|
||||
}
|
||||
|
||||
foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection))
|
||||
{
|
||||
fileManager.StartNewFile(complex.Name + ".cs");
|
||||
BeginNamespace(code);
|
||||
#>
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
|
||||
<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
|
||||
{
|
||||
<#
|
||||
var complexProperties = typeMapper.GetComplexProperties(complex);
|
||||
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
|
||||
|
||||
if (propertiesWithDefaultValues.Any() || complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
public <#=code.Escape(complex)#>()
|
||||
{
|
||||
<#
|
||||
foreach (var edmProperty in propertiesWithDefaultValues)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
|
||||
<#
|
||||
}
|
||||
|
||||
foreach (var complexProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
|
||||
<#
|
||||
}
|
||||
#>
|
||||
}
|
||||
|
||||
<#
|
||||
}
|
||||
|
||||
var simpleProperties = typeMapper.GetSimpleProperties(complex);
|
||||
if (simpleProperties.Any())
|
||||
{
|
||||
foreach(var edmProperty in simpleProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(edmProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
if (complexProperties.Any())
|
||||
{
|
||||
#>
|
||||
|
||||
<#
|
||||
foreach(var edmProperty in complexProperties)
|
||||
{
|
||||
#>
|
||||
<#=codeStringGenerator.Property(edmProperty)#>
|
||||
<#
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
EndNamespace(code);
|
||||
}
|
||||
|
||||
foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
|
||||
{
|
||||
fileManager.StartNewFile(enumType.Name + ".cs");
|
||||
BeginNamespace(code);
|
||||
#>
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
|
||||
<#
|
||||
if (typeMapper.EnumIsFlags(enumType))
|
||||
{
|
||||
#>
|
||||
[Flags]
|
||||
<#
|
||||
}
|
||||
#>
|
||||
<#=codeStringGenerator.EnumOpening(enumType)#>
|
||||
{
|
||||
<#
|
||||
var foundOne = false;
|
||||
|
||||
foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
|
||||
{
|
||||
foundOne = true;
|
||||
#>
|
||||
<#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
|
||||
<#
|
||||
}
|
||||
|
||||
if (foundOne)
|
||||
{
|
||||
this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
|
||||
}
|
||||
#>
|
||||
}
|
||||
<#
|
||||
EndNamespace(code);
|
||||
}
|
||||
|
||||
fileManager.Process();
|
||||
|
||||
#>
|
||||
<#+
|
||||
|
||||
public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
|
||||
{
|
||||
fileManager.StartHeader();
|
||||
#>
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
|
||||
//
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
|
||||
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
|
||||
<#+
|
||||
fileManager.EndBlock();
|
||||
}
|
||||
|
||||
public void BeginNamespace(CodeGenerationTools code)
|
||||
{
|
||||
var codeNamespace = code.VsNamespaceSuggestion();
|
||||
if (!String.IsNullOrEmpty(codeNamespace))
|
||||
{
|
||||
#>
|
||||
namespace <#=code.EscapeNamespace(codeNamespace)#>
|
||||
{
|
||||
<#+
|
||||
PushIndent(" ");
|
||||
}
|
||||
}
|
||||
|
||||
public void EndNamespace(CodeGenerationTools code)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
|
||||
{
|
||||
PopIndent();
|
||||
#>
|
||||
}
|
||||
<#+
|
||||
}
|
||||
}
|
||||
|
||||
public const string TemplateId = "CSharp_DbContext_Types_EF6";
|
||||
|
||||
public class CodeStringGenerator
|
||||
{
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly TypeMapper _typeMapper;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(typeMapper, "typeMapper");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
|
||||
_code = code;
|
||||
_typeMapper = typeMapper;
|
||||
_ef = ef;
|
||||
}
|
||||
|
||||
public string Property(EdmProperty edmProperty)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
Accessibility.ForProperty(edmProperty),
|
||||
_typeMapper.GetTypeName(edmProperty.TypeUsage),
|
||||
_code.Escape(edmProperty),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
|
||||
}
|
||||
|
||||
public string NavigationProperty(NavigationProperty navProp)
|
||||
{
|
||||
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2} {{ {3}get; {4}set; }}",
|
||||
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
|
||||
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
|
||||
_code.Escape(navProp),
|
||||
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
|
||||
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
|
||||
}
|
||||
|
||||
public string AccessibilityAndVirtual(string accessibility)
|
||||
{
|
||||
return accessibility + (accessibility != "private" ? " virtual" : "");
|
||||
}
|
||||
|
||||
public string EntityClassOpening(EntityType entity)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1}partial class {2}{3}",
|
||||
Accessibility.ForType(entity),
|
||||
_code.SpaceAfter(_code.AbstractOption(entity)),
|
||||
_code.Escape(entity),
|
||||
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
|
||||
}
|
||||
|
||||
public string EnumOpening(SimpleType enumType)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} enum {1} : {2}",
|
||||
Accessibility.ForType(enumType),
|
||||
_code.Escape(enumType),
|
||||
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
|
||||
}
|
||||
|
||||
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
|
||||
{
|
||||
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
|
||||
{
|
||||
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
|
||||
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
|
||||
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
|
||||
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
|
||||
}
|
||||
}
|
||||
|
||||
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} IQueryable<{1}> {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
_code.Escape(edmFunction),
|
||||
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
|
||||
}
|
||||
|
||||
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
|
||||
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
|
||||
edmFunction.NamespaceName,
|
||||
edmFunction.Name,
|
||||
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
|
||||
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
|
||||
}
|
||||
|
||||
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
|
||||
if (includeMergeOption)
|
||||
{
|
||||
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} {1} {2}({3})",
|
||||
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
|
||||
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
_code.Escape(edmFunction),
|
||||
paramList);
|
||||
}
|
||||
|
||||
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
|
||||
{
|
||||
var parameters = _typeMapper.GetParameters(edmFunction);
|
||||
var returnType = _typeMapper.GetReturnType(edmFunction);
|
||||
|
||||
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
|
||||
if (includeMergeOption)
|
||||
{
|
||||
callParams = ", mergeOption" + callParams;
|
||||
}
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
|
||||
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
|
||||
edmFunction.Name,
|
||||
callParams);
|
||||
}
|
||||
|
||||
public string DbSet(EntitySet entitySet)
|
||||
{
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
|
||||
Accessibility.ForReadOnlyProperty(entitySet),
|
||||
_typeMapper.GetTypeName(entitySet.ElementType),
|
||||
_code.Escape(entitySet));
|
||||
}
|
||||
|
||||
public string UsingDirectives(bool inHeader, bool includeCollections = true)
|
||||
{
|
||||
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
|
||||
? string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"{0}using System;{1}" +
|
||||
"{2}",
|
||||
inHeader ? Environment.NewLine : "",
|
||||
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
|
||||
inHeader ? "" : Environment.NewLine)
|
||||
: "";
|
||||
}
|
||||
}
|
||||
|
||||
public class TypeMapper
|
||||
{
|
||||
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
|
||||
|
||||
private readonly System.Collections.IList _errors;
|
||||
private readonly CodeGenerationTools _code;
|
||||
private readonly MetadataTools _ef;
|
||||
|
||||
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
|
||||
{
|
||||
ArgumentNotNull(code, "code");
|
||||
ArgumentNotNull(ef, "ef");
|
||||
ArgumentNotNull(errors, "errors");
|
||||
|
||||
_code = code;
|
||||
_ef = ef;
|
||||
_errors = errors;
|
||||
}
|
||||
|
||||
public static string FixNamespaces(string typeName)
|
||||
{
|
||||
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
|
||||
}
|
||||
|
||||
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
|
||||
{
|
||||
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, string modelNamespace)
|
||||
{
|
||||
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
|
||||
}
|
||||
|
||||
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
|
||||
{
|
||||
if (edmType == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var collectionType = edmType as CollectionType;
|
||||
if (collectionType != null)
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
|
||||
}
|
||||
|
||||
var typeName = _code.Escape(edmType.MetadataProperties
|
||||
.Where(p => p.Name == ExternalTypeNameAttributeName)
|
||||
.Select(p => (string)p.Value)
|
||||
.FirstOrDefault())
|
||||
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
|
||||
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
|
||||
_code.Escape(edmType));
|
||||
|
||||
if (edmType is StructuralType)
|
||||
{
|
||||
return typeName;
|
||||
}
|
||||
|
||||
if (edmType is SimpleType)
|
||||
{
|
||||
var clrType = UnderlyingClrType(edmType);
|
||||
if (!IsEnumType(edmType))
|
||||
{
|
||||
typeName = _code.Escape(clrType);
|
||||
}
|
||||
|
||||
typeName = FixNamespaces(typeName);
|
||||
|
||||
return clrType.IsValueType && isNullable == true ?
|
||||
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
|
||||
typeName;
|
||||
}
|
||||
|
||||
throw new ArgumentException("edmType");
|
||||
}
|
||||
|
||||
public Type UnderlyingClrType(EdmType edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
var primitiveType = edmType as PrimitiveType;
|
||||
if (primitiveType != null)
|
||||
{
|
||||
return primitiveType.ClrEquivalentType;
|
||||
}
|
||||
|
||||
if (IsEnumType(edmType))
|
||||
{
|
||||
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
|
||||
}
|
||||
|
||||
return typeof(object);
|
||||
}
|
||||
|
||||
public object GetEnumMemberValue(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var valueProperty = enumMember.GetType().GetProperty("Value");
|
||||
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public string GetEnumMemberName(MetadataItem enumMember)
|
||||
{
|
||||
ArgumentNotNull(enumMember, "enumMember");
|
||||
|
||||
var nameProperty = enumMember.GetType().GetProperty("Name");
|
||||
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
|
||||
}
|
||||
|
||||
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var membersProperty = enumType.GetType().GetProperty("Members");
|
||||
return membersProperty != null
|
||||
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
|
||||
: Enumerable.Empty<MetadataItem>();
|
||||
}
|
||||
|
||||
public bool EnumIsFlags(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
|
||||
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public bool IsEnumType(GlobalItem edmType)
|
||||
{
|
||||
ArgumentNotNull(edmType, "edmType");
|
||||
|
||||
return edmType.GetType().Name == "EnumType";
|
||||
}
|
||||
|
||||
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
|
||||
{
|
||||
ArgumentNotNull(enumType, "enumType");
|
||||
|
||||
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
|
||||
}
|
||||
|
||||
public string CreateLiteral(object value)
|
||||
{
|
||||
if (value == null || value.GetType() != typeof(TimeSpan))
|
||||
{
|
||||
return _code.CreateLiteral(value);
|
||||
}
|
||||
|
||||
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
|
||||
}
|
||||
|
||||
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
|
||||
{
|
||||
ArgumentNotNull(types, "types");
|
||||
ArgumentNotNull(sourceFile, "sourceFile");
|
||||
|
||||
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
|
||||
if (types.Any(item => !hash.Add(item)))
|
||||
{
|
||||
_errors.Add(
|
||||
new CompilerError(sourceFile, -1, -1, "6023",
|
||||
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return GetItemsToGenerate<SimpleType>(itemCollection)
|
||||
.Where(e => IsEnumType(e));
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
|
||||
{
|
||||
return itemCollection
|
||||
.OfType<T>()
|
||||
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
|
||||
.OrderBy(i => i.Name);
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
|
||||
{
|
||||
return itemCollection
|
||||
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
|
||||
.Select(g => GetGlobalItemName(g));
|
||||
}
|
||||
|
||||
public string GetGlobalItemName(GlobalItem item)
|
||||
{
|
||||
if (item is EdmType)
|
||||
{
|
||||
return ((EdmType)item).Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((EntityContainer)item).Name;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
|
||||
{
|
||||
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type);
|
||||
}
|
||||
|
||||
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
|
||||
{
|
||||
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
|
||||
}
|
||||
|
||||
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
|
||||
return returnParamsProperty == null
|
||||
? edmFunction.ReturnParameter
|
||||
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
|
||||
}
|
||||
|
||||
public bool IsComposable(EdmFunction edmFunction)
|
||||
{
|
||||
ArgumentNotNull(edmFunction, "edmFunction");
|
||||
|
||||
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
|
||||
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
|
||||
}
|
||||
|
||||
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
|
||||
{
|
||||
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
|
||||
}
|
||||
|
||||
public TypeUsage GetReturnType(EdmFunction edmFunction)
|
||||
{
|
||||
var returnParam = GetReturnParameter(edmFunction);
|
||||
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
|
||||
}
|
||||
|
||||
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
|
||||
{
|
||||
var returnType = GetReturnType(edmFunction);
|
||||
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ArgumentNotNull<T>(T arg, string name) where T : class
|
||||
{
|
||||
if (arg == null)
|
||||
{
|
||||
throw new ArgumentNullException(name);
|
||||
}
|
||||
}
|
||||
#>
|
||||
@@ -26,6 +26,7 @@ namespace FPJ0000
|
||||
int colidx_supplyidx = -1;
|
||||
int colidx_sid = -1;
|
||||
int colidx_manu = -1;
|
||||
int colidx_unit = -1;
|
||||
|
||||
|
||||
public fPartList(int idx_)
|
||||
@@ -114,6 +115,7 @@ namespace FPJ0000
|
||||
else if (colname == "itemsupply") colidx_supply = col.Index;
|
||||
else if (colname == "itemsid") colidx_sid = col.Index;
|
||||
else if (colname == "itemmanu") colidx_manu = col.Index;
|
||||
else if (colname == "itemunit") colidx_unit = col.Index;
|
||||
}
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
@@ -485,8 +487,10 @@ namespace FPJ0000
|
||||
//fpSpread1.ActiveSheet.Cells[Rowidx, colidx_supplyidx].Value = f.itemSupplyidx;
|
||||
//fpSpread1.ActiveSheet.Cells[Rowidx, colidx_supply].Value = f.itemSupply;
|
||||
|
||||
//제조사추가 201022
|
||||
//제조사추가 201022 - 박성민
|
||||
fpSpread1.ActiveSheet.Cells[Rowidx, colidx_manu].Value = f.itemManu.Replace(" ", "").Trim();
|
||||
//단위추가 201028 - 박성민
|
||||
fpSpread1.ActiveSheet.Cells[Rowidx, colidx_unit].Value = f.itemUnit.Replace(" ", "").Trim();
|
||||
|
||||
if (f.itemmodel != "")
|
||||
fpSpread1.ActiveSheet.Cells[Rowidx, colidx_model].Value = f.itemmodel;
|
||||
|
||||
@@ -396,20 +396,20 @@
|
||||
<data name="toolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALvSURBVDhPhZJZTxNRGIZ7JT/BoBdekrhAFKNGLxQELGCC
|
||||
GwJBZCuFgIAEajARawpGZDEgARI1BKLxQg24QAHLVtrSNrQKUhCQfUtYKtBlpu20vJ6ZVsCExC95ci7O
|
||||
vE/me2d47AQ/kCdcLtXIIso0v0PEGoqcNEc5e2rpiFI1HfZUZTgnUlQejny3jwvtntDHSsWKiV4zGAxO
|
||||
o8UGo3mHNRMLjZ9LJhR8nkNM2aiVnyn18kTdE16sWmHD6hkHtLMMtHMMNDMMVNN2yH/Z0DZigY0Bmkcp
|
||||
FHycRfJzA/WPJETcRm1a7dDPO/FtniEng35OYkfvhA1fR6xE4IJ+yQntogNF0jkE3u96y4WjywOmbooj
|
||||
t4Q115FcfQPV7Q0obCxHoNgXAQR+0VkES06hormCW8VMM1hetyI4vpfhBFGlgR+6hlrQMv4K1Zo8ThJf
|
||||
FYa8N3HIaoiBoPYKkmqT0Dy4jBaDGV9+bGKD9BQiUdKcgF/J9zoiznZqxnrwekiCEnkmJ0moCSfhq0h7
|
||||
kQrFhIVbpXOcgoz0sG5xIKSwzy1gJ7S4l86pS4RuQoVa7T086chFdPlFJFRFQjdjhY4UyxasmHR3YiSC
|
||||
YMkuwfmHYsfp/EOIq+RDP6lGUU86JNIcxDwLQoP8EwYWGOhIseppB/oIKyYHAh95BCdE3kJ/0UFk1cfi
|
||||
Vk0oYisucZIcaRxEjankTYLA3uvnnOhnPzHBRIr0y1a5Bf6i/Qv+ogPkIW/453njWkkQMl4mQjEiQ5Es
|
||||
H+nvEyGoiYKOCLTk39AQAe1wEYF8Z4UL2Up6aYPG4IKTo3dsEXfr0pBCgsLaGOTW39m+Y7HanUTQtCNg
|
||||
bfPGHcH/sLArpO4SnMnptrYq9Ft7PbwXA0PDrmPxzWZPnBSZ1jE1u2k1dSu/u6ZWKUytUJjwsGp2cLDN
|
||||
m2kndAMGF0VRGz63W4c9cR7vZFp7hp+greO4UGb0EzbR26S48f2LoIn2EbSuH01q7fRNlCbzeDzeH4+W
|
||||
nwKzKldlAAAAAElFTkSuQmCC
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALvSURBVDhPhZLrS1NhHMf3qv6EsF70UpBSyqioF6WpTQ3s
|
||||
Zipm3uYcmtrQhUG2mEbmJTRRoUKUohcV2kWnNm/bnNtwauoyNe838LLUXc7Rnc1vzzlbzkDoBx+eF8/5
|
||||
fji/7zk8doIfKhOuFOsUESW63yFSHUVOmqOUPfV0RLGWDnumMZ6XqMt9It8f4EJ7J/RJt3rFTK8ZjUaH
|
||||
yboFk8XDmpmFxs8lM/K+zCGmZNTGz5AfdEddE16oWWHD2hk79LMM9HMMdDMMNNPbUP7aQsuIFVsM0DhK
|
||||
Ie/TLJJfGKl/JCHSFmrTto2+eQf65xlyMujlJNtQTWzh24iNCJzoW3JAv2hHgXwOgQ863nHh6NKAqVvS
|
||||
yB1h1Q0kV95EZWsd8utLESj1RQCBX3AOwbLTKGss41ax0AyW120IjlcxnCCqOPBjx3ATmsZfo1KXw0ni
|
||||
K8KQ8zYOmXUxEFRfRVJ1EhoHl9FktODr0CY2SE8hsm6aE/DL+Qd9pFkO3VgX3gzLUKTM4CQJVeEkfA2i
|
||||
l6lQT1i5VdrHKShID+tWO0Lye1wCdkILVbS4JhGGCQ2q9ffxtC0b0aWXkFARCcOMDQZSLFuwetLViYkI
|
||||
gmV7BBceSe1nco8irpyPvkktCrrSIJOLEfM8CHXKz/i+wMBAitVO29FDWDHbEfjYLTgp8RL6S44gszYW
|
||||
t6tCEVt2mZOI5XGQ1KeSNwkCe98350Av+4kJZlKkX5bGJfCXHFrwlxwmD3nBP8cL14uCkP4qEeoRBQoU
|
||||
uUj7kAhBVRQMRKAn/4aOCGi7kwiUnhUuZnXTSxs0BhccHKqxRdyrESGFBIXVMciuvbt7x2LbdhBBg0fA
|
||||
2uZNHsH/sLIrpO4RnBV32uQqw85+D+/HwJDReTy+0eKOkyJFbVOzmzZzp7rfObVKYWqFwoSbVYudg23e
|
||||
QpMiB4adFEVteN9p/uGO83inRK3pfoKWthNChclP2EDvkuLC9y+CBtpb0Lx+LKm53TdRnszj8Xh/AIdo
|
||||
nvbIfe02AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButton4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
||||
245
SubProject/FPJ0000/Project/fSPMaster.Designer.cs
generated
245
SubProject/FPJ0000/Project/fSPMaster.Designer.cs
generated
@@ -33,21 +33,21 @@
|
||||
FarPoint.Win.Spread.FlatFocusIndicatorRenderer flatFocusIndicatorRenderer1 = new FarPoint.Win.Spread.FlatFocusIndicatorRenderer();
|
||||
FarPoint.Win.Spread.FlatScrollBarRenderer flatScrollBarRenderer1 = new FarPoint.Win.Spread.FlatScrollBarRenderer();
|
||||
FarPoint.Win.Spread.FlatScrollBarRenderer flatScrollBarRenderer2 = new FarPoint.Win.Spread.FlatScrollBarRenderer();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType1 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType2 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType2 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType3 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType4 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType5 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType6 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType7 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType8 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType9 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType10 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType11 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType12 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType13 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType5 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType27 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType28 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.NumberCellType numberCellType6 = new FarPoint.Win.Spread.CellType.NumberCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType29 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType30 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType31 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType32 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType33 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType34 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType35 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType36 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType37 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType38 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
FarPoint.Win.Spread.CellType.TextCellType textCellType39 = new FarPoint.Win.Spread.CellType.TextCellType();
|
||||
this.bn = new System.Windows.Forms.BindingNavigator(this.components);
|
||||
this.bs = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.dsMSSQL = new FPJ0000.dsPRJ();
|
||||
@@ -71,19 +71,20 @@
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.exportListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.tbFind = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
|
||||
this.chkZeroCount = new System.Windows.Forms.ToolStripButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
|
||||
this.bn.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).BeginInit();
|
||||
this.cm1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).BeginInit();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// bn
|
||||
@@ -103,7 +104,8 @@
|
||||
this.bindingNavigatorMoveNextItem,
|
||||
this.bindingNavigatorMoveLastItem,
|
||||
this.bindingNavigatorSeparator2,
|
||||
this.toolStripSeparator1});
|
||||
this.toolStripSeparator1,
|
||||
this.chkZeroCount});
|
||||
this.bn.Location = new System.Drawing.Point(0, 514);
|
||||
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
|
||||
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
|
||||
@@ -119,6 +121,7 @@
|
||||
//
|
||||
this.bs.DataMember = "SPMaster";
|
||||
this.bs.DataSource = this.dsMSSQL;
|
||||
this.bs.Filter = "CurrentQty > 0";
|
||||
this.bs.CurrentChanged += new System.EventHandler(this.bs_CurrentChanged);
|
||||
//
|
||||
// dsMSSQL
|
||||
@@ -205,6 +208,7 @@
|
||||
// tam
|
||||
//
|
||||
this.tam.BackupDataSetBeforeUpdate = false;
|
||||
this.tam.EETGW_NoteTableAdapter = null;
|
||||
this.tam.JobReportTableAdapter = null;
|
||||
this.tam.ProjectsHistoryTableAdapter = null;
|
||||
this.tam.ProjectsIOMapTableAdapter = null;
|
||||
@@ -298,6 +302,104 @@
|
||||
this.exportListToolStripMenuItem.Text = "목록 내보내기";
|
||||
this.exportListToolStripMenuItem.Click += new System.EventHandler(this.exportListToolStripMenuItem_Click);
|
||||
//
|
||||
// fpSpread1_Sheet1
|
||||
//
|
||||
this.fpSpread1_Sheet1.Reset();
|
||||
this.fpSpread1_Sheet1.SheetName = "Sheet1";
|
||||
// Formulas and custom names must be loaded with R1C1 reference style
|
||||
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1;
|
||||
this.fpSpread1_Sheet1.ColumnCount = 15;
|
||||
this.fpSpread1_Sheet1.ActiveColumnIndex = -1;
|
||||
this.fpSpread1_Sheet1.ActiveRowIndex = -1;
|
||||
this.fpSpread1_Sheet1.AutoGenerateColumns = false;
|
||||
this.fpSpread1_Sheet1.ColumnFooter.DefaultStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnFooter.DefaultStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnFooter.DefaultStyle.Parent = "ColumnFooterFlat";
|
||||
this.fpSpread1_Sheet1.ColumnFooterSheetCornerStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnFooterSheetCornerStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnFooterSheetCornerStyle.Parent = "CornerFooterFlat";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.DefaultStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnHeader.DefaultStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnHeader.DefaultStyle.Parent = "ColumnHeaderFlat";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Rows.Get(0).Height = 36F;
|
||||
numberCellType5.DecimalPlaces = 0;
|
||||
numberCellType5.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
|
||||
numberCellType5.MaximumValue = 2147483647D;
|
||||
numberCellType5.MinimumValue = -2147483648D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).CellType = numberCellType5;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).DataField = "ID";
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).Visible = false;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).Width = 77F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType27;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).DataField = "CtrlNo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).Visible = false;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).Width = 151F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType28;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).DataField = "SIDNo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).Width = 98F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
|
||||
numberCellType6.MaximumValue = 999999999999999D;
|
||||
numberCellType6.MinimumValue = -999999999999999D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).CellType = numberCellType6;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).DataField = "CurrentQty";
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).Width = 97F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType29;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).DataField = "PartName";
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).Width = 91F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType30;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).DataField = "PartNo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).CellType = textCellType31;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).DataField = "Storage";
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).Width = 91F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).CellType = textCellType32;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).DataField = "Location";
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).Width = 97F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).CellType = textCellType33;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).DataField = "UseEqmt";
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Visible = false;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Width = 151F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).CellType = textCellType34;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).DataField = "SupplierNo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Visible = false;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Width = 151F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).CellType = textCellType35;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).DataField = "Division";
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).Width = 126F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).CellType = textCellType36;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).DataField = "PriceUnit";
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).Width = 72F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).CellType = textCellType37;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).DataField = "Memo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).Width = 77F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).CellType = textCellType38;
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).DataField = "EnrDate";
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).Width = 96F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).CellType = textCellType39;
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).DataField = "Enrollee";
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).Width = 94F;
|
||||
this.fpSpread1_Sheet1.DataAutoSizeColumns = false;
|
||||
this.fpSpread1_Sheet1.DataSource = this.bs;
|
||||
this.fpSpread1_Sheet1.FilterBar.DefaultStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.FilterBar.DefaultStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.FilterBar.DefaultStyle.Parent = "FilterBarFlat";
|
||||
this.fpSpread1_Sheet1.FilterBarHeaderStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.FilterBarHeaderStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.FilterBarHeaderStyle.Parent = "FilterBarHeaderFlat";
|
||||
this.fpSpread1_Sheet1.RowHeader.Columns.Default.Resizable = false;
|
||||
this.fpSpread1_Sheet1.RowHeader.DefaultStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.RowHeader.DefaultStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.RowHeader.DefaultStyle.Parent = "RowHeaderFlat";
|
||||
this.fpSpread1_Sheet1.SheetCornerStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.SheetCornerStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.SheetCornerStyle.Parent = "CornerHeaderFlat";
|
||||
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.tbFind);
|
||||
@@ -344,103 +446,15 @@
|
||||
this.label3.Text = "검색";
|
||||
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// fpSpread1_Sheet1
|
||||
// chkZeroCount
|
||||
//
|
||||
this.fpSpread1_Sheet1.Reset();
|
||||
this.fpSpread1_Sheet1.SheetName = "Sheet1";
|
||||
// Formulas and custom names must be loaded with R1C1 reference style
|
||||
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1;
|
||||
this.fpSpread1_Sheet1.ColumnCount = 15;
|
||||
this.fpSpread1_Sheet1.ActiveColumnIndex = -1;
|
||||
this.fpSpread1_Sheet1.ActiveRowIndex = -1;
|
||||
this.fpSpread1_Sheet1.AutoGenerateColumns = false;
|
||||
this.fpSpread1_Sheet1.ColumnFooter.DefaultStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnFooter.DefaultStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnFooter.DefaultStyle.Parent = "ColumnFooterFlat";
|
||||
this.fpSpread1_Sheet1.ColumnFooterSheetCornerStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnFooterSheetCornerStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnFooterSheetCornerStyle.Parent = "CornerFooterFlat";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.DefaultStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnHeader.DefaultStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.ColumnHeader.DefaultStyle.Parent = "ColumnHeaderFlat";
|
||||
this.fpSpread1_Sheet1.ColumnHeader.Rows.Get(0).Height = 36F;
|
||||
numberCellType1.DecimalPlaces = 0;
|
||||
numberCellType1.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
|
||||
numberCellType1.MaximumValue = 2147483647D;
|
||||
numberCellType1.MinimumValue = -2147483648D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).CellType = numberCellType1;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).DataField = "ID";
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).Visible = false;
|
||||
this.fpSpread1_Sheet1.Columns.Get(0).Width = 77F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType1;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).DataField = "CtrlNo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).Visible = false;
|
||||
this.fpSpread1_Sheet1.Columns.Get(1).Width = 151F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType2;
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).DataField = "SIDNo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(2).Width = 98F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
|
||||
numberCellType2.MaximumValue = 999999999999999D;
|
||||
numberCellType2.MinimumValue = -999999999999999D;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).CellType = numberCellType2;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).DataField = "CurrentQty";
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(3).Width = 97F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType3;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).DataField = "PartName";
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(4).Width = 91F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType4;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).DataField = "PartNo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(5).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).CellType = textCellType5;
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).DataField = "Storage";
|
||||
this.fpSpread1_Sheet1.Columns.Get(6).Width = 91F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).CellType = textCellType6;
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).DataField = "Location";
|
||||
this.fpSpread1_Sheet1.Columns.Get(7).Width = 97F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).CellType = textCellType7;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).DataField = "UseEqmt";
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Visible = false;
|
||||
this.fpSpread1_Sheet1.Columns.Get(8).Width = 151F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).CellType = textCellType8;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).DataField = "SupplierNo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Visible = false;
|
||||
this.fpSpread1_Sheet1.Columns.Get(9).Width = 151F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).CellType = textCellType9;
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).DataField = "Division";
|
||||
this.fpSpread1_Sheet1.Columns.Get(10).Width = 126F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).CellType = textCellType10;
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).DataField = "PriceUnit";
|
||||
this.fpSpread1_Sheet1.Columns.Get(11).Width = 72F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).CellType = textCellType11;
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).DataField = "Memo";
|
||||
this.fpSpread1_Sheet1.Columns.Get(12).Width = 77F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).CellType = textCellType12;
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).DataField = "EnrDate";
|
||||
this.fpSpread1_Sheet1.Columns.Get(13).Width = 96F;
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).CellType = textCellType13;
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).DataField = "Enrollee";
|
||||
this.fpSpread1_Sheet1.Columns.Get(14).Width = 94F;
|
||||
this.fpSpread1_Sheet1.DataAutoSizeColumns = false;
|
||||
this.fpSpread1_Sheet1.DataSource = this.bs;
|
||||
this.fpSpread1_Sheet1.FilterBar.DefaultStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.FilterBar.DefaultStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.FilterBar.DefaultStyle.Parent = "FilterBarFlat";
|
||||
this.fpSpread1_Sheet1.FilterBarHeaderStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.FilterBarHeaderStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.FilterBarHeaderStyle.Parent = "FilterBarHeaderFlat";
|
||||
this.fpSpread1_Sheet1.RowHeader.Columns.Default.Resizable = false;
|
||||
this.fpSpread1_Sheet1.RowHeader.DefaultStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.RowHeader.DefaultStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.RowHeader.DefaultStyle.Parent = "RowHeaderFlat";
|
||||
this.fpSpread1_Sheet1.SheetCornerStyle.BackColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.SheetCornerStyle.ForeColor = System.Drawing.Color.Empty;
|
||||
this.fpSpread1_Sheet1.SheetCornerStyle.Parent = "CornerHeaderFlat";
|
||||
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1;
|
||||
this.chkZeroCount.CheckOnClick = true;
|
||||
this.chkZeroCount.Image = global::FPJ0000.Properties.Resources.accept;
|
||||
this.chkZeroCount.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.chkZeroCount.Name = "chkZeroCount";
|
||||
this.chkZeroCount.Size = new System.Drawing.Size(96, 22);
|
||||
this.chkZeroCount.Text = "수량 \'0\' 포함";
|
||||
this.chkZeroCount.Click += new System.EventHandler(this.chkZeroCount_Click);
|
||||
//
|
||||
// fSPMaster
|
||||
//
|
||||
@@ -459,9 +473,9 @@
|
||||
((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).EndInit();
|
||||
this.cm1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).EndInit();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -503,5 +517,6 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem loadToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exportListToolStripMenuItem;
|
||||
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
|
||||
private System.Windows.Forms.ToolStripButton chkZeroCount;
|
||||
}
|
||||
}
|
||||
@@ -164,5 +164,13 @@ namespace FPJ0000
|
||||
{
|
||||
FPUtil.ColSizeLoad(ref this.fpSpread1, fn_fpcolsize);
|
||||
}
|
||||
|
||||
private void chkZeroCount_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (chkZeroCount.Checked)
|
||||
this.bs.Filter = "CurrentQty > 0";
|
||||
else
|
||||
this.bs.Filter = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,6 +167,9 @@
|
||||
8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="dsMSSQL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ta.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>186, 17</value>
|
||||
</metadata>
|
||||
@@ -176,6 +179,9 @@
|
||||
<metadata name="cm1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>387, 17</value>
|
||||
</metadata>
|
||||
<metadata name="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>462, 17</value>
|
||||
</metadata>
|
||||
<data name="autoToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
R0lGODlhEAAQAIQfAJXG2JXa+ZLO5ChrlkCy4TZ1kiVvpCN0trvo9SN5xTd4lrfh7iR9zo3S+EGz7JDJ
|
||||
@@ -215,7 +221,4 @@
|
||||
vmv/Akgg2IMBDgsSdJwcAEICDhoECjDAmQIFBQouXNiwQYPOgqgLBgQAOw==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>462, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
11
SubProject/FPJ0000/Properties/Settings.Designer.cs
generated
11
SubProject/FPJ0000/Properties/Settings.Designer.cs
generated
@@ -33,5 +33,16 @@ namespace FPJ0000.Properties {
|
||||
return ((string)(this["gwcs"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=ee" +
|
||||
"user;Password=Amkor123!")]
|
||||
public string EEEntities {
|
||||
get {
|
||||
return ((string)(this["EEEntities"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,14 @@
|
||||
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<ConnectionString>Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!</ConnectionString>
|
||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!</Value>
|
||||
</Setting>
|
||||
<Setting Name="EEEntities" Type="(Connection string)" Scope="Application">
|
||||
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<ConnectionString>Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!</ConnectionString>
|
||||
<ProviderName>System.Data.SqlClient</ProviderName>
|
||||
</SerializableConnectionString></DesignTimeValue>
|
||||
<Value Profile="(Default)">Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!</Value>
|
||||
</Setting>
|
||||
|
||||
BIN
SubProject/FPJ0000/ReportForUser.xlsx
Normal file
BIN
SubProject/FPJ0000/ReportForUser.xlsx
Normal file
Binary file not shown.
23
SubProject/FPJ0000/UserGroup.cs
Normal file
23
SubProject/FPJ0000/UserGroup.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class UserGroup
|
||||
{
|
||||
public string dept { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string path_kj { get; set; }
|
||||
public Nullable<bool> advpurchase { get; set; }
|
||||
public Nullable<int> permission { get; set; }
|
||||
}
|
||||
}
|
||||
39
SubProject/FPJ0000/Users.cs
Normal file
39
SubProject/FPJ0000/Users.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class Users
|
||||
{
|
||||
public string id { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string password { get; set; }
|
||||
public string nameE { get; set; }
|
||||
public string name { get; set; }
|
||||
public string dept { get; set; }
|
||||
public string grade { get; set; }
|
||||
public string email { get; set; }
|
||||
public Nullable<short> level { get; set; }
|
||||
public string indate { get; set; }
|
||||
public string outdate { get; set; }
|
||||
public string tel { get; set; }
|
||||
public string hp { get; set; }
|
||||
public string place { get; set; }
|
||||
public string ads_employNo { get; set; }
|
||||
public string ads_title { get; set; }
|
||||
public string ads_created { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
public string processs { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
</configSections>
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
|
||||
<connectionStrings>
|
||||
<add name="FEQ0000.Properties.Settings.gwcs" connectionString="Data Source=10.131.32.29;Initial Catalog=GroupWare;Persist Security Info=True;User ID=gw;Password=Amkor123!" providerName="System.Data.SqlClient"/>
|
||||
<add name="FPJ0000.Properties.Settings.gwcs" connectionString="Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!" providerName="System.Data.SqlClient"/>
|
||||
<add name="FEQ0000.Properties.Settings.gwcs" connectionString="Data Source=10.131.32.29;Initial Catalog=GroupWare;Persist Security Info=True;User ID=gw;Password=Amkor123!"
|
||||
providerName="System.Data.SqlClient" />
|
||||
<add name="FPJ0000.Properties.Settings.gwcs" connectionString="Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!"
|
||||
providerName="System.Data.SqlClient" />
|
||||
<add name="EEEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=10.131.15.18;initial catalog=EE;persist security info=True;user id=eeuser;password=Amkor123!;MultipleActiveResultSets=True;App=EntityFramework""
|
||||
providerName="System.Data.EntityClient" />
|
||||
<add name="FPJ0000.Properties.Settings.EEEntities" connectionString="Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=Amkor123!"
|
||||
providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
|
||||
</startup>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
<parameters>
|
||||
<parameter value="mssqllocaldb" />
|
||||
</parameters>
|
||||
</defaultConnectionFactory>
|
||||
<providers>
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||
</providers>
|
||||
</entityFramework>
|
||||
</configuration>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.2.0" targetFramework="net40" />
|
||||
<package id="EntityFramework.ko" version="6.2.0" targetFramework="net40" />
|
||||
<package id="NetOffice.Core" version="1.7.4.4" targetFramework="net40" />
|
||||
<package id="NetOffice.Outlook" version="1.7.4.4" targetFramework="net40" />
|
||||
<package id="NetSpell" version="2.1.7" targetFramework="net45" />
|
||||
|
||||
36
SubProject/FPJ0000/vGroupUser.cs
Normal file
36
SubProject/FPJ0000/vGroupUser.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class vGroupUser
|
||||
{
|
||||
public string gcode { get; set; }
|
||||
public string dept { get; set; }
|
||||
public Nullable<short> level { get; set; }
|
||||
public string name { get; set; }
|
||||
public string nameE { get; set; }
|
||||
public string grade { get; set; }
|
||||
public string email { get; set; }
|
||||
public string tel { get; set; }
|
||||
public string indate { get; set; }
|
||||
public string outdate { get; set; }
|
||||
public string hp { get; set; }
|
||||
public string place { get; set; }
|
||||
public string ads_employNo { get; set; }
|
||||
public string ads_title { get; set; }
|
||||
public string ads_created { get; set; }
|
||||
public string memo { get; set; }
|
||||
public string processs { get; set; }
|
||||
public string id { get; set; }
|
||||
}
|
||||
}
|
||||
27
SubProject/FPJ0000/vHoliday_uselist.cs
Normal file
27
SubProject/FPJ0000/vHoliday_uselist.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class vHoliday_uselist
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string pdate { get; set; }
|
||||
public Nullable<double> term { get; set; }
|
||||
public int termdr { get; set; }
|
||||
public string description { get; set; }
|
||||
public string uid { get; set; }
|
||||
public string wuid { get; set; }
|
||||
public System.DateTime wdate { get; set; }
|
||||
}
|
||||
}
|
||||
29
SubProject/FPJ0000/vJobReportForUser.cs
Normal file
29
SubProject/FPJ0000/vJobReportForUser.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class vJobReportForUser
|
||||
{
|
||||
public int idx { get; set; }
|
||||
public string pdate { get; set; }
|
||||
public string gcode { get; set; }
|
||||
public string id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string process { get; set; }
|
||||
public string type { get; set; }
|
||||
public string svalue { get; set; }
|
||||
public Nullable<double> hrs { get; set; }
|
||||
public Nullable<double> ot { get; set; }
|
||||
public string userProcess { get; set; }
|
||||
}
|
||||
}
|
||||
25
SubProject/FPJ0000/vUserWorkTimeList.cs
Normal file
25
SubProject/FPJ0000/vUserWorkTimeList.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 이 코드는 템플릿에서 생성되었습니다.
|
||||
//
|
||||
// 이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
|
||||
// 이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FPJ0000
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class vUserWorkTimeList
|
||||
{
|
||||
public string gcode { get; set; }
|
||||
public string yymm { get; set; }
|
||||
public Nullable<int> total { get; set; }
|
||||
public string uid { get; set; }
|
||||
public string uname { get; set; }
|
||||
public Nullable<double> hrs { get; set; }
|
||||
public Nullable<double> ot { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user