public static void AddSite(string _name, string _number, string _address, double _lon, double _lati, int _companyId) { PCMSofCCDataContext db = new PCMSofCCDataContext(); var newSite = new Site { Name = _name, Number = _number, Address = _address, Longitude = _lon, Latitude = _lati, CompanyId = _companyId, IsUsed = 1 }; db.Site.InsertOnSubmit(newSite); db.SubmitChanges(); }
partial void DeleteSite(Site instance);
partial void UpdateSite(Site instance);
partial void InsertSite(Site instance);
private void detach_Site(Site entity) { this.SendPropertyChanging(); entity.Company = null; }
private void attach_Site(Site entity) { this.SendPropertyChanging(); entity.Company = this; }