/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWebextendcriteria(ref DataRow row, Webextendcriteria entity) { row.SetField("cono", entity.cono); row.SetField("functionname", entity.functionname); row.SetField("screenname", entity.screenname); row.SetField("extensiontype", entity.extensiontype); row.SetField("tag", entity.tag); row.SetField("descrip", entity.descrip); row.SetField("settingvalue", entity.settingvalue); row.SetField("statustype", entity.statustype); row.SetField("latestrevisiononly", entity.latestrevisiononly); row.SetField("level", entity.level); row.SetField("webextensionrowid", entity.webextensionrowid.ToByteArray()); row.SetField("recordcountlimit", entity.recordcountlimit); row.SetField("userfield", entity.userfield); }
public static Webextendcriteria BuildWebextendcriteriaFromRow(DataRow row) { Webextendcriteria entity = new Webextendcriteria(); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.functionname = row.IsNull("functionname") ? string.Empty : row.Field <string>("functionname"); entity.screenname = row.IsNull("screenname") ? string.Empty : row.Field <string>("screenname"); entity.extensiontype = row.IsNull("extensiontype") ? string.Empty : row.Field <string>("extensiontype"); entity.tag = row.IsNull("tag") ? string.Empty : row.Field <string>("tag"); entity.descrip = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip"); entity.settingvalue = row.IsNull("settingvalue") ? string.Empty : row.Field <string>("settingvalue"); entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype"); entity.latestrevisiononly = row.Field <bool>("latestrevisiononly"); entity.level = row.IsNull("level") ? string.Empty : row.Field <string>("level"); entity.webextensionrowid = row.Field <byte[]>("webextensionrowid").ToStringEncoded(); entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }