/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWtialineupdatecriteria(ref DataRow row, Wtialineupdatecriteria entity) { row.SetField("approvefl", entity.approvefl); row.SetField("qtyship", entity.qtyship); row.SetField("bofl", entity.bofl); row.SetField("setfl", entity.setfl); row.SetField("lQuestionfl", entity.lQuestionfl); row.SetField("lCountFl", entity.lCountFl); row.SetField("prodtype", entity.prodtype); row.SetField("WTNo", entity.wTNo); row.SetField("WTSuf", entity.wTSuf); row.SetField("rowid-wtel", entity.rowidWtel.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Wtialineupdatecriteria BuildWtialineupdatecriteriaFromRow(DataRow row) { Wtialineupdatecriteria entity = new Wtialineupdatecriteria(); entity.approvefl = row.IsNull("approvefl") ? string.Empty : row.Field <string>("approvefl"); entity.qtyship = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship"); entity.bofl = row.Field <bool>("bofl"); entity.setfl = row.Field <bool>("setfl"); entity.lQuestionfl = row.Field <bool>("lQuestionfl"); entity.lCountFl = row.Field <bool>("lCountFl"); entity.prodtype = row.IsNull("prodtype") ? string.Empty : row.Field <string>("prodtype"); entity.wTNo = row.IsNull("WTNo") ? 0 : row.Field <int>("WTNo"); entity.wTSuf = row.IsNull("WTSuf") ? 0 : row.Field <int>("WTSuf"); entity.rowidWtel = row.Field <byte[]>("rowid-wtel").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }