示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPrintersettings(ref DataRow row, Printersettings entity)
 {
     row.SetField("printerinstance", entity.printerinstance);
     row.SetField("printtype", entity.printtype);
     row.SetField("printernm", entity.printernm);
     row.SetField("emailaddr", entity.emailaddr);
     row.SetField("flatfilenm", entity.flatfilenm);
     row.SetField("faxto1", entity.faxto1);
     row.SetField("faxto2", entity.faxto2);
     row.SetField("faxphoneno", entity.faxphoneno);
     row.SetField("faxfrom", entity.faxfrom);
     row.SetField("faxcom", entity.faxcom);
     row.SetField("faxpriority", entity.faxpriority);
     row.SetField("printoptfl", entity.printoptfl);
     row.SetField("queue", entity.queue);
     row.SetField("outputover", entity.outputover);
 }
示例#2
0
        public static Printersettings BuildPrintersettingsFromRow(DataRow row)
        {
            Printersettings entity = new Printersettings();

            entity.printerinstance = row.IsNull("printerinstance") ? string.Empty : row.Field <string>("printerinstance");
            entity.printtype       = row.IsNull("printtype") ? string.Empty : row.Field <string>("printtype");
            entity.printernm       = row.IsNull("printernm") ? string.Empty : row.Field <string>("printernm");
            entity.emailaddr       = row.IsNull("emailaddr") ? string.Empty : row.Field <string>("emailaddr");
            entity.flatfilenm      = row.IsNull("flatfilenm") ? string.Empty : row.Field <string>("flatfilenm");
            entity.faxto1          = row.IsNull("faxto1") ? string.Empty : row.Field <string>("faxto1");
            entity.faxto2          = row.IsNull("faxto2") ? string.Empty : row.Field <string>("faxto2");
            entity.faxphoneno      = row.IsNull("faxphoneno") ? string.Empty : row.Field <string>("faxphoneno");
            entity.faxfrom         = row.IsNull("faxfrom") ? string.Empty : row.Field <string>("faxfrom");
            entity.faxcom          = row.IsNull("faxcom") ? string.Empty : row.Field <string>("faxcom");
            entity.faxpriority     = row.Field <bool>("faxpriority");
            entity.printoptfl      = row.Field <bool>("printoptfl");
            entity.queue           = row.IsNull("queue") ? string.Empty : row.Field <string>("queue");
            entity.outputover      = row.IsNull("outputover") ? string.Empty : row.Field <string>("outputover");
            return(entity);
        }