예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPtxsrcustlist(ref DataRow row, Ptxsrcustlist entity)
 {
     row.SetField("keytype", entity.keytype);
     row.SetField("vendno", entity.vendno);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("srcrowpointer", entity.srcrowpointer);
     row.SetField("custrowpointer", entity.custrowpointer);
     row.SetField("shiptorowpointer", entity.shiptorowpointer);
     row.SetField("custno", entity.custno);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("custname", entity.custname);
     row.SetField("shipto", entity.shipto);
     row.SetField("arssnotesfl", entity.arssnotesfl);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("vendname", entity.vendname);
     row.SetField("hierarchy", entity.hierarchy);
     row.SetField("custlistuserfield", entity.custlistuserfield);
     row.SetField("ptxrouterulerowid", entity.ptxrouterulerowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Ptxsrcustlist BuildPtxsrcustlistFromRow(DataRow row)
        {
            Ptxsrcustlist entity = new Ptxsrcustlist();

            entity.keytype           = row.IsNull("keytype") ? string.Empty : row.Field <string>("keytype");
            entity.vendno            = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.shipfmno          = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.srcrowpointer     = row.IsNull("srcrowpointer") ? string.Empty : row.Field <string>("srcrowpointer");
            entity.custrowpointer    = row.IsNull("custrowpointer") ? string.Empty : row.Field <string>("custrowpointer");
            entity.shiptorowpointer  = row.IsNull("shiptorowpointer") ? string.Empty : row.Field <string>("shiptorowpointer");
            entity.custno            = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custnotesfl       = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.custname          = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.shipto            = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.arssnotesfl       = row.IsNull("arssnotesfl") ? string.Empty : row.Field <string>("arssnotesfl");
            entity.vendnotesfl       = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.vendname          = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.hierarchy         = row.IsNull("hierarchy") ? 0 : row.Field <int>("hierarchy");
            entity.custlistuserfield = row.IsNull("custlistuserfield") ? string.Empty : row.Field <string>("custlistuserfield");
            entity.ptxrouterulerowid = row.Field <byte[]>("ptxrouterulerowid").ToStringEncoded();
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }