示例#1
0
        public static Vaheaderprint BuildVaheaderprintFromRow(DataRow row)
        {
            Vaheaderprint entity = new Vaheaderprint();

            entity.type        = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.printtype   = row.IsNull("printtype") ? string.Empty : row.Field <string>("printtype");
            entity.printernm   = row.IsNull("printernm") ? string.Empty : row.Field <string>("printernm");
            entity.name        = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.seqno       = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.printfl     = row.Field <bool>("printfl");
            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.errormess   = row.IsNull("errormess") ? string.Empty : row.Field <string>("errormess");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
示例#2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaheaderprint(ref DataRow row, Vaheaderprint entity)
 {
     row.SetField("type", entity.type);
     row.SetField("printtype", entity.printtype);
     row.SetField("printernm", entity.printernm);
     row.SetField("name", entity.name);
     row.SetField("seqno", entity.seqno);
     row.SetField("printfl", entity.printfl);
     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("errormess", entity.errormess);
     row.SetField("userfield", entity.userfield);
 }