예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPolinedetailcriteria(ref DataRow row, Polinedetailcriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("rt_id", entity.rtId);
     row.SetField("po_number", entity.poNumber);
     row.SetField("po_suffix", entity.poSuffix);
     row.SetField("polinedetailcriteriauserfield", entity.polinedetailcriteriauserfield);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Polinedetailcriteria BuildPolinedetailcriteriaFromRow(DataRow row)
        {
            Polinedetailcriteria entity = new Polinedetailcriteria();

            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.rtId     = row.IsNull("rt_id") ? 0 : row.Field <int>("rt_id");
            entity.poNumber = row.IsNull("po_number") ? string.Empty : row.Field <string>("po_number");
            entity.poSuffix = row.IsNull("po_suffix") ? string.Empty : row.Field <string>("po_suffix");
            entity.polinedetailcriteriauserfield = row.IsNull("polinedetailcriteriauserfield") ? string.Empty : row.Field <string>("polinedetailcriteriauserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }