Skip to content

Commit 8d2644f

Browse files
committed
ProfessionalDetail changes
1 parent 6c98c01 commit 8d2644f

30 files changed

+687
-114
lines changed

.vs/Demo/v16/.suo

14.5 KB
Binary file not shown.

Controllers/DetailController.cs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Demo.Repository;
44
using System.Collections.Generic;
55
using System.IO;
6+
using System.Linq;
67
using System.Web;
78
using System.Web.Mvc;
89

@@ -29,6 +30,11 @@ public ActionResult Index()
2930
{
3031
model = new TeamModel();
3132
model.Name = item.FirstName + " " + item.LastName;
33+
if(item.CurrentStatus.Count > 0)
34+
{
35+
model.Department = item.CurrentStatus.FirstOrDefault().Department;
36+
model.Designation = item.CurrentStatus.FirstOrDefault().Designation;
37+
}
3238
lstmodel.Add(model);
3339
}
3440
return View(lstmodel);
@@ -37,6 +43,8 @@ public ActionResult Index()
3743

3844
public ActionResult TeamDetail()
3945
{
46+
var skills = Ide.GetAllSkills();
47+
ViewBag.LstSkills = skills;
4048
return View();
4149
}
4250

@@ -47,6 +55,8 @@ public ActionResult TeamDetail(TeamDetailModel model, HttpPostedFileBase postedF
4755
//{
4856
byte[] bytes;
4957

58+
byte[] rbytes;
59+
5060
if (postedFile != null)
5161
{
5262
using (BinaryReader br = new BinaryReader(postedFile.InputStream))
@@ -62,7 +72,23 @@ public ActionResult TeamDetail(TeamDetailModel model, HttpPostedFileBase postedF
6272
};
6373
model.FileModel = fileModel;
6474
}
65-
75+
76+
if (postedResumeFile != null)
77+
{
78+
using (BinaryReader br = new BinaryReader(postedResumeFile.InputStream))
79+
{
80+
rbytes = br.ReadBytes(postedResumeFile.ContentLength);
81+
}
82+
83+
FileModel fileModel = new FileModel
84+
{
85+
Name = Path.GetFileName(postedResumeFile.FileName),
86+
ContentType = postedResumeFile.ContentType,
87+
Data = rbytes
88+
};
89+
model.ResumeFileModel = fileModel;
90+
}
91+
6692

6793
Ide.AddTeamDetail(model);
6894

CurrentStatu.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated from a template.
4+
//
5+
// Manual changes to this file may cause unexpected behavior in your application.
6+
// Manual changes to this file will be overwritten if the code is regenerated.
7+
// </auto-generated>
8+
//------------------------------------------------------------------------------
9+
10+
namespace Demo
11+
{
12+
using System;
13+
using System.Collections.Generic;
14+
15+
public partial class CurrentStatu
16+
{
17+
public int Id { get; set; }
18+
public string Company { get; set; }
19+
public string Designation { get; set; }
20+
public string Department { get; set; }
21+
public string CTC { get; set; }
22+
public System.DateTime WorkingFrom { get; set; }
23+
public int DetailId { get; set; }
24+
25+
public virtual Detail Detail { get; set; }
26+
}
27+
}

DbModel.Context.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ protected override void OnModelCreating(DbModelBuilder modelBuilder)
2626
}
2727

2828
public virtual DbSet<BankDetail> BankDetails { get; set; }
29+
public virtual DbSet<CurrentStatu> CurrentStatus { get; set; }
2930
public virtual DbSet<Detail> Details { get; set; }
3031
public virtual DbSet<File> Files { get; set; }
3132
public virtual DbSet<ProfessionalDetail> ProfessionalDetails { get; set; }

DbModel.edmx

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@
1616
<Property Name="AadharCardNo" Type="nvarchar" MaxLength="50" Nullable="false" />
1717
<Property Name="DetailId" Type="int" Nullable="false" />
1818
</EntityType>
19+
<EntityType Name="CurrentStatus">
20+
<Key>
21+
<PropertyRef Name="Id" />
22+
</Key>
23+
<Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
24+
<Property Name="Company" Type="nvarchar" MaxLength="50" Nullable="false" />
25+
<Property Name="Designation" Type="nvarchar" MaxLength="50" Nullable="false" />
26+
<Property Name="Department" Type="nvarchar" MaxLength="50" Nullable="false" />
27+
<Property Name="CTC" Type="nvarchar" MaxLength="50" />
28+
<Property Name="WorkingFrom" Type="datetime" Nullable="false" />
29+
<Property Name="DetailId" Type="int" Nullable="false" />
30+
</EntityType>
1931
<EntityType Name="Details">
2032
<Key>
2133
<PropertyRef Name="Id" />
@@ -46,6 +58,7 @@
4658
<Property Name="Month" Type="int" />
4759
<Property Name="SkillIds" Type="nvarchar" MaxLength="50" />
4860
<Property Name="DetailId" Type="int" Nullable="false" />
61+
<Property Name="FileId" Type="int" />
4962
</EntityType>
5063
<EntityType Name="Skill">
5164
<Key>
@@ -66,6 +79,18 @@
6679
</Dependent>
6780
</ReferentialConstraint>
6881
</Association>
82+
<Association Name="FK_CurrentStatus_Details">
83+
<End Role="Details" Type="Self.Details" Multiplicity="1" />
84+
<End Role="CurrentStatus" Type="Self.CurrentStatus" Multiplicity="*" />
85+
<ReferentialConstraint>
86+
<Principal Role="Details">
87+
<PropertyRef Name="Id" />
88+
</Principal>
89+
<Dependent Role="CurrentStatus">
90+
<PropertyRef Name="DetailId" />
91+
</Dependent>
92+
</ReferentialConstraint>
93+
</Association>
6994
<Association Name="FK_Details_File">
7095
<End Role="File" Type="Self.File" Multiplicity="0..1" />
7196
<End Role="Details" Type="Self.Details" Multiplicity="*" />
@@ -90,8 +115,21 @@
90115
</Dependent>
91116
</ReferentialConstraint>
92117
</Association>
118+
<Association Name="FK_ProfessionalDetail_File">
119+
<End Role="File" Type="Self.File" Multiplicity="0..1" />
120+
<End Role="ProfessionalDetail" Type="Self.ProfessionalDetail" Multiplicity="*" />
121+
<ReferentialConstraint>
122+
<Principal Role="File">
123+
<PropertyRef Name="Id" />
124+
</Principal>
125+
<Dependent Role="ProfessionalDetail">
126+
<PropertyRef Name="FileId" />
127+
</Dependent>
128+
</ReferentialConstraint>
129+
</Association>
93130
<EntityContainer Name="DemoModelStoreContainer">
94131
<EntitySet Name="BankDetails" EntityType="Self.BankDetails" Schema="dbo" store:Type="Tables" />
132+
<EntitySet Name="CurrentStatus" EntityType="Self.CurrentStatus" Schema="dbo" store:Type="Tables" />
95133
<EntitySet Name="Details" EntityType="Self.Details" Schema="dbo" store:Type="Tables" />
96134
<EntitySet Name="File" EntityType="Self.File" Schema="dbo" store:Type="Tables" />
97135
<EntitySet Name="ProfessionalDetail" EntityType="Self.ProfessionalDetail" Schema="dbo" store:Type="Tables" />
@@ -100,6 +138,10 @@
100138
<End Role="Details" EntitySet="Details" />
101139
<End Role="BankDetails" EntitySet="BankDetails" />
102140
</AssociationSet>
141+
<AssociationSet Name="FK_CurrentStatus_Details" Association="Self.FK_CurrentStatus_Details">
142+
<End Role="Details" EntitySet="Details" />
143+
<End Role="CurrentStatus" EntitySet="CurrentStatus" />
144+
</AssociationSet>
103145
<AssociationSet Name="FK_Details_File" Association="Self.FK_Details_File">
104146
<End Role="File" EntitySet="File" />
105147
<End Role="Details" EntitySet="Details" />
@@ -108,13 +150,18 @@
108150
<End Role="Details" EntitySet="Details" />
109151
<End Role="ProfessionalDetail" EntitySet="ProfessionalDetail" />
110152
</AssociationSet>
153+
<AssociationSet Name="FK_ProfessionalDetail_File" Association="Self.FK_ProfessionalDetail_File">
154+
<End Role="File" EntitySet="File" />
155+
<End Role="ProfessionalDetail" EntitySet="ProfessionalDetail" />
156+
</AssociationSet>
111157
</EntityContainer>
112158
</Schema></edmx:StorageModels>
113159
<!-- CSDL content -->
114160
<edmx:ConceptualModels>
115161
<Schema Namespace="DemoModel" 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">
116162
<EntityContainer Name="DemoEntities" annotation:LazyLoadingEnabled="true">
117163
<EntitySet Name="BankDetails" EntityType="DemoModel.BankDetail" />
164+
<EntitySet Name="CurrentStatus" EntityType="DemoModel.CurrentStatu" />
118165
<EntitySet Name="Details" EntityType="DemoModel.Detail" />
119166
<EntitySet Name="Files" EntityType="DemoModel.File" />
120167
<EntitySet Name="ProfessionalDetails" EntityType="DemoModel.ProfessionalDetail" />
@@ -123,6 +170,10 @@
123170
<End Role="Detail" EntitySet="Details" />
124171
<End Role="BankDetail" EntitySet="BankDetails" />
125172
</AssociationSet>
173+
<AssociationSet Name="FK_CurrentStatus_Details" Association="DemoModel.FK_CurrentStatus_Details">
174+
<End Role="Detail" EntitySet="Details" />
175+
<End Role="CurrentStatu" EntitySet="CurrentStatus" />
176+
</AssociationSet>
126177
<AssociationSet Name="FK_Details_File" Association="DemoModel.FK_Details_File">
127178
<End Role="File" EntitySet="Files" />
128179
<End Role="Detail" EntitySet="Details" />
@@ -131,6 +182,10 @@
131182
<End Role="Detail" EntitySet="Details" />
132183
<End Role="ProfessionalDetail" EntitySet="ProfessionalDetails" />
133184
</AssociationSet>
185+
<AssociationSet Name="FK_ProfessionalDetail_File" Association="DemoModel.FK_ProfessionalDetail_File">
186+
<End Role="File" EntitySet="Files" />
187+
<End Role="ProfessionalDetail" EntitySet="ProfessionalDetails" />
188+
</AssociationSet>
134189
</EntityContainer>
135190
<EntityType Name="BankDetail">
136191
<Key>
@@ -144,6 +199,19 @@
144199
<Property Name="DetailId" Type="Int32" Nullable="false" />
145200
<NavigationProperty Name="Detail" Relationship="DemoModel.FK_BankDetails_Details" FromRole="BankDetail" ToRole="Detail" />
146201
</EntityType>
202+
<EntityType Name="CurrentStatu">
203+
<Key>
204+
<PropertyRef Name="Id" />
205+
</Key>
206+
<Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
207+
<Property Name="Company" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
208+
<Property Name="Designation" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
209+
<Property Name="Department" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
210+
<Property Name="CTC" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
211+
<Property Name="WorkingFrom" Type="DateTime" Nullable="false" Precision="3" />
212+
<Property Name="DetailId" Type="Int32" Nullable="false" />
213+
<NavigationProperty Name="Detail" Relationship="DemoModel.FK_CurrentStatus_Details" FromRole="CurrentStatu" ToRole="Detail" />
214+
</EntityType>
147215
<EntityType Name="Detail">
148216
<Key>
149217
<PropertyRef Name="Id" />
@@ -156,6 +224,7 @@
156224
<Property Name="Email" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
157225
<Property Name="FileId" Type="Int32" />
158226
<NavigationProperty Name="BankDetails" Relationship="DemoModel.FK_BankDetails_Details" FromRole="Detail" ToRole="BankDetail" />
227+
<NavigationProperty Name="CurrentStatus" Relationship="DemoModel.FK_CurrentStatus_Details" FromRole="Detail" ToRole="CurrentStatu" />
159228
<NavigationProperty Name="File" Relationship="DemoModel.FK_Details_File" FromRole="Detail" ToRole="File" />
160229
<NavigationProperty Name="ProfessionalDetails" Relationship="DemoModel.FK_ProfessionalDetail_Details" FromRole="Detail" ToRole="ProfessionalDetail" />
161230
</EntityType>
@@ -168,6 +237,7 @@
168237
<Property Name="ContentType" Type="String" MaxLength="200" FixedLength="false" Unicode="true" />
169238
<Property Name="Data" Type="Binary" MaxLength="Max" FixedLength="false" />
170239
<NavigationProperty Name="Details" Relationship="DemoModel.FK_Details_File" FromRole="File" ToRole="Detail" />
240+
<NavigationProperty Name="ProfessionalDetails" Relationship="DemoModel.FK_ProfessionalDetail_File" FromRole="File" ToRole="ProfessionalDetail" />
171241
</EntityType>
172242
<EntityType Name="ProfessionalDetail">
173243
<Key>
@@ -178,7 +248,9 @@
178248
<Property Name="Month" Type="Int32" />
179249
<Property Name="SkillIds" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
180250
<Property Name="DetailId" Type="Int32" Nullable="false" />
251+
<Property Name="FileId" Type="Int32" />
181252
<NavigationProperty Name="Detail" Relationship="DemoModel.FK_ProfessionalDetail_Details" FromRole="ProfessionalDetail" ToRole="Detail" />
253+
<NavigationProperty Name="File" Relationship="DemoModel.FK_ProfessionalDetail_File" FromRole="ProfessionalDetail" ToRole="File" />
182254
</EntityType>
183255
<EntityType Name="Skill">
184256
<Key>
@@ -199,6 +271,18 @@
199271
</Dependent>
200272
</ReferentialConstraint>
201273
</Association>
274+
<Association Name="FK_CurrentStatus_Details">
275+
<End Type="DemoModel.Detail" Role="Detail" Multiplicity="1" />
276+
<End Type="DemoModel.CurrentStatu" Role="CurrentStatu" Multiplicity="*" />
277+
<ReferentialConstraint>
278+
<Principal Role="Detail">
279+
<PropertyRef Name="Id" />
280+
</Principal>
281+
<Dependent Role="CurrentStatu">
282+
<PropertyRef Name="DetailId" />
283+
</Dependent>
284+
</ReferentialConstraint>
285+
</Association>
202286
<Association Name="FK_Details_File">
203287
<End Type="DemoModel.File" Role="File" Multiplicity="0..1" />
204288
<End Type="DemoModel.Detail" Role="Detail" Multiplicity="*" />
@@ -223,6 +307,18 @@
223307
</Dependent>
224308
</ReferentialConstraint>
225309
</Association>
310+
<Association Name="FK_ProfessionalDetail_File">
311+
<End Type="DemoModel.File" Role="File" Multiplicity="0..1" />
312+
<End Type="DemoModel.ProfessionalDetail" Role="ProfessionalDetail" Multiplicity="*" />
313+
<ReferentialConstraint>
314+
<Principal Role="File">
315+
<PropertyRef Name="Id" />
316+
</Principal>
317+
<Dependent Role="ProfessionalDetail">
318+
<PropertyRef Name="FileId" />
319+
</Dependent>
320+
</ReferentialConstraint>
321+
</Association>
226322
</Schema>
227323
</edmx:ConceptualModels>
228324
<!-- C-S mapping content -->
@@ -241,6 +337,19 @@
241337
</MappingFragment>
242338
</EntityTypeMapping>
243339
</EntitySetMapping>
340+
<EntitySetMapping Name="CurrentStatus">
341+
<EntityTypeMapping TypeName="DemoModel.CurrentStatu">
342+
<MappingFragment StoreEntitySet="CurrentStatus">
343+
<ScalarProperty Name="DetailId" ColumnName="DetailId" />
344+
<ScalarProperty Name="WorkingFrom" ColumnName="WorkingFrom" />
345+
<ScalarProperty Name="CTC" ColumnName="CTC" />
346+
<ScalarProperty Name="Department" ColumnName="Department" />
347+
<ScalarProperty Name="Designation" ColumnName="Designation" />
348+
<ScalarProperty Name="Company" ColumnName="Company" />
349+
<ScalarProperty Name="Id" ColumnName="Id" />
350+
</MappingFragment>
351+
</EntityTypeMapping>
352+
</EntitySetMapping>
244353
<EntitySetMapping Name="Details">
245354
<EntityTypeMapping TypeName="DemoModel.Detail">
246355
<MappingFragment StoreEntitySet="Details">
@@ -267,6 +376,7 @@
267376
<EntitySetMapping Name="ProfessionalDetails">
268377
<EntityTypeMapping TypeName="DemoModel.ProfessionalDetail">
269378
<MappingFragment StoreEntitySet="ProfessionalDetail">
379+
<ScalarProperty Name="FileId" ColumnName="FileId" />
270380
<ScalarProperty Name="DetailId" ColumnName="DetailId" />
271381
<ScalarProperty Name="SkillIds" ColumnName="SkillIds" />
272382
<ScalarProperty Name="Month" ColumnName="Month" />

DbModel.edmx.diagram

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55
<!-- Diagram content (shape and connector positions) -->
66
<edmx:Diagrams>
77
<Diagram DiagramId="545b04df9b1343df8b0d29a768294e2e" Name="Diagram1">
8-
<EntityTypeShape EntityType="DemoModel.BankDetail" Width="1.5" PointX="5.25" PointY="1.125" />
9-
<EntityTypeShape EntityType="DemoModel.Detail" Width="1.5" PointX="3" PointY="2.25" />
10-
<EntityTypeShape EntityType="DemoModel.File" Width="1.5" PointX="0.75" PointY="2.75" />
11-
<EntityTypeShape EntityType="DemoModel.ProfessionalDetail" Width="1.5" PointX="5.25" PointY="4.25" />
12-
<EntityTypeShape EntityType="DemoModel.Skill" Width="1.5" PointX="0.75" PointY="6.75" />
8+
<EntityTypeShape EntityType="DemoModel.BankDetail" Width="1.5" PointX="5.25" PointY="6.25" />
9+
<EntityTypeShape EntityType="DemoModel.CurrentStatu" Width="1.5" PointX="5.25" PointY="9.375" />
10+
<EntityTypeShape EntityType="DemoModel.Detail" Width="1.5" PointX="3" PointY="4.25" />
11+
<EntityTypeShape EntityType="DemoModel.File" Width="1.5" PointX="0.75" PointY="4.625" />
12+
<EntityTypeShape EntityType="DemoModel.ProfessionalDetail" Width="1.5" PointX="5.25" PointY="2.5" />
13+
<EntityTypeShape EntityType="DemoModel.Skill" Width="1.5" PointX="0.75" PointY="0.75" />
1314
<AssociationConnector Association="DemoModel.FK_BankDetails_Details" />
15+
<AssociationConnector Association="DemoModel.FK_CurrentStatus_Details" />
1416
<AssociationConnector Association="DemoModel.FK_Details_File" />
1517
<AssociationConnector Association="DemoModel.FK_ProfessionalDetail_Details" />
18+
<AssociationConnector Association="DemoModel.FK_ProfessionalDetail_File" />
1619
</Diagram>
1720
</edmx:Diagrams>
1821
</edmx:Designer>

Demo.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@
137137
</Compile>
138138
<Compile Include="Controllers\DetailController.cs" />
139139
<Compile Include="Controllers\HomeController.cs" />
140+
<Compile Include="CurrentStatu.cs">
141+
<DependentUpon>DbModel.tt</DependentUpon>
142+
</Compile>
140143
<Compile Include="DbModel.Context.cs">
141144
<AutoGen>True</AutoGen>
142145
<DesignTime>True</DesignTime>
@@ -162,13 +165,21 @@
162165
<DependentUpon>Global.asax</DependentUpon>
163166
</Compile>
164167
<Compile Include="Models\BankDetailModel.cs" />
168+
<Compile Include="Models\CurrentStatusModel.cs" />
165169
<Compile Include="Models\FileModel.cs" />
166170
<Compile Include="Models\PersonalDetailModel.cs" />
171+
<Compile Include="Models\ProfessionalDetailModel.cs" />
167172
<Compile Include="Models\TeamDetailModel.cs" />
168173
<Compile Include="Models\TeamModel.cs" />
174+
<Compile Include="ProfessionalDetail.cs">
175+
<DependentUpon>DbModel.tt</DependentUpon>
176+
</Compile>
169177
<Compile Include="Properties\AssemblyInfo.cs" />
170178
<Compile Include="Repository\DetailRepository.cs" />
171179
<Compile Include="Repository\IDetail.cs" />
180+
<Compile Include="Skill.cs">
181+
<DependentUpon>DbModel.tt</DependentUpon>
182+
</Compile>
172183
<Compile Include="TabEnum.cs" />
173184
</ItemGroup>
174185
<ItemGroup>

0 commit comments

Comments
 (0)