Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSeqcontrollist(ref DataRow row, Seqcontrollist entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("sc_type", entity.scType);
     row.SetField("sc_table", entity.scTable);
     row.SetField("sc_id", entity.scId);
     row.SetField("id_description", entity.idDescription);
     row.SetField("sc_exists", entity.scExists);
     row.SetField("sc_value", entity.scValue);
     row.SetField("trans_user", entity.transUser);
     row.SetField("trans_proc", entity.transProc);
     row.SetField("trans_date", entity.transDate);
     row.SetField("row_id", entity.rowId.ToByteArray());
     row.SetField("seqcontrollistuserfield", entity.seqcontrollistuserfield);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Seqcontrollist BuildSeqcontrollistFromRow(DataRow row)
        {
            Seqcontrollist entity = new Seqcontrollist();

            entity.coNum                   = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum                   = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.scType                  = row.IsNull("sc_type") ? string.Empty : row.Field <string>("sc_type");
            entity.scTable                 = row.IsNull("sc_table") ? string.Empty : row.Field <string>("sc_table");
            entity.scId                    = row.IsNull("sc_id") ? string.Empty : row.Field <string>("sc_id");
            entity.idDescription           = row.IsNull("id_description") ? string.Empty : row.Field <string>("id_description");
            entity.scExists                = row.Field <bool>("sc_exists");
            entity.scValue                 = row.IsNull("sc_value") ? string.Empty : row.Field <string>("sc_value");
            entity.transUser               = row.IsNull("trans_user") ? string.Empty : row.Field <string>("trans_user");
            entity.transProc               = row.IsNull("trans_proc") ? string.Empty : row.Field <string>("trans_proc");
            entity.transDate               = row.IsNull("trans_date") ? string.Empty : row.Field <string>("trans_date");
            entity.rowId                   = row.Field <byte[]>("row_id").ToStringEncoded();
            entity.seqcontrollistuserfield = row.IsNull("seqcontrollistuserfield") ? string.Empty : row.Field <string>("seqcontrollistuserfield");
            entity.userfield               = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }