Ejemplo n.º 1
0
        public UCProductAll(FullDataSet source, bool isNds)
        {
            thread = new Thread(new ThreadStart(MainForm.DoSplash));
            thread.Start();
            Thread.Sleep(300);


            InitializeComponent();

            productBindingSource.DataSource = new DataView(source.Product, "IsNds=" + isNds.ToString()+" and ID<>0", null, DataViewRowState.CurrentRows|DataViewRowState.Added|DataViewRowState.ModifiedCurrent);

            this.unitBindingSource.DataSource = source.Unit;

            this.storageConditionBindingSource.DataSource = source.StorageCondition;
            this.substanceBindingSource.DataSource = source.Substance;
            this.farmGroupLevel2BindingSource.DataSource = source.FarmGroupLevel2;
            this.packingBindingSource.DataSource = source.Packing;
      
            
            _isnds = isNds;

            _changes = new DataView(source.Product, null, null, DataViewRowState.Added | DataViewRowState.ModifiedCurrent | DataViewRowState.Deleted);
      
            _changes.ListChanged += new ListChangedEventHandler(_changes_ListChanged);


            _product = source.Product;


        }
Ejemplo n.º 2
0
 public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs) {
     FullDataSet ds = new FullDataSet();
     System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
     System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
     xs.Add(ds.GetSchemaSerializable());
     System.Xml.Schema.XmlSchemaAny any = new System.Xml.Schema.XmlSchemaAny();
     any.Namespace = ds.Namespace;
     sequence.Items.Add(any);
     type.Particle = sequence;
     return type;
 }
Ejemplo n.º 3
0
 public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) {
     System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
     System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
     FullDataSet ds = new FullDataSet();
     xs.Add(ds.GetSchemaSerializable());
     System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny();
     any1.Namespace = "http://www.w3.org/2001/XMLSchema";
     any1.MinOccurs = new decimal(0);
     any1.MaxOccurs = decimal.MaxValue;
     any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
     sequence.Items.Add(any1);
     System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny();
     any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
     any2.MinOccurs = new decimal(1);
     any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
     sequence.Items.Add(any2);
     System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute();
     attribute1.Name = "namespace";
     attribute1.FixedValue = ds.Namespace;
     type.Attributes.Add(attribute1);
     System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute();
     attribute2.Name = "tableTypeName";
     attribute2.FixedValue = "SubstanceDataTable";
     type.Attributes.Add(attribute2);
     type.Particle = sequence;
     return type;
 }