partial void DeleteOrganisation(Organisation instance);
 partial void InsertOrganisation(Organisation instance);
 partial void UpdateOrganisation(Organisation instance);
		private void detach_Organisations1(Organisation entity)
		{
			this.SendPropertyChanging();
			entity.Arbetsplat1 = null;
		}
		private void attach_Organisations(Organisation entity)
		{
			this.SendPropertyChanging();
			entity.Arbetsplat = this;
		}
Ejemplo n.º 6
0
 public List<Organisation> listAllArbetsplatser(Organisation orgArbetsplatser)
 {
     try
     {
         return (from p in data.Organisations
                 where p.arbetsplatser_id == orgArbetsplatser.arbetsplatser_id
                 select p).ToList();
     }
     catch
     {
         return null;
     }
 }
Ejemplo n.º 7
0
 public bool modOrganisation(Organisation newOrg)
 {
     try
     {
         Organisation OrgToModify = (from org in data.Organisations
                                     where org.Id == newOrg.Id
                                     select org).Single();
         OrgToModify.Namn = newOrg.Namn;
         OrgToModify.Telefonummer = newOrg.Telefonummer;
         OrgToModify.Ansvarig = newOrg.Ansvarig;
         OrgToModify.Arbetsplat = newOrg.Arbetsplat;
         data.SubmitChanges();
         return true;
     }
     catch
     {
         return false;
     }
 }
Ejemplo n.º 8
0
        //
        //

        public bool addOrganisation(Organisation newOrg)
        {
            try
            {
                data.Organisations.InsertOnSubmit(newOrg);
                data.SubmitChanges();
                return true;
            }
            catch
            {
                return false;
            }
        }