Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoetprintreportlist(ref DataRow row, Poetprintreportlist entity)
 {
     row.SetField("type", entity.type);
     row.SetField("printernm", entity.printernm);
     row.SetField("name", entity.name);
     row.SetField("faxprinternm", entity.faxprinternm);
     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("emailaddr", entity.emailaddr);
     row.SetField("wide", entity.wide);
     row.SetField("filefl", entity.filefl);
     row.SetField("printoptfl", entity.printoptfl);
     row.SetField("queue", entity.queue);
     row.SetField("poprintfl", entity.poprintfl);
     row.SetField("errormess", entity.errormess);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Poetprintreportlist BuildPoetprintreportlistFromRow(DataRow row)
        {
            Poetprintreportlist entity = new Poetprintreportlist();

            entity.type         = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.printernm    = row.IsNull("printernm") ? string.Empty : row.Field <string>("printernm");
            entity.name         = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.faxprinternm = row.IsNull("faxprinternm") ? string.Empty : row.Field <string>("faxprinternm");
            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.emailaddr    = row.IsNull("emailaddr") ? string.Empty : row.Field <string>("emailaddr");
            entity.wide         = row.Field <bool>("wide");
            entity.filefl       = row.Field <bool>("filefl");
            entity.printoptfl   = row.Field <bool>("printoptfl");
            entity.queue        = row.IsNull("queue") ? string.Empty : row.Field <string>("queue");
            entity.poprintfl    = row.Field <bool>("poprintfl");
            entity.errormess    = row.IsNull("errormess") ? string.Empty : row.Field <string>("errormess");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }