Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdinaction(ref DataRow row, Pdinaction entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("seqno", entity.seqno);
     row.SetField("btntype", entity.btntype);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Pdinaction BuildPdinactionFromRow(DataRow row)
        {
            Pdinaction entity = new Pdinaction();

            entity.orderno   = row.IsNull("orderno") ? string.Empty : row.Field <string>("orderno");
            entity.seqno     = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.btntype   = row.IsNull("btntype") ? string.Empty : row.Field <string>("btntype");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }