Beispiel #1
0
        public static Reptwizardlistproc BuildReptwizardlistprocFromRow(DataRow row)
        {
            Reptwizardlistproc entity = new Reptwizardlistproc();

            entity.listproc   = row.IsNull("listproc") ? string.Empty : row.Field <string>("listproc");
            entity.allfl      = row.Field <bool>("allfl");
            entity.amount     = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.apinvno    = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.checkno    = row.IsNull("checkno") ? decimal.Zero : row.Field <decimal>("checkno");
            entity.custno     = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.disponly1  = row.IsNull("disponly1") ? string.Empty : row.Field <string>("disponly1");
            entity.disponly2  = row.IsNull("disponly2") ? string.Empty : row.Field <string>("disponly2");
            entity.disponly3  = row.IsNull("disponly3") ? string.Empty : row.Field <string>("disponly3");
            entity.disponly4  = row.IsNull("disponly4") ? string.Empty : row.Field <string>("disponly4");
            entity.disponly5  = row.IsNull("disponly5") ? string.Empty : row.Field <string>("disponly5");
            entity.disponly6  = row.IsNull("disponly6") ? string.Empty : row.Field <string>("disponly6");
            entity.disponly7  = row.IsNull("disponly7") ? string.Empty : row.Field <string>("disponly7");
            entity.disponly8  = row.IsNull("disponly8") ? string.Empty : row.Field <string>("disponly8");
            entity.disponly9  = row.IsNull("disponly9") ? string.Empty : row.Field <string>("disponly9");
            entity.disponly10 = row.IsNull("disponly10") ? string.Empty : row.Field <string>("disponly10");
            entity.jrnlno     = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.name       = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.orderno    = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf   = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.outputty   = row.IsNull("outputty") ? string.Empty : row.Field <string>("outputty");
            entity.payallfl   = row.Field <bool>("payallfl");
            entity.prodcat    = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.reprintfl  = row.Field <bool>("reprintfl");
            entity.route      = row.IsNull("route") ? string.Empty : row.Field <string>("route");
            entity.sapbxid    = row.IsNull("sapbxid") ? string.Empty : row.Field <string>("sapbxid");
            entity.selecttype = row.IsNull("selecttype") ? string.Empty : row.Field <string>("selecttype");
            entity.seqno      = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.seqno2     = row.IsNull("seqno2") ? decimal.Zero : row.Field <decimal>("seqno2");
            entity.shipto     = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.sortno     = row.IsNull("sortno") ? 0 : row.Field <int>("sortno");
            entity.transtype  = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.type       = row.Field <bool>("type");
            entity.user1      = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2      = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3      = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4      = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5      = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6      = row.Field <decimal?>("user6");
            entity.user7      = row.Field <decimal?>("user7");
            entity.user8      = row.Field <DateTime?>("user8");
            entity.user9      = row.Field <DateTime?>("user9");
            entity.vendno     = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            return(entity);
        }
Beispiel #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromReptwizardlistproc(ref DataRow row, Reptwizardlistproc entity)
 {
     row.SetField("listproc", entity.listproc);
     row.SetField("allfl", entity.allfl);
     row.SetField("amount", entity.amount);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("checkno", entity.checkno);
     row.SetField("custno", entity.custno);
     row.SetField("disponly1", entity.disponly1);
     row.SetField("disponly2", entity.disponly2);
     row.SetField("disponly3", entity.disponly3);
     row.SetField("disponly4", entity.disponly4);
     row.SetField("disponly5", entity.disponly5);
     row.SetField("disponly6", entity.disponly6);
     row.SetField("disponly7", entity.disponly7);
     row.SetField("disponly8", entity.disponly8);
     row.SetField("disponly9", entity.disponly9);
     row.SetField("disponly10", entity.disponly10);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("name", entity.name);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("outputty", entity.outputty);
     row.SetField("payallfl", entity.payallfl);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("reprintfl", entity.reprintfl);
     row.SetField("route", entity.route);
     row.SetField("sapbxid", entity.sapbxid);
     row.SetField("selecttype", entity.selecttype);
     row.SetField("seqno", entity.seqno);
     row.SetField("seqno2", entity.seqno2);
     row.SetField("shipto", entity.shipto);
     row.SetField("sortno", entity.sortno);
     row.SetField("transtype", entity.transtype);
     row.SetField("type", entity.type);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("vendno", entity.vendno);
 }