Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasttsearchcriteria(ref DataRow row, Sasttsearchcriteria entity)
 {
     row.SetField("codechar", entity.codechar);
     row.SetField("codeint", entity.codeint);
     row.SetField("vendno", entity.vendno);
     row.SetField("codechar2", entity.codechar2);
     row.SetField("codelog2", entity.codelog2);
     row.SetField("descrip", entity.descrip);
     row.SetField("searchname", entity.searchname);
     row.SetField("searchvalue", entity.searchvalue);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Sasttsearchcriteria BuildSasttsearchcriteriaFromRow(DataRow row)
        {
            Sasttsearchcriteria entity = new Sasttsearchcriteria();

            entity.codechar    = row.IsNull("codechar") ? string.Empty : row.Field <string>("codechar");
            entity.codeint     = row.IsNull("codeint") ? 0 : row.Field <int>("codeint");
            entity.vendno      = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.codechar2   = row.IsNull("codechar2") ? string.Empty : row.Field <string>("codechar2");
            entity.codelog2    = row.Field <bool>("codelog2");
            entity.descrip     = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.searchname  = row.IsNull("searchname") ? string.Empty : row.Field <string>("searchname");
            entity.searchvalue = row.IsNull("searchvalue") ? string.Empty : row.Field <string>("searchvalue");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }