Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAremtcriteria(ref DataRow row, Aremtcriteria entity)
 {
     row.SetField("groupid", entity.groupid);
     row.SetField("custno", entity.custno);
     row.SetField("type", entity.type);
     row.SetField("invno", entity.invno);
     row.SetField("invsuf", entity.invsuf);
     row.SetField("seqno", entity.seqno);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Aremtcriteria BuildAremtcriteriaFromRow(DataRow row)
        {
            Aremtcriteria entity = new Aremtcriteria();

            entity.groupid   = row.IsNull("groupid") ? string.Empty : row.Field <string>("groupid");
            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.type      = row.IsNull("type") ? 0 : row.Field <int>("type");
            entity.invno     = row.IsNull("invno") ? 0 : row.Field <int>("invno");
            entity.invsuf    = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf");
            entity.seqno     = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }