public override global::System.Data.DataSet Clone() { companyDataSet cln = ((companyDataSet)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return(cln); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { companyDataSet ds = new companyDataSet(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }
static async Task Test() { var dp = new configDataSet(); var cdp = new companyDataSet(); //var nr = dp.Aziende.NewAziendeRow(); //nr.Nome = "az1"; //nr.Id = 1; //dp.Aziende.AddAziendeRow(nr); //nr.AcceptChanges(); //nr.Delete(); //nr.SetModified(); //var nz = cdp.Nazioni.NewNazioniRow(); //nz.Nome = "italia2"; //nz.Id = 100; //cdp.Nazioni.AddNazioniRow(nz); //var nr = dp.Nazioni.NewNazioniRow(); //nr.Nome = "italia"; //nr.Id = 1; //dp.Nazioni.AddNazioniRow(nr); //nr.AcceptChanges(); //dp.Aziende.PrimaryKey = new[] {dp.Aziende.IdColumn}; //var countries = FromAmica2.ToList<Country>(dp.Nazioni); //var country = FromAmica.To<Country>(nr); var hdp = new HttpDataProvider(new DataProvider("C:\\Amica 10\\Database"), "nicola", "nicola") { LocalCompanyId = 1 }; //hdp.DataProvider.LoadConfigData(); //try //{ await hdp.GetAsync(cdp); //await hdp.UpdateAsync(cdp); //await hdp.GetAsync((DataSet)cdp); //await hdp.UpateAsync(dp); //await hdp.UpdateNazioniAsync(nr); //await hdp.UpdateAziendeAsync(nr); //await hdp.GetAziendeAsync(dp); //await hdp.GetNazioniAsync(dp); //} //catch (Exception e) //{ //throw e; //} //Console.WriteLine(hdp.HttpResponse.StatusCode); }
/// <summary> /// Downloads PriceList changes from the server and merges them to the Listini table on the local dataset. /// </summary> /// <param name="dataSet">companyDataSet instance.</param> private async Task GetAndSyncListiniAsync(companyDataSet dataSet) { throw new NotSupportedException(); //await GetAndSyncCompanyTable<PriceList>(dataSet.Listini); }
/// <summary> /// Downloads Warehouses changes from the server and merges them to the Taglie table on the local dataset. /// </summary> /// <param name="dataSet">companyDataSet instance.</param> private async Task GetAndSyncTaglieAsync(companyDataSet dataSet) { await GetAndSyncCompanyTable <Size>(dataSet.Taglie); }
/// <summary> /// Downloads Warehouses changes from the server and merges them to the Magazzini table on the local dataset. /// </summary> /// <param name="dataSet">companyDataSet instance.</param> private async Task GetAndSyncMagazziniAsync(companyDataSet dataSet) { await GetAndSyncCompanyTable <Warehouse>(dataSet.Magazzini); }
/// <summary> /// Downloads Vat changes from the server and merges them to the Pagamenti table on the local dataset. /// </summary> /// <param name="dataSet">companyDataSet instance.</param> private async Task GetAndSyncPagamentiAsync(companyDataSet dataSet) { await GetAndSyncCompanyTable <Payment>(dataSet.Pagamenti); }
/// <summary> /// Downloads payment option changes from the server and merges them to the Spese table on the local dataset. /// </summary> /// <param name="dataSet">companyDataSet instance.</param> private async Task GetAndSyncSpeseAsync(companyDataSet dataSet) { await GetAndSyncCompanyTable <Fee>(dataSet.Spese); }
/// <summary> /// Downloads payment option changes from the server and merges them to the ModalitàPagamento table on the local dataset. /// </summary> /// <param name="dataSet">companyDataSet instance.</param> private async Task GetAndSyncModalitàPagamentoAsync(companyDataSet dataSet) { await GetAndSyncCompanyTable <PaymentMethod>(dataSet.ModalitàPagamento); }
/// <summary> /// Downloads Vat changes from the server and merges them to the CausaliIVA table on the local dataset. /// </summary> /// <param name="dataSet">companyDataSet instance.</param> private async Task GetAndSyncCausaliIVAAsync(companyDataSet dataSet) { await GetAndSyncCompanyTable <Vat>(dataSet.CausaliIVA); }
/// <summary> /// Downloads Countries changes from the server and merges them to the Nazioni table on the local dataset. /// </summary> /// <param name="dataSet">companyDataSet instance.</param> private async Task GetAndSyncDocumentiAsync(companyDataSet dataSet) { await GetAndSyncCompanyTable <Document>(dataSet.Documenti); }
/// <summary> /// Downloads Contacts changes from the server and merges them to the Anagrafiche table on the local dataset. /// </summary> /// <param name="dataSet">companyDataSet instance.</param> private async Task GetAndSyncAnagraficheAsync(companyDataSet dataSet) { await GetAndSyncCompanyTable <Contact>(dataSet.Anagrafiche); }