Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOtorderlookupcriteria(ref DataRow row, Otorderlookupcriteria entity)
 {
     row.SetField("trackno", entity.trackno);
     row.SetField("vendno", entity.vendno);
     row.SetField("contno", entity.contno);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("openonly", entity.openonly);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("customfield", entity.customfield);
 }
Exemple #2
0
        public static Otorderlookupcriteria BuildOtorderlookupcriteriaFromRow(DataRow row)
        {
            Otorderlookupcriteria entity = new Otorderlookupcriteria();

            entity.trackno          = row.IsNull("trackno") ? 0 : row.Field <int>("trackno");
            entity.vendno           = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.contno           = row.IsNull("contno") ? string.Empty : row.Field <string>("contno");
            entity.stagecd          = row.IsNull("stagecd") ? string.Empty : row.Field <string>("stagecd");
            entity.openonly         = row.Field <bool>("openonly");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.customfield      = row.IsNull("customfield") ? string.Empty : row.Field <string>("customfield");
            return(entity);
        }