Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromEdsvsearchcriteria(ref DataRow row, Edsvsearchcriteria entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("vendorid", entity.vendorid);
     row.SetField("contractno", entity.contractno);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Edsvsearchcriteria BuildEdsvsearchcriteriaFromRow(DataRow row)
        {
            Edsvsearchcriteria entity = new Edsvsearchcriteria();

            entity.vendno     = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendorid   = row.IsNull("vendorid") ? string.Empty : row.Field <string>("vendorid");
            entity.contractno = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }