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

            result = result && (this.Id.TrimOrNullify() == that.Id.TrimOrNullify());
            result = result && (this.ActId.TrimOrNullify() == that.ActId.TrimOrNullify());
            result = result && (this.RoleId.TrimOrNullify() == that.RoleId.TrimOrNullify());
            result = result && (this.Hours == that.Hours);
            result = result && (this.Date == that.Date);
            result = result && (this.Type.TrimOrNullify() == that.Type.TrimOrNullify());
            result = result && (this.CostCode.TrimOrNullify() == that.CostCode.TrimOrNullify());
            result = result && (this.Desc.TrimOrNullify() == that.Desc.TrimOrNullify());
            result = result && (this.Lock.TrimOrNullify() == that.Lock.TrimOrNullify());
            result = result && (this.OrgId.TrimOrNullify() == that.OrgId.TrimOrNullify());
            result = result && (this.ProjId.TrimOrNullify() == that.ProjId.TrimOrNullify());
            result = result && (this.TraHours == that.TraHours);
            result = result && (this.HouCharge == that.HouCharge);
            result = result && (this.TraCharge == that.TraCharge);
            result = result && (this.Mileage == that.Mileage);
            result = result && (this.Expenses == that.Expenses);
            result = result && (this.BatId.TrimOrNullify() == that.BatId.TrimOrNullify());
            result = result && (this.CstAc == that.CstAc);
            result = result && (this.UntType.TrimOrNullify() == that.UntType.TrimOrNullify());
            result = result && (this.TimType.TrimOrNullify() == that.TimType.TrimOrNullify());
            result = result && (this.TrainSyType == that.TrainSyType);
            return(result);
        }
        /// <summary>
        ///     Creates a new <see cref="TimeSpentRecord" /> object instance that is a shallow-copy of the current object instance.
        /// </summary>
        /// <returns>
        ///     The shallow-copy of the current <see cref="TimeSpentRecord" /> object instance.
        /// </returns>
        public TimeSpentRecord Clone()
        {
            TimeSpentRecord record = new TimeSpentRecord();

            record.Id          = this.Id;
            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.ActId       = this.ActId;
            record.RoleId      = this.RoleId;
            record.Hours       = this.Hours;
            record.Date        = this.Date;
            record.Type        = this.Type;
            record.CostCode    = this.CostCode;
            record.Desc        = this.Desc;
            record.Lock        = this.Lock;
            record.OrgId       = this.OrgId;
            record.ProjId      = this.ProjId;
            record.TraHours    = this.TraHours;
            record.HouCharge   = this.HouCharge;
            record.TraCharge   = this.TraCharge;
            record.Mileage     = this.Mileage;
            record.Expenses    = this.Expenses;
            record.BatId       = this.BatId;
            record.CstAc       = this.CstAc;
            record.UntType     = this.UntType;
            record.TimType     = this.TimType;
            record.TrainSyType = this.TrainSyType;
            return(record);
        }
        public override void Modify(TimeSpentRecord record)
        {
            DbCommand command = this.Provider.GetStoredProcedure("spInsertUpdateTimeSpent");

            this.MapParameterIn(command, "@PA_USER_LOGIN_ID", UserId);
            this.MapParametersIn(command, record, true);
            this.Execute(command);
            this.MapParametersOut(command, record);
        }