public void Create(LegalIssuesViewModel db) { var entity = new LegalIssues_Table(); 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.Add(entity); entities.SaveChanges(); db.LegalIssuesID = entity.LegalIssuesID; }
public void Create(ArbitrationViewModel db) { var entity = new Arbitration_Table(); 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.Add(entity); entities.SaveChanges(); db.ArbitrationID = entity.ArbitrationID; }
public void Create(MediationViewModel db) { var entity = new Mediation_Table(); 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.Add(entity); entities.SaveChanges(); db.MediationID = entity.MediationID; }
public void Create(ConsultingViewModel db) { var entity = new Consulting_Table(); 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.Add(entity); entities.SaveChanges(); db.ConsultingID = entity.ConsultingID; }
public void Create(CourtsViewModel db) { var entity = new Courts_Table(); entity.CourtsName = db.CourtsName; entities.Courts_Table.Add(entity); entities.SaveChanges(); db.CourtsID = entity.CourtsID; }
public void Create(TypeOfCaseViewModel db) { var entity = new TypeOfCase_Table(); entity.TypeOfCase = db.TypeOfCase; entities.TypeOfCase_Table.Add(entity); entities.SaveChanges(); db.TypeOfCaseID = entity.TypeOfCaseID; }
public void Create(TargetGroupViewModel user) { var entity = new TargetGroup_Table(); entity.TargetGroupName = user.TargetGroupName; entities.TargetGroup_Table.Add(entity); entities.SaveChanges(); user.TargetGroupID = entity.TargetGroupID; }
public void Create(LawyerViewModel db) { var entity = new Lawyer_Table(); entity.LawyerName = db.LawyerName; entity.LawyerPhone = db.LawyerPhone; entity.LawyerAddress = db.LawyerAddress; entities.Lawyer_Table.Add(entity); entities.SaveChanges(); db.LawyerID = entity.LawyerID; }
public void Create(LegalSessionViewModel db) { var entity = new LegalSession_Table(); 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.Add(entity); entities.SaveChanges(); db.SessionsID = entity.SessionsID; }
public void Create(ProjectViewModel db) { var entity = new Project_Table(); entity.ProjectName = db.ProjectName; entity.StartData = (DateTime)db.StartData.Date; entity.EndDate = (DateTime)db.EndDate.Date; entity.Status = db.Status; entities.Project_Table.Add(entity); entities.SaveChanges(); db.ProjectID = entity.ProjectID; }
public void Create(UserViewModel user) { var entity = new Users_Table(); entity.FullName = user.FullName; entity.UserName = user.Username; entity.Password = user.Password; entity.UserType = user.UserType; entity.Status = user.userstatus; entities.Users_Table.Add(entity); entities.SaveChanges(); user.UserID = entity.UserID; }
public void Create(CoursesViewModel db) { var entity = new Courses_Table(); entity.CoursesNumber = db.CoursesNumber; entity.CoursesStartDate = (DateTime)db.CoursesStartDate.Date; entity.CoursesEndDate = (DateTime)db.CoursesEndDate.Date; entity.CoursesSummary = HttpUtility.HtmlDecode(db.CoursesSummary); entity.UserID = db.UserID; entities.Courses_Table.Add(entity); entities.SaveChanges(); db.CoursesID = entity.CoursesID; }
public void Create(BeneficiariesViewModel db) { var entity = new Beneficiaries_Table(); entity.BeneficiariesIDNumber = db.BeneficiariesIDNumber; entity.BeneficiariesName = db.BeneficiariesName; entity.BeneficiariesPhone = db.BeneficiariesPhone; entity.GenderID = db.GenderID; entities.Beneficiaries_Table.Add(entity); entities.SaveChanges(); db.Beneficiaries_ID = entity.Beneficiaries_ID; }
public void Create(AchievementsViewModel db) { var entity = new Achievements_Table(); 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.Add(entity); entities.SaveChanges(); db.AchievementID = entity.AchievementID; }
public void Create(VersionsViewModel db) { var entity = new Versions_Table(); 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.Add(entity); entities.SaveChanges(); db.VersionsID = entity.VersionsID; }
public void Create(ConsultingViewModel db) { var entity = new Consulting_Table(); 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.ConsultingProvider = db.ConsultingProvider; entity.CounselingStatus = db.CounselingStatus; entity.UserID = db.UserID; entities.Consulting_Table.Add(entity); entities.SaveChanges(); db.ConsultingID = entity.ConsultingID; }
public void Create(MediaViewControl db) { var entity = new Media_Table(); 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.Add(entity); entities.SaveChanges(); db.MediaID = entity.MediaID; }
public void Create(AdvocacyactivitiesViewModel db) { var entity = new Advocacyactivities_Table(); 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.Add(entity); entities.SaveChanges(); db.AdvocacyactivitiesID = entity.AdvocacyactivitiesID; }
public void Create(CoursesViewModel db) { var entity = new Courses_Table(); entity.CoursesName = db.CoursesName; entity.CoursesStartDate = (DateTime)db.CoursesStartDate.Date; entity.CoursesEndDate = (DateTime)db.CoursesEndDate.Date; entity.TotalBeneficiaries = db.TotalBeneficiaries; entity.TrainingHours = db.TrainingHours; entity.TotalSessions = db.TotalSessions; entity.Males = db.Males; entity.Females = db.Females; entity.UserID = db.UserID; entity.TargetGroupID = db.TargetGroupID; entity.ProjectID = db.ProjectID; entities.Courses_Table.Add(entity); entities.SaveChanges(); db.CoursesID = entity.CoursesID; }
public void Create(FamilyForumViewModel db) { var entity = new FamilyForum_Table(); 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.FamilyForum_Table.Add(entity); entities.SaveChanges(); db.FamilyForumID = entity.FamilyForumID; }
public void Create(AwarenessWorkshopsViewModel db) { var entity = new AwarenessWorkshops_Table(); entity.AwarenessName = db.AwarenessName; entity.AwarenessDate = (DateTime)db.AwarenessDate.Date; entity.TotalBeneficiaries = db.TotalBeneficiaries; entity.TotalHours = db.TotalHours; 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.Add(entity); entities.SaveChanges(); db.AwarenessID = entity.AwarenessID; }
public void Create(ProjectControlViewModel db) { try { // تم اضافة هذا الاستعلام لعدم تكرار المشروع للمستخدم var project = entities.ProjectControl_Table .Single(i => i.UserID == db.UserID && i.ProjectID == db.ProjectID); db.ProjectControlID = 0; } catch (Exception) { var entity = new ProjectControl_Table(); entity.UserID = db.UserID; entity.ProjectID = db.ProjectID; entity.Status = db.Status; entities.ProjectControl_Table.Add(entity); entities.SaveChanges(); db.ProjectControlID = entity.ProjectControlID; } }
public ActionResult ADDBenef(BeneficiariesViewModel db) { LawyersEntities entities = new LawyersEntities(); var entity = new Beneficiaries_Table(); entity.BeneficiariesIDNumber = db.BeneficiariesIDNumber; entity.BeneficiariesName = db.BeneficiariesName; entity.BeneficiariesPhone = db.BeneficiariesPhone; entity.GenderID = db.GenderID; entities.Beneficiaries_Table.Add(entity); entities.SaveChanges(); db.Beneficiaries_ID = entity.Beneficiaries_ID; return(View()); }