public void Load_Sql() { DataDataContext aDataContext = new DataDataContext(ConnectionString); Contacts = aDataContext.DataCeShi; foreach (object i in Contacts) { DataCeShi d = (DataCeShi)i; CheckStrings[index++] = d.Regular; } }
public void Save_DataBase() { if (Pattern != null) { Create_DataBase(); DataCeShi aNewContact = new DataCeShi { Regular = Pattern }; DataDataContext aDataContext = new DataDataContext(ConnectionString); aDataContext.DataCeShi.InsertOnSubmit(aNewContact); aDataContext.SubmitChanges(); Contacts = aDataContext.DataCeShi; foreach (object i in Contacts) { DataCeShi d = (DataCeShi)i; CheckStrings[index++] = d.Regular; } } Update(); }
partial void DeleteDataCeShi(DataCeShi instance);
partial void UpdateDataCeShi(DataCeShi instance);
partial void InsertDataCeShi(DataCeShi instance);