public void Update(FamilyForumViewModel db) { var entity = new FamilyForum_Table(); entity.FamilyForumID = db.FamilyForumID; entity.ViewingDate = (DateTime)db.ViewingDate.Date; entity.ApplicantName = db.ApplicantName; entity.ApplicantPhone = db.ApplicantPhone; entity.ApplicantSocialStatus = db.ApplicantSocialStatus; entity.ApplicantAddress = db.ApplicantAddress; entity.CustodialName = db.CustodialName; entity.CustodialPhone = db.CustodialPhone; entity.CustodialSocialStatus = db.CustodialSocialStatus; entity.CustodialAddress = db.CustodialAddress; entity.ChildrenNumberMale = db.ChildrenNumberMale; entity.ChildrenNumberFemale = db.ChildrenNumberFemale; entity.CaseType = db.CaseType; entity.ViewingHours = db.ViewingHours; entity.ViewingPlace = db.ViewingPlace; entity.UserID = db.UserID; entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(ConsultingViewModel db) { var entity = new Consulting_Table(); entity.ConsultingID = db.ConsultingID; entity.ConsultingDate = (DateTime)db.ConsultingDate.Date; entity.Beneficiaries_ID = db.Beneficiaries_ID; var q = entities.Beneficiaries_Table.Where(p => p.Beneficiaries_ID == db.Beneficiaries_ID).SingleOrDefault(); db.BeneficiariesIDNumber = q.BeneficiariesIDNumber; db.BeneficiariesName = q.BeneficiariesName; db.Gender = q.Gender_Table.GenderName; entity.Area_ID = db.Area_ID; entity.BeneficiariesAge = db.BeneficiariesAge; entity.Governorate_ID = db.Governorate_ID; entity.CounselingRequired = HttpUtility.HtmlDecode(db.CounselingRequired); entity.CounselingRendered = HttpUtility.HtmlDecode(db.CounselingRendered); entity.CounselingStatus = db.CounselingStatus; entity.TypeOfCaseID = db.TypeOfCaseID; entity.IssuesTypeID = db.IssuesTypeID; entity.ProjectID = db.ProjectID; entity.UserID = db.UserID; entities.Consulting_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(MediationViewModel db) { var entity = new Mediation_Table(); entity.MediationID = db.MediationID; entity.MediationNumber = db.MediationNumber; entity.MediationDate = (DateTime)db.MediationDate.Date; entity.FirstSideName = db.FirstSideName; entity.FirstSideIDNumber = db.FirstSideIDNumber; entity.FirstSidePhone = db.FirstSidePhone; entity.FirstSocialstatus = db.FirstSocialstatus; entity.FirstSideAddress = db.FirstSideAddress; entity.SecondSideName = db.SecondSideName; entity.SecondSideIDNumber = db.SecondSideIDNumber; entity.SecondSidePhone = db.SecondSidePhone; entity.SecondSocialstatus = db.SecondSocialstatus; entity.SecondSideAddress = db.SecondSideAddress; entity.MediatorName = db.MediatorName; entity.MediatorPhone = db.MediatorPhone; entity.Agreement = HttpUtility.HtmlDecode(db.Agreement); entity.UserID = db.UserID; entities.Mediation_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(LegalIssuesViewModel db) { var entity = new LegalIssues_Table(); entity.LegalIssuesID = db.LegalIssuesID; entity.CenterNumber = db.CenterNumber; entity.CourtsNumber = db.CourtsNumber; entity.DateOfCase = (DateTime)db.DateOfCase.Date; entity.DepositDate = (DateTime)db.DepositDate.Date; entity.ClientName = db.ClientName; entity.ClientIDNumber = db.ClientIDNumber; entity.ClientPhone = db.ClientPhone; entity.ClientAddress = db.ClientAddress; entity.AdversaryName = db.AdversaryName; entity.AdversaryIDNumber = db.AdversaryIDNumber; entity.AdversaryPhone = db.AdversaryPhone; entity.AdversaryAddress = db.AdversaryAddress; entity.TypeOfCaseID = db.TypeOfCaseID; entity.CourtsID = db.CourtsID; entity.LawyerID = db.LawyerID; entity.DateOfClosure = (DateTime)db.DateOfClosure.Date; entity.UserID = db.UserID; entities.LegalIssues_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(ArbitrationViewModel db) { var entity = new Arbitration_Table(); entity.ArbitrationID = db.ArbitrationID; entity.ArbitrationDate = (DateTime)db.ArbitrationDate.Date; entity.Beneficiaries_ID = db.Beneficiaries_ID; var q = entities.Beneficiaries_Table.Where(p => p.Beneficiaries_ID == db.Beneficiaries_ID).SingleOrDefault(); db.BeneficiariesIDNumber = q.BeneficiariesIDNumber; db.BeneficiariesName = q.BeneficiariesName; db.Gender = q.Gender_Table.GenderName; // entity.Area_ID = db.Area_ID; entity.Governorate_ID = db.Governorate_ID; entity.FirstSocialstatus = db.FirstSocialstatus; entity.SecondSideName = db.SecondSideName; entity.SecondSideIDNumber = db.SecondSideIDNumber; entity.SecondSidePhone = db.SecondSidePhone; entity.SecondSocialstatus = db.SecondSocialstatus; entity.SecondSideAddress = db.SecondSideAddress; entity.ArbitrationName = db.ArbitrationName; entity.ArbitrationPhone = db.ArbitrationPhone; entity.ArbitrationDecision = HttpUtility.HtmlDecode(db.ArbitrationDecision); entity.UserID = db.UserID; entity.ProjectID = db.ProjectID; entities.Arbitration_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(TypeOfCaseViewModel db) { var entity = new TypeOfCase_Table(); entity.TypeOfCaseID = db.TypeOfCaseID; entity.TypeOfCase = db.TypeOfCase; entities.TypeOfCase_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(TargetGroupViewModel user) { var entity = new TargetGroup_Table(); entity.TargetGroupID = user.TargetGroupID; entity.TargetGroupName = user.TargetGroupName; entities.TargetGroup_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(CourtsViewModel db) { var entity = new Courts_Table(); entity.CourtsID = db.CourtsID; entity.CourtsName = db.CourtsName; entities.Courts_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(ProjectViewModel db) { var entity = new Project_Table(); entity.ProjectID = db.ProjectID; entity.ProjectName = db.ProjectName; entity.StartData = (DateTime)db.StartData.Date; entity.EndDate = (DateTime)db.EndDate.Date; entity.Status = db.Status; entities.Project_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(AchievementsViewModel db) { var entity = new Achievements_Table(); entity.AchievementID = db.AchievementID; entity.AchievementsDate = (DateTime)db.AchievementsDate.Date; entity.AchievementsName = db.AchievementsName; entity.AchievementsAbstract = HttpUtility.HtmlDecode(db.AchievementsAbstract); entity.url = db.url; entity.ProjectID = db.ProjectID; entity.UserID = db.UserID; entities.Achievements_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(LawyerViewModel db) { var entity = new Lawyer_Table(); entity.LawyerID = db.LawyerID; entity.LawyerName = db.LawyerName; entity.LawyerPhone = db.LawyerPhone; entity.LawyerAddress = db.LawyerAddress; entities.Lawyer_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(ProjectControlViewModel db) { var entity = new ProjectControl_Table(); entity.ProjectControlID = db.ProjectControlID; entity.UserID = db.UserID; entity.ProjectID = db.ProjectID; entity.Status = db.Status; entities.ProjectControl_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(BeneficiariesViewModel db) { var entity = new Beneficiaries_Table(); entity.Beneficiaries_ID = db.Beneficiaries_ID; entity.BeneficiariesIDNumber = db.BeneficiariesIDNumber; entity.BeneficiariesName = db.BeneficiariesName; entity.BeneficiariesPhone = db.BeneficiariesPhone; entity.GenderID = db.GenderID; entities.Beneficiaries_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(LegalSessionViewModel db) { var entity = new LegalSession_Table(); entity.SessionsID = db.SessionsID; entity.SessionsNumber = db.SessionsNumber; entity.SessionsDate = (DateTime)db.SessionsDate.Date; entity.Sessions_Decision = db.Sessions_Decision; entity.LegalIssuesID = db.LegalIssuesID; entity.UserID = db.UserID; entities.LegalSession_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(CoursesViewModel db) { var entity = new Courses_Table(); entity.CoursesID = db.CoursesID; entity.CoursesNumber = db.CoursesNumber; entity.CoursesStartDate = (DateTime)db.CoursesStartDate.Date; entity.CoursesEndDate = (DateTime)db.CoursesEndDate.Date; entity.UserID = db.UserID; entities.Courses_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(VersionsViewModel db) { var entity = new Versions_Table(); entity.VersionsID = db.VersionsID; entity.VersionsName = db.VersionsName; entity.VersionsDate = (DateTime)db.VersionsDate.Date; entity.PartnerName = db.PartnerName; entity.VersionsNumbers = db.VersionsNumbers; entity.TypesOfCopies = db.TypesOfCopies; entity.url = db.url; entity.UserID = db.UserID; entity.ProjectID = db.ProjectID; entities.Versions_Table.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(ConsultingViewModel db) { var entity = new Consulting_Table(); entity.ConsultingID = db.ConsultingID; entity.ConsultingNumber = db.ConsultingNumber; entity.ConsultingDate = (DateTime)db.ConsultingDate.Date; entity.ConsultantName = db.ConsultantName; entity.CounselingRequired = HttpUtility.HtmlDecode(db.CounselingRequired); entity.CounselingRendered = HttpUtility.HtmlDecode(db.CounselingRendered); entity.CounselingStatus = db.CounselingStatus; entity.CounselingStatus = db.CounselingStatus; entity.UserID = db.UserID; entities.Consulting_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(AdvocacyactivitiesViewModel db) { var entity = new Advocacyactivities_Table(); entity.AdvocacyactivitiesID = db.AdvocacyactivitiesID; entity.Name = db.Name; entity.AdvocacyDate = (DateTime)db.AdvocacyDate.Date; entity.executingagency = db.executingagency; entity.beneficiary = db.beneficiary; entity.GeographicArea = db.GeographicArea; entity.url = db.url; entity.UserID = db.UserID; entity.ProjectID = db.ProjectID; entities.Advocacyactivities_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(CoursesViewModel db) { var entity = new Courses_Table(); entity.CoursesID = db.CoursesID; entity.CoursesName = db.CoursesName; entity.CoursesStartDate = (DateTime)db.CoursesStartDate.Date; entity.CoursesEndDate = (DateTime)db.CoursesEndDate.Date; entity.TrainingHours = db.TrainingHours; entity.TotalSessions = db.TotalSessions; entity.TotalBeneficiaries = db.TotalBeneficiaries; entity.Males = db.Males; entity.Females = db.Females; entity.UserID = db.UserID; entity.TargetGroupID = db.TargetGroupID; entity.ProjectID = db.ProjectID; entities.Courses_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(AwarenessWorkshopsViewModel db) { var entity = new AwarenessWorkshops_Table(); entity.AwarenessID = db.AwarenessID; entity.AwarenessName = db.AwarenessName; entity.AwarenessDate = (DateTime)db.AwarenessDate.Date; entity.TotalHours = db.TotalHours; entity.TotalBeneficiaries = db.TotalBeneficiaries; entity.Males = db.Males; entity.Females = db.Females; entity.Boy = db.Boy; entity.Girl = db.Girl; entity.UserID = db.UserID; entity.ProjectID = db.ProjectID; entities.AwarenessWorkshops_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(MediaViewControl db) { var entity = new Media_Table(); entity.MediaID = db.MediaID; entity.MediaName = db.MediaName; entity.MediaDate = (DateTime)db.MediaDate.Date; entity.PartnerName = db.PartnerName; entity.MediaNumber = db.MediaNumber; entity.minutes = db.minutes; entity.url = db.url; entity.UserID = db.UserID; entity.MediaTypeID = db.MediaTypeID; entity.ProjectID = db.ProjectID; entities.Media_Table.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }