Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsoccriteria(ref DataRow row, Icsoccriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("custtype", entity.custtype);
     row.SetField("levelcd", entity.levelcd);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("shipto", entity.shipto);
     row.SetField("whse", entity.whse);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Icsoccriteria BuildIcsoccriteriaFromRow(DataRow row)
        {
            Icsoccriteria entity = new Icsoccriteria();

            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custtype  = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype");
            entity.levelcd   = row.IsNull("levelcd") ? 0 : row.Field <int>("levelcd");
            entity.pricetype = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.shipto    = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }