public void Updateproject(ProjectControlViewModel control) { var entity = new ProjectControl_Table(); entity.ProjectControlID = control.ID; entity.ProjectID = control.ProID; entity.UserID = control.UserID; entity.status = control.Status; entities.ProjectControl_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(SessionViewModel db) { var entity = new Session_Table(); entity.sessionID = db.sessionID; entity.CaseID = db.CaseID; entity.sessionDate = db.sessionDate.Date; entity.sessionResult = HttpUtility.HtmlDecode(db.sessionResult); entity.sessionRecommendations = HttpUtility.HtmlDecode(db.sessionRecommendations); entities.Session_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(projectViewModle db) { var entity = new ProjectTable(); entity.ProjectID = db.ProjectID; entity.ProjectName = db.ProjectName; entity.StartDate = db.StartDate.Date; entity.EndDate = db.EndDate.Date; entity.Description = db.Description; entity.Status = db.Status; entities.ProjectTable.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(UserViewModel user) { var entity = new Users_Table(); entity.UserID = user.UserID; entity.FullName = user.FullName; entity.UserName = user.Username; entity.Password = user.Password; entity.UserType = user.UserType; entity.Status = user.userstatus; entities.Users_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(CasesViewModel db) { var entity = new Case_Table(); entity.CasesID = db.CasesID; entity.CasesNumber = db.CasesNumber; entity.CasesDate = (DateTime)db.CasesDate.Date; entity.CasesStatus = db.CasesStatus; entity.CasesName = db.CasesName; entity.CasesGender = db.CasesGender; entity.CasesAge = db.CasesAge; entity.CasesCitizen = db.CasesCitizen; entity.StudyFather = db.StudyFather; entity.StudyMother = db.StudyMother; entity.FatherWork = db.FatherWork; entity.MotherWork = db.MotherWork; entity.ParentalStatus = db.ParentalStatus; entity.ParentsRelationship = db.ParentsRelationship; entity.EconomicLevel = db.EconomicLevel; entity.CasesMobile = db.CasesMobile; entity.BrothersNumber = db.BrothersNumber; entity.MaleNumber = db.MaleNumber; entity.FemalNumber = db.FemalNumber; entity.CasesSorted = db.CasesSorted; entity.Childlives = db.Childlives; entity.ChildLivesWith = db.ChildLivesWith; entity.GovernorateID = db.GovernorateID; entity.AreaID = db.AreaID; entity.AreasRating = db.AreasRating; entity.CasesAdress = db.CasesAdress; entity.ChildStudy = db.ChildStudy; entity.EducationalLevel = db.EducationalLevel; entity.SchoolType = db.SchoolType; entity.SchoolName = db.SchoolName; entity.CasesAssault = db.CasesAssault; entity.KnownAssailant = db.KnownAssailant; entity.AssailantName = db.AssailantName; entity.AssailanKinship = db.AssailanKinship; entity.AssailanGender = db.AssailanGender; entity.AssaultPhysical = db.AssaultPhysical; entity.AssaultSexual = db.AssaultSexual; entity.AssaultVerbal = db.AssaultVerbal; entity.AssaultNeglecting = db.AssaultNeglecting; entity.AssaultSpy = db.AssaultSpy; entity.AssaultExploit = db.AssaultExploit; entity.AssaultKidnapping = db.AssaultKidnapping; entity.AssaultDate = db.AssaultDate; entity.AssaultPlace = db.AssaultPlace; entity.AssaultReport = db.AssaultReport; entity.AssaultRepeatAttack = db.AssaultRepeatAttack; entity.AssaultLevePain = db.AssaultLevePain; entity.ChildConvertingFoundation = db.ChildConvertingFoundation; entity.CenterName = db.CenterName; entity.Effects_break = db.Effects_break; entity.Effects_Wounds = db.Effects_Wounds; entity.Effects_Bruising = db.Effects_Bruising; entity.Effects_Distortion = db.Effects_Distortion; entity.Effects_Burns = db.Effects_Burns; entity.intimation_Parents = db.intimation_Parents; entity.intimation_Police = db.intimation_Police; entity.intimation_Corporation = db.intimation_Corporation; entity.intimation_School = db.intimation_School; entity.intimation_Friend = db.intimation_Friend; entity.IncidentDescription = HttpUtility.HtmlDecode(db.IncidentDescription); entity.undesirable_Behavior = db.undesirable_Behavior; entity.RepeatBehavior = db.RepeatBehavior; entity.foreman_For_behavior = db.foreman_For_behavior; entity.TimeBehavior = db.TimeBehavior; entity.Disorder_Behavioural = db.Disorder_Behavioural; entity.Disorder_Psychological = db.Disorder_Psychological; entity.Disorder_Learn = db.Disorder_Learn; entity.Disorder_Pronounce = db.Disorder_Pronounce; entity.Disorder_Urination = db.Disorder_Urination; entity.Disorder_Sleep = db.Disorder_Sleep; entity.Disorder_PositionsShocking = db.Disorder_PositionsShocking; entity.Disorder_Maltreatment = db.Disorder_Maltreatment; entity.Disorder_SexualHarassment = db.Disorder_SexualHarassment; entity.Disorder_rape = db.Disorder_rape; entity.Disorder_Resuscitatesexual = db.Disorder_Resuscitatesexual; entity.Recommendations = HttpUtility.HtmlDecode(db.Recommendations); entity.ProjectID = db.ProID; entity.UserID = db.UserID; entities.Case_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }