Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcirquorders(ref DataRow row, Icirquorders entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("whse", entity.whse);
     row.SetField("orderno", entity.orderno);
     row.SetField("lineno", entity.lineno);
     row.SetField("errmsg", entity.errmsg);
     row.SetField("cntln", entity.cntln);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Icirquorders BuildIcirquordersFromRow(DataRow row)
        {
            Icirquorders entity = new Icirquorders();

            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto    = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.orderno   = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.lineno    = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.errmsg    = row.IsNull("errmsg") ? string.Empty : row.Field <string>("errmsg");
            entity.cntln     = row.IsNull("cntln") ? 0 : row.Field <int>("cntln");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }