public Ansprechpartner(List <TextBox> listOfTextboxes, Salutation bezeichnung)
        {
            this.Anrede = Utilities.FirstLetterToUpperCase(bezeichnung.ToString().ToLower());

            foreach (TextBox textBox in listOfTextboxes)
            {
                this.GetType().GetProperty(Utilities.FirstLetterToUpperCase(textBox.Name)).SetValue(this, textBox.Text);
            }
        }
Пример #2
0
        //public Int64 SavePNRInformation(int AgentId,
        //                                    int ServiceProviderId,
        //                                    string Prefix,
        //                                    string FirstName,
        //                                    string MiddleName,
        //                                    string LastName,
        //                                    string Email,
        //                                    string ContactNumber,
        //                                    string GDSRefrenceNumber,
        //                                    int TicketStatusId,
        //                                    int CreatedBy,
        //                                    DateTime CreatedDate,
        //                                    DateTime? TTL,
        //                                    DateTime? ATLTTL
        //                                )
        //{
        //    var obj = new PNRs
        //    {
        //        AgentId = AgentId,
        //        ServiceProviderId = ServiceProviderId,
        //        Prefix = Prefix,
        //        FirstName = FirstName,
        //        MiddleName = MiddleName,
        //        LastName = LastName,
        //        EmailAddress = Email,
        //        ContactNumber = ContactNumber,
        //        GDSRefrenceNumber = GDSRefrenceNumber,
        //        TicketStatusId = TicketStatusId,
        //        CreatedBy = CreatedBy,
        //        CreatedDate = CreatedDate,
        //        TTL = TTL,
        //        ATLTTL = ATLTTL
        //    };

        //    entity.AddToPNRs(obj);
        //    entity.SaveChanges();

        //    return obj.PNRId;
        //}

        //public Int64 SavePNRSectorInformation(int platingCarrierId,
        //                                    Int64 PNRId,
        //                                    int DepartureCityId,
        //                                    DateTime DepartureDate,
        //                                    string DepartureTime,
        //                                    int DestinationCityId,
        //                                    DateTime ArriveDate,
        //                                    string ArriveTime,
        //                                    string StartTerminal,
        //                                    string EndTerminal,
        //                                    int CreatedBy,
        //                                    DateTime CreatedDate)
        //{
        //    var obj = new PNRSectors
        //    {
        //        PlatingCarrierId = platingCarrierId,
        //        PNRId = PNRId,
        //        DepartCityId = DepartureCityId,
        //        DepartDate = DepartureDate,
        //        DepartTime = TimeSpan.Parse(DepartureTime),
        //        DestinationCityId = DestinationCityId,
        //        ArriveDate = ArriveDate,
        //        ArriveTime = TimeSpan.Parse(ArriveTime),
        //        StartTerminal = StartTerminal,
        //        EndTerminal = EndTerminal,
        //        CreatedBy = CreatedBy,
        //        CreatedDate = CreatedDate
        //    };

        //    entity.AddToPNRSectors(obj);
        //    entity.SaveChanges();

        //    return obj.SectorId;
        //}

        //public void SavePNRSegmentInformation(Int64 PNRId,
        //                                        Int64 SectorId,
        //                                        int AirlineId,
        //                                        string FlightNumber,
        //                                        int DepartCityId,
        //                                        DateTime DepartDate,
        //                                        string DepartTime,
        //                                        int ArriveCityId,
        //                                        DateTime ArriveDate,
        //                                        string ArriveTime,
        //                                        string BIC,
        //                                        string StartTerminal,
        //                                        string EndTerminal,
        //                                        string AirlineRefrenceNumber,
        //                                        int CreatedBy,
        //                                        DateTime CreatedDate)
        //{
        //    var obj = new PNRSegments
        //    {
        //        PNRId = PNRId,
        //        SectorId = SectorId,
        //        AirlineId = AirlineId,
        //        FlightNumber = FlightNumber,
        //        DepartCityId = DepartCityId,
        //        DepartDate = DepartDate,
        //        DepartTime = TimeSpan.Parse(DepartTime),
        //        ArriveCityId = ArriveCityId,
        //        ArriveDate = ArriveDate,
        //        ArriveTime = TimeSpan.Parse(ArriveTime),
        //        BIC = BIC,
        //        StartTerminal = StartTerminal,
        //        EndTerminal = EndTerminal,
        //        AirlineRefrenceNumber = AirlineRefrenceNumber,
        //        CreatedBy = CreatedBy,
        //        CreatedDate = CreatedDate
        //    };

        //    entity.AddToPNRSegments(obj);
        //    entity.SaveChanges();
        //}

        //public Int64 SavepassangerInformation(Int64 PNRId,
        //                                   string Prefix,
        //                                   string FirstName,
        //                                   string MiddleName,
        //                                   string LastName,
        //                                   DateTime DOB,
        //                                   string PassportNumber,
        //                                   int? Nationality,
        //                                   DateTime? PassportExpDate,
        //                                   string MobileNumber,
        //                                   string EmailAddress,
        //                                   int PassengerTypeId,
        //                                   decimal Fare,
        //                                   double FSC,
        //                                   double MarkupAmount,
        //                                   double TaxAmount,
        //                                   double CommissionAmount,
        //                                   string TicketNumber,
        //                                   int TicketStatusId,
        //                                   string FrequentFlierNo,
        //                                   string SSR,
        //                                   string OtherSSRCode,
        //                                   string DOCS,
        //                                   string DOCO,
        //                                   string DOCA,
        //                                   string OSI,
        //                                   int? AirlineId,
        //                                   int CreatedBy,
        //                                   DateTime CreatedDate,
        //                                   decimal AgentMarkup)
        //{
        //    var obj = new Passengers
        //    {
        //        PNRId = PNRId,
        //        Prefix = Prefix,
        //        FirstName = FirstName,
        //        MiddleName = MiddleName,
        //        LastName = LastName,
        //        DOB = new DateTime(2011, 1, 12),//DOB, Change it ASAP
        //        PassportNumber = PassportNumber,
        //        PassportExpDate = PassportExpDate,
        //        Nationality = Nationality > 0 ? Nationality : null,
        //        MobileNumber = MobileNumber,
        //        EmailAddress = EmailAddress,
        //        PassengerTypeId = PassengerTypeId,
        //        Fare = (double)Fare,
        //        FSC = FSC,
        //        MarkupAmount = MarkupAmount,
        //        TaxAmount = TaxAmount,
        //        CommissionAmount = CommissionAmount,
        //        TicketNumber = TicketNumber,
        //        TicketStatusId = TicketStatusId,
        //        FrequentFlierNo = FrequentFlierNo != "" ? FrequentFlierNo : null,
        //        SSR = SSR != "Select" ? SSR : null,
        //        OtherSSRCode = OtherSSRCode != "Select" ? OtherSSRCode : null,
        //        DOCS = DOCS,
        //        DOCO = DOCO,
        //        DOCA = DOCA,
        //        OSI = OSI,
        //        AirlineId = AirlineId > 0 ? AirlineId : null,
        //        CreatedBy = CreatedBy,
        //        CreatedDate = CreatedDate,
        //        ServiceCharge = (double)AgentMarkup

        //    };

        //    entity.AddToPassengers(obj);
        //    entity.SaveChanges();
        //    return obj.PassengerId;
        //}


        //public void SaveAir_Taxes(Int64 passangerId, string taxName, decimal taxAmount)
        //{
        //    var obj = new Air_Taxes
        //    {
        //        PassengerId = passangerId,
        //        TaxName = taxName,
        //        TaxAmount = (double)taxAmount
        //    };

        //    entity.AddToAir_Taxes(obj);
        //    entity.SaveChanges();
        //}

        //public IQueryable<GetPNRsListByAgentId_Result> GetPNRsListByAgentId(int TicketStatusId, int AgentId)
        //{
        //    return entity.GetPNRsListByAgentId(TicketStatusId, AgentId).AsQueryable();
        //}



        public Int64 SavePNRInformation(int AgentId,
                                        int ServiceProviderId,
                                        Salutation Prefix,
                                        string FirstName,
                                        string MiddleName,
                                        string LastName,
                                        string Email,
                                        string ContactNumber,
                                        string GDSRefrenceNumber,
                                        int TicketStatusId,
                                        int CreatedBy,
                                        DateTime CreatedDate,
                                        DateTime?TTL,
                                        DateTime?ATLTTL,
                                        string pcc
                                        )
        {
            var obj = new PNRs
            {
                AgentId           = AgentId,
                ServiceProviderId = ServiceProviderId,
                Prefix            = Prefix.ToString(),
                FirstName         = FirstName,
                MiddleName        = MiddleName,
                LastName          = LastName,
                EmailAddress      = Email,
                ContactNumber     = ContactNumber,
                GDSRefrenceNumber = GDSRefrenceNumber,
                TicketStatusId    = TicketStatusId,
                CreatedBy         = CreatedBy,
                CreatedDate       = CreatedDate,
                TTL    = TTL,
                ATLTTL = ATLTTL,
                PCC    = pcc
            };

            entity.AddToPNRs(obj);
            entity.SaveChanges();

            return(obj.PNRId);
        }
Пример #3
0
        public Int64 SavepassangerInformation(Int64 PNRId,
                                              Salutation Prefix,
                                              string FirstName,
                                              string MiddleName,
                                              string LastName,
                                              DateTime?DOB,
                                              string PassportNumber,
                                              int?Nationality,
                                              DateTime?PassportExpDate,
                                              string MobileNumber,
                                              string EmailAddress,
                                              int PassengerTypeId,
                                              decimal Fare,
                                              double FSC,
                                              double MarkupAmount,
                                              double TaxAmount,
                                              double CommissionAmount,
                                              double DiscountAmount,
                                              string TicketNumber,
                                              int TicketStatusId,
                                              string FrequentFlierNo,
                                              string SSR,
                                              string OtherSSRCode,
                                              string DOCS,
                                              string DOCO,
                                              string DOCA,
                                              string OSI,
                                              int?AirlineId,
                                              int CreatedBy,
                                              DateTime CreatedDate,
                                              decimal?AgentMarkup,
                                              CurrencyType currency)
        {
            var obj = new Passengers
            {
                PNRId            = PNRId,
                Prefix           = Prefix.ToString(),
                FirstName        = FirstName,
                MiddleName       = MiddleName,
                LastName         = LastName,
                DOB              = DOB,
                PassportNumber   = PassportNumber,
                PassportExpDate  = PassportExpDate,
                Nationality      = Nationality > 0 ? Nationality : null,
                MobileNumber     = MobileNumber,
                EmailAddress     = EmailAddress,
                PassengerTypeId  = PassengerTypeId,
                Fare             = (double)Fare,
                FSC              = FSC,
                MarkupAmount     = MarkupAmount,
                TaxAmount        = TaxAmount,
                CommissionAmount = CommissionAmount,
                DiscountAmount   = DiscountAmount,
                TicketNumber     = TicketNumber,
                TicketStatusId   = TicketStatusId,
                FrequentFlierNo  = FrequentFlierNo != "" ? FrequentFlierNo : null,
                SSR              = SSR != "Select" ? SSR : null,
                OtherSSRCode     = OtherSSRCode != "Select" ? OtherSSRCode : null,
                DOCS             = DOCS,
                DOCO             = DOCO,
                DOCA             = DOCA,
                OSI              = OSI,
                AirlineId        = AirlineId > 0 ? AirlineId : null,
                CreatedBy        = CreatedBy,
                CreatedDate      = CreatedDate,
                ServiceCharge    = (double)AgentMarkup,
                Currency         = currency.ToString()
            };

            entity.AddToPassengers(obj);
            entity.SaveChanges();
            return(obj.PassengerId);
        }