Пример #1
0
        public static PrinterAction GetLastPrinterAction(int IdUser)
        {
            Connection.D_PrinterConfig PC = new Connection.D_PrinterConfig();
            DataRow DR = PC.GetPrinterAction(IdUser);

            if (DR != null)
            {
                XmlSerializaers.PrinterAction PA = new PrinterAction();
                PA.Action = DR["PrintAction"].ToString();
                PA.Id     = int.Parse(DR["Id"].ToString());
                return(PA);
            }
            else
            {
                return(null);
            }
        }
Пример #2
0
        public static PrinterAction Deserealiza(string StringXML)
        {
            XmlSerializer ser = new XmlSerializer(typeof(PrinterAction));


            StringReader  SR = new StringReader(StringXML);
            PrinterAction F  = null;

            try
            {
                F = (PrinterAction)ser.Deserialize(SR);
            }
            catch
            {
                F = Deserealiza(ProcessString(StringXML));
            }

            return(F);
        }