Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWlaicriteria(ref DataRow row, Wlaicriteria entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("prodbeg", entity.prodbeg);
     row.SetField("prodend", entity.prodend);
     row.SetField("crtmasterfl", entity.crtmasterfl);
     row.SetField("crtitemfl", entity.crtitemfl);
     row.SetField("crtbinsfl", entity.crtbinsfl);
     row.SetField("crtbinsfl-sensitive", entity.crtbinsflSensitive);
     row.SetField("crtxrefitemfl", entity.crtxrefitemfl);
     row.SetField("crtvendorfl", entity.crtvendorfl);
     row.SetField("crttablesfl", entity.crttablesfl);
     row.SetField("wllivefl", entity.wllivefl);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Wlaicriteria BuildWlaicriteriaFromRow(DataRow row)
        {
            Wlaicriteria entity = new Wlaicriteria();

            entity.whse               = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prodcat            = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.prodbeg            = row.IsNull("prodbeg") ? string.Empty : row.Field <string>("prodbeg");
            entity.prodend            = row.IsNull("prodend") ? string.Empty : row.Field <string>("prodend");
            entity.crtmasterfl        = row.Field <bool>("crtmasterfl");
            entity.crtitemfl          = row.Field <bool>("crtitemfl");
            entity.crtbinsfl          = row.Field <bool>("crtbinsfl");
            entity.crtbinsflSensitive = row.Field <bool>("crtbinsfl-sensitive");
            entity.crtxrefitemfl      = row.Field <bool>("crtxrefitemfl");
            entity.crtvendorfl        = row.Field <bool>("crtvendorfl");
            entity.crttablesfl        = row.Field <bool>("crttablesfl");
            entity.wllivefl           = row.Field <bool>("wllivefl");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }