Exemple #1
0
        public override void Modify(InvheaderRecord record)
        {
            DbCommand command = this.Provider.GetStoredProcedure("spInsertUpdateInvHeader");

            this.MapParameterIn(command, "@PA_USER_LOGIN_ID", "dev");
            if (record.AccId == null)
            {
                record.AccId     = string.Empty;
                record.AccStatus = string.Empty;
            }
            if (record.OrgId == null)
            {
                record.OrgId         = string.Empty;
                record.InvOrgName    = string.Empty;
                record.Add           = string.Empty;
                record.AddMailstring = string.Empty;
            }
            if (record.ProleId == null)
            {
                record.ProleId  = string.Empty;
                record.PersonId = string.Empty;
            }
            this.MapParametersIn(command, record, true);
            this.Execute(command);
            this.MapParametersOut(command, record);
        }
Exemple #2
0
        public override void Create(InvheaderRecord record)
        {
            DbCommand command = this.Provider.GetStoredProcedure("spInsertUpdateInvHeader");

            this.MapParameterIn(command, "@PA_USER_LOGIN_ID", "dev");
            this.MapParametersIn(command, record, true);
            this.Execute(command);
            this.MapParametersOut(command, record);
        }
Exemple #3
0
        public void CreditInvoice(InvheaderRecord record, string invId, string userloginId)
        {
            DbCommand command = this.Provider.GetStoredProcedure("spInsertUpdateInvHeader");

            this.MapParameterIn(command, "@PA_USER_LOGIN_ID", userloginId);
            this.MapParameterIn(command, "@PA_INV_CREDIT_NTE_REF", record.Id);
            this.MapParameterIn(command, "@PA_CREDIT_INVOICE", 1);
            this.Execute(command);
            this.MapParametersOut(command, record);
        }
Exemple #4
0
        public void RollbackInvoice(InvheaderRecord record)
        {
            DbCommand command = this.Provider.GetStoredProcedure("spInsertUpdateInvHeader");

            this.MapParameterIn(command, "@PA_USER_LOGIN_ID", "dev");
            this.MapParameterIn(command, "@PA_INV_CREDIT_NTE_REF", record.Id);
            this.MapParameterIn(command, "@PA_CREDIT_INVOICE", "1");
            this.MapParameterIn(command, "@PA_INV_MEP_ID", record.MepId);
            this.Execute(command);
            this.MapParametersOut(command, record);
        }
        /// <summary>
        ///     Indicates whether the current <see cref="InvheaderRecord" /> instance is equal to another <see cref="InvheaderRecord" /> instance.
        /// </summary>
        /// <param name="that">
        ///     The <see cref="InvheaderRecord" /> instance to be compared against this instance.
        /// </param>
        /// <returns>
        ///     True if both instances are considered equal; otherwise, false.
        /// </returns>
        public Boolean Equals(InvheaderRecord that)
        {
            Boolean result = true;

            result = result && (this.Id.TrimOrNullify() == that.Id.TrimOrNullify());
            result = result && (this.Lock.TrimOrNullify() == that.Lock.TrimOrNullify());
            result = result && (this.BookId.TrimOrNullify() == that.BookId.TrimOrNullify());
            result = result && (this.OrgId.TrimOrNullify() == that.OrgId.TrimOrNullify());
            result = result && (this.PersonId.TrimOrNullify() == that.PersonId.TrimOrNullify());
            result = result && (this.SalesmanId.TrimOrNullify() == that.SalesmanId.TrimOrNullify());
            result = result && (this.DelvryRef.TrimOrNullify() == that.DelvryRef.TrimOrNullify());
            result = result && (this.Carrier.TrimOrNullify() == that.Carrier.TrimOrNullify());
            result = result && (this.DelvryDate == that.DelvryDate);
            result = result && (this.OrderDate == that.OrderDate);
            result = result && (this.CustOrderNo.TrimOrNullify() == that.CustOrderNo.TrimOrNullify());
            result = result && (this.DelvryAdd.TrimOrNullify() == that.DelvryAdd.TrimOrNullify());
            result = result && (this.Ref.TrimOrNullify() == that.Ref.TrimOrNullify());
            result = result && (this.Date == that.Date);
            result = result && (this.Status == that.Status);
            result = result && (this.Add.TrimOrNullify() == that.Add.TrimOrNullify());
            result = result && (this.CreditNteRef.TrimOrNullify() == that.CreditNteRef.TrimOrNullify());
            result = result && (this.CreditNteDte == that.CreditNteDte);
            result = result && (this.CreditNteSta == that.CreditNteSta);
            result = result && (this.Notes.TrimOrNullify() == that.Notes.TrimOrNullify());
            result = result && (this.NetTotal == that.NetTotal);
            result = result && (this.VatTotal == that.VatTotal);
            result = result && (this.GrossTotal == that.GrossTotal);
            result = result && (this.NetTotalBc == that.NetTotalBc);
            result = result && (this.VatTotalBc == that.VatTotalBc);
            result = result && (this.GrossTotalBc == that.GrossTotalBc);
            result = result && (this.CurrencyType.TrimOrNullify() == that.CurrencyType.TrimOrNullify());
            result = result && (this.Type.TrimOrNullify() == that.Type.TrimOrNullify());
            result = result && (this.AccountType.TrimOrNullify() == that.AccountType.TrimOrNullify());
            result = result && (this.InRespectOf.TrimOrNullify() == that.InRespectOf.TrimOrNullify());
            result = result && (this.Footer.TrimOrNullify() == that.Footer.TrimOrNullify());
            result = result && (this.CreditPercent == that.CreditPercent);
            result = result && (this.CourseId.TrimOrNullify() == that.CourseId.TrimOrNullify());
            result = result && (this.CourseName.TrimOrNullify() == that.CourseName.TrimOrNullify());
            result = result && (this.CorsStrtDte == that.CorsStrtDte);
            result = result && (this.CourseEndDte == that.CourseEndDte);
            result = result && (this.CorsCostCode.TrimOrNullify() == that.CorsCostCode.TrimOrNullify());
            result = result && (this.BookRef.TrimOrNullify() == that.BookRef.TrimOrNullify());
            result = result && (this.Booker.TrimOrNullify() == that.Booker.TrimOrNullify());
            result = result && (this.BookOrgName.TrimOrNullify() == that.BookOrgName.TrimOrNullify());
            result = result && (this.AddMailstring.TrimOrNullify() == that.AddMailstring.TrimOrNullify());
            result = result && (this.BkOrgCustAc.TrimOrNullify() == that.BkOrgCustAc.TrimOrNullify());
            result = result && (this.VenueOrgName.TrimOrNullify() == that.VenueOrgName.TrimOrNullify());
            result = result && (this.Penalty == that.Penalty);
            result = result && (this.BookOrgRegi.TrimOrNullify() == that.BookOrgRegi.TrimOrNullify());
            result = result && (this.PrintBooker == that.PrintBooker);
            result = result && (this.InvOrgName.TrimOrNullify() == that.InvOrgName.TrimOrNullify());
            result = result && (this.ExtraNotes.TrimOrNullify() == that.ExtraNotes.TrimOrNullify());
            result = result && (this.BatId.TrimOrNullify() == that.BatId.TrimOrNullify());
            result = result && (this.SalesId.TrimOrNullify() == that.SalesId.TrimOrNullify());
            result = result && (this.Text.TrimOrNullify() == that.Text.TrimOrNullify());
            result = result && (this.PayDate == that.PayDate);
            result = result && (this.PayStatus.TrimOrNullify() == that.PayStatus.TrimOrNullify());
            result = result && (this.ProjId.TrimOrNullify() == that.ProjId.TrimOrNullify());
            result = result && (this.CcardId.TrimOrNullify() == that.CcardId.TrimOrNullify());
            result = result && (this.Recvd == that.Recvd);
            result = result && (this.RecvdBc == that.RecvdBc);
            result = result && (this.Period.TrimOrNullify() == that.Period.TrimOrNullify());
            result = result && (this.DueDate == that.DueDate);
            result = result && (this.UnpaidVal == that.UnpaidVal);
            result = result && (this.UnpaidValBc == that.UnpaidValBc);
            result = result && (this.NotesId.TrimOrNullify() == that.NotesId.TrimOrNullify());
            result = result && (this.CrystalRpt.TrimOrNullify() == that.CrystalRpt.TrimOrNullify());
            result = result && (this.AppBy.TrimOrNullify() == that.AppBy.TrimOrNullify());
            result = result && (this.AppDate == that.AppDate);
            result = result && (this.ForAttnOf.TrimOrNullify() == that.ForAttnOf.TrimOrNullify());
            result = result && (this.Printed == that.Printed);
            result = result && (this.CurrRateBc == that.CurrRateBc);
            result = result && (this.CurrRateBc2 == that.CurrRateBc2);
            result = result && (this.SelcoSpId.TrimOrNullify() == that.SelcoSpId.TrimOrNullify());
            result = result && (this.MepId.TrimOrNullify() == that.MepId.TrimOrNullify());
            result = result && (this.LtId.TrimOrNullify() == that.LtId.TrimOrNullify());
            result = result && (this.Userchar1.TrimOrNullify() == that.Userchar1.TrimOrNullify());
            result = result && (this.AccStatus.TrimOrNullify() == that.AccStatus.TrimOrNullify());
            result = result && (this.AccRef.TrimOrNullify() == that.AccRef.TrimOrNullify());
            result = result && (this.AccNotes.TrimOrNullify() == that.AccNotes.TrimOrNullify());
            result = result && (this.AccModBy.TrimOrNullify() == that.AccModBy.TrimOrNullify());
            result = result && (this.AccModDate == that.AccModDate);
            result = result && (this.NetTotalBc2 == that.NetTotalBc2);
            result = result && (this.VatTotalBc2 == that.VatTotalBc2);
            result = result && (this.GrossTotalBc2 == that.GrossTotalBc2);
            result = result && (this.UnpaidTotalBc2 == that.UnpaidTotalBc2);
            result = result && (this.PrintBatId.TrimOrNullify() == that.PrintBatId.TrimOrNullify());
            result = result && (this.PersonPhone.TrimOrNullify() == that.PersonPhone.TrimOrNullify());
            result = result && (this.AccId.TrimOrNullify() == that.AccId.TrimOrNullify());
            result = result && (this.BatError == that.BatError);
            result = result && (this.SalesProleId.TrimOrNullify() == that.SalesProleId.TrimOrNullify());
            result = result && (this.ProleId.TrimOrNullify() == that.ProleId.TrimOrNullify());
            return(result);
        }
        /// <summary>
        ///     Creates a new <see cref="InvheaderRecord" /> object instance that is a shallow-copy of the current object instance.
        /// </summary>
        /// <returns>
        ///     The shallow-copy of the current <see cref="InvheaderRecord" /> object instance.
        /// </returns>
        public InvheaderRecord Clone()
        {
            InvheaderRecord record = new InvheaderRecord();

            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.BookId         = this.BookId;
            record.OrgId          = this.OrgId;
            record.PersonId       = this.PersonId;
            record.SalesmanId     = this.SalesmanId;
            record.DelvryRef      = this.DelvryRef;
            record.Carrier        = this.Carrier;
            record.DelvryDate     = this.DelvryDate;
            record.OrderDate      = this.OrderDate;
            record.CustOrderNo    = this.CustOrderNo;
            record.DelvryAdd      = this.DelvryAdd;
            record.Ref            = this.Ref;
            record.Date           = this.Date;
            record.Status         = this.Status;
            record.Add            = this.Add;
            record.CreditNteRef   = this.CreditNteRef;
            record.CreditNteDte   = this.CreditNteDte;
            record.CreditNteSta   = this.CreditNteSta;
            record.Notes          = this.Notes;
            record.NetTotal       = this.NetTotal;
            record.VatTotal       = this.VatTotal;
            record.GrossTotal     = this.GrossTotal;
            record.NetTotalBc     = this.NetTotalBc;
            record.VatTotalBc     = this.VatTotalBc;
            record.GrossTotalBc   = this.GrossTotalBc;
            record.CurrencyType   = this.CurrencyType;
            record.Type           = this.Type;
            record.AccountType    = this.AccountType;
            record.InRespectOf    = this.InRespectOf;
            record.Footer         = this.Footer;
            record.CreditPercent  = this.CreditPercent;
            record.CourseId       = this.CourseId;
            record.CourseName     = this.CourseName;
            record.CorsStrtDte    = this.CorsStrtDte;
            record.CourseEndDte   = this.CourseEndDte;
            record.CorsCostCode   = this.CorsCostCode;
            record.BookRef        = this.BookRef;
            record.Booker         = this.Booker;
            record.BookOrgName    = this.BookOrgName;
            record.AddMailstring  = this.AddMailstring;
            record.BkOrgCustAc    = this.BkOrgCustAc;
            record.VenueOrgName   = this.VenueOrgName;
            record.Penalty        = this.Penalty;
            record.BookOrgRegi    = this.BookOrgRegi;
            record.PrintBooker    = this.PrintBooker;
            record.InvOrgName     = this.InvOrgName;
            record.ExtraNotes     = this.ExtraNotes;
            record.BatId          = this.BatId;
            record.SalesId        = this.SalesId;
            record.Text           = this.Text;
            record.PayDate        = this.PayDate;
            record.PayStatus      = this.PayStatus;
            record.ProjId         = this.ProjId;
            record.CcardId        = this.CcardId;
            record.Recvd          = this.Recvd;
            record.RecvdBc        = this.RecvdBc;
            record.Period         = this.Period;
            record.DueDate        = this.DueDate;
            record.UnpaidVal      = this.UnpaidVal;
            record.UnpaidValBc    = this.UnpaidValBc;
            record.NotesId        = this.NotesId;
            record.CrystalRpt     = this.CrystalRpt;
            record.AppBy          = this.AppBy;
            record.AppDate        = this.AppDate;
            record.ForAttnOf      = this.ForAttnOf;
            record.Printed        = this.Printed;
            record.CurrRateBc     = this.CurrRateBc;
            record.CurrRateBc2    = this.CurrRateBc2;
            record.SelcoSpId      = this.SelcoSpId;
            record.MepId          = this.MepId;
            record.LtId           = this.LtId;
            record.Userchar1      = this.Userchar1;
            record.AccStatus      = this.AccStatus;
            record.AccRef         = this.AccRef;
            record.AccNotes       = this.AccNotes;
            record.AccModBy       = this.AccModBy;
            record.AccModDate     = this.AccModDate;
            record.NetTotalBc2    = this.NetTotalBc2;
            record.VatTotalBc2    = this.VatTotalBc2;
            record.GrossTotalBc2  = this.GrossTotalBc2;
            record.UnpaidTotalBc2 = this.UnpaidTotalBc2;
            record.PrintBatId     = this.PrintBatId;
            record.PersonPhone    = this.PersonPhone;
            record.AccId          = this.AccId;
            record.BatError       = this.BatError;
            record.SalesProleId   = this.SalesProleId;
            record.ProleId        = this.ProleId;
            return(record);
        }