Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOesfsearchcriteria(ref DataRow row, Oesfsearchcriteria entity)
 {
     row.SetField("recordtype", entity.recordtype);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("whse", entity.whse);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Oesfsearchcriteria BuildOesfsearchcriteriaFromRow(DataRow row)
        {
            Oesfsearchcriteria entity = new Oesfsearchcriteria();

            entity.recordtype       = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto           = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }