public static Pdeminitializepdsc1 BuildPdeminitializepdsc1FromRow(DataRow row) { Pdeminitializepdsc1 entity = new Pdeminitializepdsc1(); entity.fiShipToVisible = row.Field <bool>("fiShipTo-visible"); entity.fiShipToSensitive = row.Field <bool>("fiShipTo-sensitive"); entity.btnLookupShipToVisible = row.Field <bool>("btnLookupShipTo-visible"); entity.btnLookupShipToSensitive = row.Field <bool>("btnLookupShipTo-sensitive"); entity.lblShipToVisible = row.Field <bool>("lblShipTo-visible"); entity.lblShipToSensitive = row.Field <bool>("lblShipTo-sensitive"); entity.fiWhseVisible = row.Field <bool>("fiWhse-visible"); entity.fiWhseSensitive = row.Field <bool>("fiWhse-sensitive"); entity.btnLookupWhseVisible = row.Field <bool>("btnLookupWhse-visible"); entity.btnLookupWhseSensitive = row.Field <bool>("btnLookupWhse-sensitive"); entity.lblCustNoScreenValue = row.IsNull("lblCustNo-screen-value") ? string.Empty : row.Field <string>("lblCustNo-screen-value"); entity.lblShipToScreenValue = row.IsNull("lblShipTo-screen-value") ? string.Empty : row.Field <string>("lblShipTo-screen-value"); entity.lblProdScreenValue = row.IsNull("lblProd-screen-value") ? string.Empty : row.Field <string>("lblProd-screen-value"); entity.fiProdVisible = row.Field <bool>("fiProd-visible"); entity.btnLookupProdVisible = row.Field <bool>("btnLookupProd-visible"); entity.lblProdVisible = row.Field <bool>("lblProd-visible"); entity.fiCustNoVisible = row.Field <bool>("fiCustNo-visible"); entity.btnLookupCustnoVisible = row.Field <bool>("btnLookupCustno-visible"); entity.lblCustNoVisible = row.Field <bool>("lblCustNo-visible"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdeminitializepdsc1(ref DataRow row, Pdeminitializepdsc1 entity) { row.SetField("fiShipTo-visible", entity.fiShipToVisible); row.SetField("fiShipTo-sensitive", entity.fiShipToSensitive); row.SetField("btnLookupShipTo-visible", entity.btnLookupShipToVisible); row.SetField("btnLookupShipTo-sensitive", entity.btnLookupShipToSensitive); row.SetField("lblShipTo-visible", entity.lblShipToVisible); row.SetField("lblShipTo-sensitive", entity.lblShipToSensitive); row.SetField("fiWhse-visible", entity.fiWhseVisible); row.SetField("fiWhse-sensitive", entity.fiWhseSensitive); row.SetField("btnLookupWhse-visible", entity.btnLookupWhseVisible); row.SetField("btnLookupWhse-sensitive", entity.btnLookupWhseSensitive); row.SetField("lblCustNo-screen-value", entity.lblCustNoScreenValue); row.SetField("lblShipTo-screen-value", entity.lblShipToScreenValue); row.SetField("lblProd-screen-value", entity.lblProdScreenValue); row.SetField("fiProd-visible", entity.fiProdVisible); row.SetField("btnLookupProd-visible", entity.btnLookupProdVisible); row.SetField("lblProd-visible", entity.lblProdVisible); row.SetField("fiCustNo-visible", entity.fiCustNoVisible); row.SetField("btnLookupCustno-visible", entity.btnLookupCustnoVisible); row.SetField("lblCustNo-visible", entity.lblCustNoVisible); row.SetField("userfield", entity.userfield); }