/// <summary>
        ///     Indicates whether the current <see cref="BillOfMaterialRecord" /> instance is equal to another <see cref="BillOfMaterialRecord" /> instance.
        /// </summary>
        /// <param name="that">
        ///     The <see cref="BillOfMaterialRecord" /> instance to be compared against this instance.
        /// </param>
        /// <returns>
        ///     True if both instances are considered equal; otherwise, false.
        /// </returns>
        public Boolean Equals(BillOfMaterialRecord that)
        {
            Boolean result = true;

            result = result && (this.Id.TrimOrNullify() == that.Id.TrimOrNullify());
            result = result && (this.Lock.TrimOrNullify() == that.Lock.TrimOrNullify());
            result = result && (this.ParentId.TrimOrNullify() == that.ParentId.TrimOrNullify());
            result = result && (this.SyllabusId.TrimOrNullify() == that.SyllabusId.TrimOrNullify());
            result = result && (this.LocationId.TrimOrNullify() == that.LocationId.TrimOrNullify());
            result = result && (this.ResourceId.TrimOrNullify() == that.ResourceId.TrimOrNullify());
            result = result && (this.Type.TrimOrNullify() == that.Type.TrimOrNullify());
            result = result && (this.Real == that.Real);
            result = result && (this.Session == that.Session);
            result = result && (this.Element == that.Element);
            result = result && (this.StartDay == that.StartDay);
            result = result && (this.EndDay == that.EndDay);
            result = result && (this.StartTime == that.StartTime);
            result = result && (this.EndTime == that.EndTime);
            result = result && (this.Quantity == that.Quantity);
            result = result && (this.Mandatory == that.Mandatory);
            result = result && (this.Stream.TrimOrNullify() == that.Stream.TrimOrNullify());
            result = result && (this.Chargeable == that.Chargeable);
            result = result && (this.InvoicePrint == that.InvoicePrint);
            result = result && (this.ActType.TrimOrNullify() == that.ActType.TrimOrNullify());
            result = result && (this.ShowSales == that.ShowSales);
            result = result && (this.ActNote.TrimOrNullify() == that.ActNote.TrimOrNullify());
            result = result && (this.Subject.TrimOrNullify() == that.Subject.TrimOrNullify());
            result = result && (this.ValToRev == that.ValToRev);
            result = result && (this.MainSession == that.MainSession);
            result = result && (this.TypeSub.TrimOrNullify() == that.TypeSub.TrimOrNullify());
            result = result && (this.RoomLayout == that.RoomLayout);
            result = result && (this.IncInBudget == that.IncInBudget);
            result = result && (this.TeachHrs == that.TeachHrs);
            result = result && (this.StudWks == that.StudWks);
            result = result && (this.NotinuseStart == that.NotinuseStart);
            result = result && (this.NotinuseEnd == that.NotinuseEnd);
            result = result && (this.ActSessionName.TrimOrNullify() == that.ActSessionName.TrimOrNullify());
            result = result && (this.NoSlots == that.NoSlots);
            result = result && (this.StartSlot == that.StartSlot);
            result = result && (this.Predeliv == that.Predeliv);
            result = result && (this.Code.TrimOrNullify() == that.Code.TrimOrNullify());
            result = result && (this.ProvPack.TrimOrNullify() == that.ProvPack.TrimOrNullify());
            result = result && (this.ConfPack.TrimOrNullify() == that.ConfPack.TrimOrNullify());
            result = result && (this.JoiningPack.TrimOrNullify() == that.JoiningPack.TrimOrNullify());
            result = result && (this.PostPack.TrimOrNullify() == that.PostPack.TrimOrNullify());
            result = result && (this.ProvSendToBook == that.ProvSendToBook);
            result = result && (this.ProvSendToDel == that.ProvSendToDel);
            result = result && (this.ConfSendToBook == that.ConfSendToBook);
            result = result && (this.ConfSendToDel == that.ConfSendToDel);
            result = result && (this.JoiningSendToBook == that.JoiningSendToBook);
            result = result && (this.JoiningSendToDel == that.JoiningSendToDel);
            result = result && (this.PostSendToBook == that.PostSendToBook);
            result = result && (this.PostSendToDel == that.PostSendToDel);
            result = result && (this.ProductSelectGroup == that.ProductSelectGroup);
            result = result && (this.ActRevenueSplit == that.ActRevenueSplit);
            result = result && (this.ActHoursSplit == that.ActHoursSplit);
            result = result && (this.ExpOccupancy == that.ExpOccupancy);
            result = result && (this.ShowAttLog == that.ShowAttLog);
            return(result);
        }
Esempio n. 2
0
        public override void Create(BillOfMaterialRecord record)
        {
            DbCommand command = this.Provider.GetStoredProcedure("spInsertUpdateBillOfMaterial");

            this.MapParameterIn(command, "@PA_USER_LOGIN_ID", "dev");
            this.MapParametersIn(command, record, true);
            this.Execute(command);
            this.MapParametersOut(command, record);
        }
        /// <summary>
        ///     Creates a new <see cref="BillOfMaterialRecord" /> object instance that is a shallow-copy of the current object instance.
        /// </summary>
        /// <returns>
        ///     The shallow-copy of the current <see cref="BillOfMaterialRecord" /> object instance.
        /// </returns>
        public BillOfMaterialRecord Clone()
        {
            BillOfMaterialRecord record = new BillOfMaterialRecord();

            record.Id                 = this.Id;
            record.Lock               = this.Lock;
            record.AddDate            = this.AddDate;
            record.AddBy              = this.AddBy;
            record.ModDate            = this.ModDate;
            record.ModBy              = this.ModBy;
            record.RcvDate            = this.RcvDate;
            record.RcvFrom            = this.RcvFrom;
            record.ParentId           = this.ParentId;
            record.SyllabusId         = this.SyllabusId;
            record.LocationId         = this.LocationId;
            record.ResourceId         = this.ResourceId;
            record.Type               = this.Type;
            record.Real               = this.Real;
            record.Session            = this.Session;
            record.Element            = this.Element;
            record.StartDay           = this.StartDay;
            record.EndDay             = this.EndDay;
            record.StartTime          = this.StartTime;
            record.EndTime            = this.EndTime;
            record.Quantity           = this.Quantity;
            record.Mandatory          = this.Mandatory;
            record.Stream             = this.Stream;
            record.Chargeable         = this.Chargeable;
            record.InvoicePrint       = this.InvoicePrint;
            record.ActType            = this.ActType;
            record.ShowSales          = this.ShowSales;
            record.ActNote            = this.ActNote;
            record.Subject            = this.Subject;
            record.ValToRev           = this.ValToRev;
            record.MainSession        = this.MainSession;
            record.TypeSub            = this.TypeSub;
            record.RoomLayout         = this.RoomLayout;
            record.IncInBudget        = this.IncInBudget;
            record.TeachHrs           = this.TeachHrs;
            record.StudWks            = this.StudWks;
            record.NotinuseStart      = this.NotinuseStart;
            record.NotinuseEnd        = this.NotinuseEnd;
            record.ActSessionName     = this.ActSessionName;
            record.NoSlots            = this.NoSlots;
            record.StartSlot          = this.StartSlot;
            record.Predeliv           = this.Predeliv;
            record.Code               = this.Code;
            record.ProvPack           = this.ProvPack;
            record.ConfPack           = this.ConfPack;
            record.JoiningPack        = this.JoiningPack;
            record.PostPack           = this.PostPack;
            record.ProvSendToBook     = this.ProvSendToBook;
            record.ProvSendToDel      = this.ProvSendToDel;
            record.ConfSendToBook     = this.ConfSendToBook;
            record.ConfSendToDel      = this.ConfSendToDel;
            record.JoiningSendToBook  = this.JoiningSendToBook;
            record.JoiningSendToDel   = this.JoiningSendToDel;
            record.PostSendToBook     = this.PostSendToBook;
            record.PostSendToDel      = this.PostSendToDel;
            record.ProductSelectGroup = this.ProductSelectGroup;
            record.ActRevenueSplit    = this.ActRevenueSplit;
            record.ActHoursSplit      = this.ActHoursSplit;
            record.ExpOccupancy       = this.ExpOccupancy;
            record.ShowAttLog         = this.ShowAttLog;
            return(record);
        }