Commit bf1c81aa by Alex Nasyr

фигня другая

parent ac9e249e
...@@ -18,6 +18,7 @@ namespace SocialMinistryDataExchange.Model { ...@@ -18,6 +18,7 @@ namespace SocialMinistryDataExchange.Model {
where st.Личность == new Guid(PersonID) where st.Личность == new Guid(PersonID)
orderby st.НачальнаяДатаСтатуса descending orderby st.НачальнаяДатаСтатуса descending
select new SMDefenceDemandResponce { PersonID = st.Личность, Status = st.ТипНуждаемостиNavigation.Наименование, StartDate = st.НачальнаяДатаСтатуса, EndDate = st.КонечнаяДатаСтатуса }).First(); select new SMDefenceDemandResponce { PersonID = st.Личность, Status = st.ТипНуждаемостиNavigation.Наименование, StartDate = st.НачальнаяДатаСтатуса, EndDate = st.КонечнаяДатаСтатуса }).First();
return Task.FromResult(status); return Task.FromResult(status);
} }
...@@ -77,6 +78,7 @@ namespace SocialMinistryDataExchange.Model { ...@@ -77,6 +78,7 @@ namespace SocialMinistryDataExchange.Model {
responce.Add(responce_record); responce.Add(responce_record);
} }
return Task.FromResult(responce); return Task.FromResult(responce);
} }
...@@ -85,6 +87,7 @@ namespace SocialMinistryDataExchange.Model { ...@@ -85,6 +87,7 @@ namespace SocialMinistryDataExchange.Model {
return null; return null;
} }
var type = (from too in context.ТипОбразовательнойОрганизацииs where too.PrimaryKey == OrgTypeUid select too).First(); var type = (from too in context.ТипОбразовательнойОрганизацииs where too.PrimaryKey == OrgTypeUid select too).First();
return type.Иерархия == null ? type.PrimaryKey : GetOrganizationType(context, type.Иерархия); return type.Иерархия == null ? type.PrimaryKey : GetOrganizationType(context, type.Иерархия);
} }
static Guid? GetProgramType(IContingentContext context, Guid? ProgramTypeUid) { static Guid? GetProgramType(IContingentContext context, Guid? ProgramTypeUid) {
...@@ -96,6 +99,7 @@ namespace SocialMinistryDataExchange.Model { ...@@ -96,6 +99,7 @@ namespace SocialMinistryDataExchange.Model {
return ProgramTypeUid; return ProgramTypeUid;
} }
var type = (from opt in context.ТипОбразовательнойПрограммыs where opt.PrimaryKey == ProgramTypeUid select opt).First(); var type = (from opt in context.ТипОбразовательнойПрограммыs where opt.PrimaryKey == ProgramTypeUid select opt).First();
return type.Иерархия == null ? type.PrimaryKey : GetProgramType(context, type.Иерархия); return type.Иерархия == null ? type.PrimaryKey : GetProgramType(context, type.Иерархия);
} }
...@@ -165,7 +169,5 @@ namespace SocialMinistryDataExchange.Model { ...@@ -165,7 +169,5 @@ namespace SocialMinistryDataExchange.Model {
return responce; return responce;
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment