public Struct_PrintConfiguration Guardar() { Connection.D_PrinterConfig PC = new Connection.D_PrinterConfig(); if (Id == 0) { PC.insertPrintConfiguration(IdUser, Puerto, Baudios, Modelo); return(Struct_PrintConfiguration.GetPrintConfiguration(IdUser)); } else { PC.updatePrintConfiguration(IdUser, Puerto, Baudios, Modelo); return(this); } }
public static Struct_PrintConfiguration GetPrintConfiguration(int IdUser) { Connection.D_PrinterConfig PC = new Connection.D_PrinterConfig(); DataRow DR = PC.getPrintConfiguration(IdUser); if (DR != null) { Struct_PrintConfiguration PrintConfig = new Struct_PrintConfiguration(DR); return(PrintConfig); } else { return(null); } }
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); } }