Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOtetaddpoheader(ref DataRow row, Otetaddpoheader entity)
 {
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("loadtype", entity.loadtype);
     row.SetField("trackno", entity.trackno);
     row.SetField("vendno", entity.vendno);
     row.SetField("whse", entity.whse);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Otetaddpoheader BuildOtetaddpoheaderFromRow(DataRow row)
        {
            Otetaddpoheader entity = new Otetaddpoheader();

            entity.pono      = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf     = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.loadtype  = row.IsNull("loadtype") ? string.Empty : row.Field <string>("loadtype");
            entity.trackno   = row.IsNull("trackno") ? 0 : row.Field <int>("trackno");
            entity.vendno    = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.stagecd   = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }