Exemple #1
0
        public static void Serialize(CrossListCriteria cl, string outputFileName)
        {
            var    oSerialiser = new XmlSerializer(typeof(CrossListCriteria));
            Stream oStream     = new FileStream(outputFileName, FileMode.Truncate, FileAccess.ReadWrite);

            oSerialiser.Serialize(oStream, cl);
            oStream.Close();
        }
Exemple #2
0
        // Public Methods (4) 

        public static CrossListCriteria DeSerialize(string InputFileName)
        {
            var    ReturnTask  = new CrossListCriteria();
            var    oSerialiser = new XmlSerializer(typeof(CrossListCriteria));
            Stream oStream     = new FileStream(InputFileName, FileMode.Open, FileAccess.Read);

            try
            {
                ReturnTask = (CrossListCriteria)oSerialiser.Deserialize(oStream);
            }
            catch
            {
                MessageBox.Show("Nothin' in file mate!");
            }
            oStream.Close();
            return(ReturnTask);
        }
Exemple #3
0
        // Public Methods (5) 

        public static void DisplayCrossListInSkuView(CrossListCriteria cl)
        {
            if (cl != null)
            {
                var filteredSkus = GetFilteredSkus(
                    cl.TaxonomyIDFilter, cl.ValueFilters, cl.AttributeTypeFilters, cl.MatchAllTerms);

                if (filteredSkus == null)
                {
                    MessageBox.Show("Crosslist not defined.");
                }
                else
                {
                    AryaTools.Instance.Forms.SkuForm.LoadTab(filteredSkus, null, "Query", "Query");
                }
            }
            else
            {
                MessageBox.Show("No Skus in crosslist node");
            }
        }