Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to put Calculated Fields
Message
 
À
30/01/2006 20:18:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Versions des environnements
Environment:
C# 2.0
Database:
MS SQL Server
Divers
Thread ID:
01091608
Message ID:
01091899
Vues:
13
>I am still quite confused about the data access objects, so I hope that someone with more experience can answer your question.

Well, I have it working. Here's what I did, if anyone is interested (which it doesn't seem like many <s>):
        public partial class dbSchedulesRow
        {
            /// <summary>
            /// Gets or Sets the Sunday value of the nDaysOfWeek column.
            /// </summary>
            public bool Sunday
            {
                get
                {
                    return ((this.nDayOfWeek & 2) == 2);
                }
                set
                {
                    if (value)
                    {
                        this.nDayOfWeek = (byte)(this.nDayOfWeek | 2);
                    }
                    else
                    {
                        this.nDayOfWeek = (byte)(this.nDayOfWeek & 252);
                    }
                }
            }

            /// <summary>
            /// Gets or Sets the Monday value of the nDaysOfWeek column.
            /// </summary>
            public bool Monday
            {
                get
                {
                    return ((this.nDayOfWeek & 4) == 4);
                }
                set
                {
                    if (value)
                    {
                        this.nDayOfWeek = (byte)(this.nDayOfWeek | 4);
                    }
                    else
                    {
                        this.nDayOfWeek = (byte)(this.nDayOfWeek & 250);
                    }
                }
            }
        }
I hope this can help someone else out there looking to do something similar.

Chad
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform