Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWtprintcriteria(ref DataRow row, Wtprintcriteria entity)
 {
     row.SetField("wtno", entity.wtno);
     row.SetField("wtsuf", entity.wtsuf);
     row.SetField("pickprintfl", entity.pickprintfl);
     row.SetField("printernm", entity.printernm);
     row.SetField("name", entity.name);
     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("wide", entity.wide);
     row.SetField("filefl", entity.filefl);
     row.SetField("printoptfl", entity.printoptfl);
     row.SetField("queue", entity.queue);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Wtprintcriteria BuildWtprintcriteriaFromRow(DataRow row)
        {
            Wtprintcriteria entity = new Wtprintcriteria();

            entity.wtno        = row.IsNull("wtno") ? 0 : row.Field <int>("wtno");
            entity.wtsuf       = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf");
            entity.pickprintfl = row.Field <bool>("pickprintfl");
            entity.printernm   = row.IsNull("printernm") ? string.Empty : row.Field <string>("printernm");
            entity.name        = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            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.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.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }