Beispiel #1
0
        public static Loadwtquickviewsingle BuildLoadwtquickviewsingleFromRow(DataRow row)
        {
            Loadwtquickviewsingle entity = new Loadwtquickviewsingle();

            entity.transtype      = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.stagecd        = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.tiedordertype  = row.IsNull("tiedordertype") ? string.Empty : row.Field <string>("tiedordertype");
            entity.orderaltno     = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.orderaltsuf    = row.IsNull("orderaltsuf") ? 0 : row.Field <int>("orderaltsuf");
            entity.frmcono        = row.IsNull("frmcono") ? 0 : row.Field <int>("frmcono");
            entity.frmcononame    = row.IsNull("frmcononame") ? string.Empty : row.Field <string>("frmcononame");
            entity.tocono         = row.IsNull("tocono") ? 0 : row.Field <int>("tocono");
            entity.tocononame     = row.IsNull("tocononame") ? string.Empty : row.Field <string>("tocononame");
            entity.shipfromwhse   = row.IsNull("shipfromwhse") ? string.Empty : row.Field <string>("shipfromwhse");
            entity.shipfromname   = row.IsNull("shipfromname") ? string.Empty : row.Field <string>("shipfromname");
            entity.shiptoname     = row.IsNull("shiptoname") ? string.Empty : row.Field <string>("shiptoname");
            entity.duedt          = row.Field <DateTime?>("duedt");
            entity.custholdtxt    = row.IsNull("custholdtxt") ? string.Empty : row.Field <string>("custholdtxt");
            entity.isLate         = row.Field <bool>("isLate");
            entity.nolineitem     = row.IsNull("nolineitem") ? 0 : row.Field <int>("nolineitem");
            entity.totlineamt     = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt");
            entity.cCurrSymbol    = row.IsNull("cCurrSymbol") ? string.Empty : row.Field <string>("cCurrSymbol");
            entity.shipviaty      = row.IsNull("shipviaty") ? string.Empty : row.Field <string>("shipviaty");
            entity.shipviatyDesc  = row.IsNull("shipviatyDesc") ? string.Empty : row.Field <string>("shipviatyDesc");
            entity.reasoncode     = row.IsNull("reasoncode") ? string.Empty : row.Field <string>("reasoncode");
            entity.reasoncodeDesc = row.IsNull("reasoncodeDesc") ? string.Empty : row.Field <string>("reasoncodeDesc");
            entity.shipinstr      = row.IsNull("shipinstr") ? string.Empty : row.Field <string>("shipinstr");
            entity.refer          = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.wtauth         = row.IsNull("wtauth") ? 0 : row.Field <int>("wtauth");
            entity.wtauthVisible  = row.Field <bool>("wtauthVisible");
            entity.stagearea      = row.IsNull("stagearea") ? string.Empty : row.Field <string>("stagearea");
            entity.rushfl         = row.Field <bool>("rushfl");
            entity.ignoreltfl     = row.Field <bool>("ignoreltfl");
            entity.bofl           = row.Field <bool>("bofl");
            entity.isTiesExist    = row.Field <bool>("isTiesExist");
            entity.isReceiving    = row.Field <bool>("isReceiving");
            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.userField      = row.IsNull("userField") ? string.Empty : row.Field <string>("userField");
            return(entity);
        }
Beispiel #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadwtquickviewsingle(ref DataRow row, Loadwtquickviewsingle entity)
 {
     row.SetField("transtype", entity.transtype);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("tiedordertype", entity.tiedordertype);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("orderaltsuf", entity.orderaltsuf);
     row.SetField("frmcono", entity.frmcono);
     row.SetField("frmcononame", entity.frmcononame);
     row.SetField("tocono", entity.tocono);
     row.SetField("tocononame", entity.tocononame);
     row.SetField("shipfromwhse", entity.shipfromwhse);
     row.SetField("shipfromname", entity.shipfromname);
     row.SetField("shiptoname", entity.shiptoname);
     row.SetField("duedt", entity.duedt);
     row.SetField("custholdtxt", entity.custholdtxt);
     row.SetField("isLate", entity.isLate);
     row.SetField("nolineitem", entity.nolineitem);
     row.SetField("totlineamt", entity.totlineamt);
     row.SetField("cCurrSymbol", entity.cCurrSymbol);
     row.SetField("shipviaty", entity.shipviaty);
     row.SetField("shipviatyDesc", entity.shipviatyDesc);
     row.SetField("reasoncode", entity.reasoncode);
     row.SetField("reasoncodeDesc", entity.reasoncodeDesc);
     row.SetField("shipinstr", entity.shipinstr);
     row.SetField("refer", entity.refer);
     row.SetField("wtauth", entity.wtauth);
     row.SetField("wtauthVisible", entity.wtauthVisible);
     row.SetField("stagearea", entity.stagearea);
     row.SetField("rushfl", entity.rushfl);
     row.SetField("ignoreltfl", entity.ignoreltfl);
     row.SetField("bofl", entity.bofl);
     row.SetField("isTiesExist", entity.isTiesExist);
     row.SetField("isReceiving", entity.isReceiving);
     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("userField", entity.userField);
 }