예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArilcriteria(ref DataRow row, Arilcriteria entity)
 {
     row.SetField("fibatch", entity.fibatch);
     row.SetField("custno", entity.custno);
     row.SetField("checkno", entity.checkno);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Arilcriteria BuildArilcriteriaFromRow(DataRow row)
        {
            Arilcriteria entity = new Arilcriteria();

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