Пример #1
0
        public static Pdeminitializepdsr BuildPdeminitializepdsrFromRow(DataRow row)
        {
            Pdeminitializepdsr entity = new Pdeminitializepdsr();

            entity.fiShipToVisible             = row.Field <bool>("fiShipTo-visible");
            entity.btnLookupShipToVisible      = row.Field <bool>("btnLookupShipTo-visible");
            entity.lblShipToVisible            = row.Field <bool>("lblShipTo-visible");
            entity.fiWhseVisible               = row.Field <bool>("fiWhse-visible");
            entity.btnLookupWhseVisible        = row.Field <bool>("btnLookupWhse-visible");
            entity.fiCustRebTypeVisible        = row.Field <bool>("fiCustRebType-visible");
            entity.btnLookupCustRebTypeVisible = row.Field <bool>("btnLookupCustRebType-visible");
            entity.lblVendNoScreenValue        = row.IsNull("lblVendNo-screen-value") ? string.Empty : row.Field <string>("lblVendNo-screen-value");
            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.fiRebateCdScreenValue       = row.IsNull("fiRebateCd-screen-value") ? string.Empty : row.Field <string>("fiRebateCd-screen-value");
            entity.fiTypeFldVisible            = row.Field <bool>("fiTypeFld-visible");
            entity.fiTypeFldLabel              = row.IsNull("fiTypeFld-label") ? string.Empty : row.Field <string>("fiTypeFld-label");
            entity.btnLookupTypeFldVisible     = row.Field <bool>("btnLookupTypeFld-visible");
            entity.fiRebSubTyVisible           = row.Field <bool>("fiRebSubTy-visible");
            entity.btnLookupRebSubTyVisible    = row.Field <bool>("btnLookupRebSubTy-visible");
            entity.fiProdVisible               = row.Field <bool>("fiProd-visible");
            entity.lblProdVisible              = row.Field <bool>("lblProd-visible");
            entity.btnLookupProdVisible        = row.Field <bool>("btnLookupProd-visible");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Пример #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdeminitializepdsr(ref DataRow row, Pdeminitializepdsr entity)
 {
     row.SetField("fiShipTo-visible", entity.fiShipToVisible);
     row.SetField("btnLookupShipTo-visible", entity.btnLookupShipToVisible);
     row.SetField("lblShipTo-visible", entity.lblShipToVisible);
     row.SetField("fiWhse-visible", entity.fiWhseVisible);
     row.SetField("btnLookupWhse-visible", entity.btnLookupWhseVisible);
     row.SetField("fiCustRebType-visible", entity.fiCustRebTypeVisible);
     row.SetField("btnLookupCustRebType-visible", entity.btnLookupCustRebTypeVisible);
     row.SetField("lblVendNo-screen-value", entity.lblVendNoScreenValue);
     row.SetField("lblCustNo-screen-value", entity.lblCustNoScreenValue);
     row.SetField("lblShipTo-screen-value", entity.lblShipToScreenValue);
     row.SetField("lblProd-screen-value", entity.lblProdScreenValue);
     row.SetField("fiRebateCd-screen-value", entity.fiRebateCdScreenValue);
     row.SetField("fiTypeFld-visible", entity.fiTypeFldVisible);
     row.SetField("fiTypeFld-label", entity.fiTypeFldLabel);
     row.SetField("btnLookupTypeFld-visible", entity.btnLookupTypeFldVisible);
     row.SetField("fiRebSubTy-visible", entity.fiRebSubTyVisible);
     row.SetField("btnLookupRebSubTy-visible", entity.btnLookupRebSubTyVisible);
     row.SetField("fiProd-visible", entity.fiProdVisible);
     row.SetField("lblProd-visible", entity.lblProdVisible);
     row.SetField("btnLookupProd-visible", entity.btnLookupProdVisible);
     row.SetField("userfield", entity.userfield);
 }