Ejemplo n.º 1
0
        //**Added by rahul on 04/03/2020
        //*This is for getting rates for property Accommodation for API
        public List <CLayer.Rates> GetAccommodationRatesForAPI(string AccIds, DateTime checkIn, DateTime checkOut, int noOfDays, CLayer.Role.Roles rateType, CLayer.Role.Roles defaultType)
        {
            List <DataPlug.Parameter> param = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pAccs", DataPlug.DataType._Varchar, AccIds));
            param.Add(Connection.GetParameter("pCheckIn", DataPlug.DataType._Date, checkIn));
            param.Add(Connection.GetParameter("pCheckOut", DataPlug.DataType._Date, checkOut));
            param.Add(Connection.GetParameter("pRateType", DataPlug.DataType._Int, rateType));
            param.Add(Connection.GetParameter("pDefaultRateType", DataPlug.DataType._Int, (int)defaultType));
            param.Add(Connection.GetParameter("pBookingDayCount", DataPlug.DataType._Int, (int)noOfDays));
            DataTable dt = Connection.GetTable("accommodation_GetAvailabilityAndRateForAPI", param);

            List <CLayer.Rates> result = new List <CLayer.Rates>();

            CLayer.Rates rt;
            foreach (DataRow dr in dt.Rows)
            {
                rt = new CLayer.Rates();
                rt.AccommodationId      = Connection.ToLong(dr["AccommodationId"]);
                rt.Amount               = Connection.ToDecimal(dr["Amount"]);
                rt.GuestRate            = Connection.ToDecimal(dr["GuestRate"]);
                rt.StartDate            = Connection.ToDate(dr["startdate"]);
                rt.EndDate              = Connection.ToDate(dr["enddate"]);
                rt.RateType             = Connection.ToInteger(dr["AType"]);
                rt.NoofAcc              = Connection.ToInteger(dr["noofacc"]);
                rt.PurchaseRateAfterTax = Connection.ToDecimal(dr["DailyRate"]);
                result.Add(rt);
            }
            return(result);
        }
Ejemplo n.º 2
0
        public List <CLayer.User> GetAllSalespersonandRegionalmanager()
        {
            List <CLayer.User>        users = new List <CLayer.User>();
            List <DataPlug.Parameter> param = new List <DataPlug.Parameter>();
            DataTable dt = Connection.GetTable("user_GetAllSalespersonandRegionalmanager", param);

            foreach (DataRow dr in dt.Rows)
            {
                users.Add(new CLayer.User()
                {
                    UserId      = Connection.ToLong(dr["UserId"]),
                    Salutation  = Connection.ToString(dr["Salutation"]),
                    Name        = Connection.ToString(dr["FirstName"]) + " " + Connection.ToString(dr["LastName"]),
                    FirstName   = Connection.ToString(dr["FirstName"]),
                    LastName    = Connection.ToString(dr["LastName"]),
                    DateOfBirth = Connection.ToDate(dr["DateOfBirth"]),
                    Sex         = Connection.ToInteger(dr["Sex"]),
                    UserType    = Connection.ToString(dr["UserType"]),
                    Status      = Connection.ToInteger(dr["Status"]),
                    Email       = Connection.ToString(dr["Email"]),
                    CreatedDate = Connection.ToDate(dr["CreatedDate"]),
                    DeletedDate = Connection.ToDate(dr["DeletedDate"]),
                    LastLoginOn = Connection.ToDate(dr["LastLoginOn"])
                });
            }

            return(users);
        }
Ejemplo n.º 3
0
        public CLayer.Recommended GetData(long propertyId, long ManageFor)
        {
            CLayer.Recommended        result = null;
            List <DataPlug.Parameter> param  = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pPropertyId", DataPlug.DataType._BigInt, propertyId));
            param.Add(Connection.GetParameter("pManageFor", DataPlug.DataType._BigInt, ManageFor));
            DataTable dt = Connection.GetTable("recommended_Get", param);

            if (dt.Rows.Count > 0)
            {
                result = new CLayer.Recommended()
                {
                    StartDate   = Connection.ToDate(dt.Rows[0]["StartDate"]),
                    EndDate     = Connection.ToDate(dt.Rows[0]["EndDate"]),
                    Status      = Connection.ToInteger(dt.Rows[0]["Status"]),
                    Order       = Connection.ToInteger(dt.Rows[0]["Order"]),
                    UpdatedBy   = Connection.ToLong(dt.Rows[0]["UpdatedBy"]),
                    UpdatedDate = Connection.ToDate(dt.Rows[0]["UpdatedDate"]),
                    Title       = Connection.ToString(dt.Rows[0]["Title"]),
                    ManageFor   = Connection.ToInteger(dt.Rows[0]["ManageFor"])
                };
            }

            return(result);
        }
Ejemplo n.º 4
0
        public List <CLayer.Recommended> GetAllByManage(long ManageFor)
        {
            List <CLayer.Recommended> result = new List <CLayer.Recommended>();
            List <DataPlug.Parameter> param  = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pManageFor", DataPlug.DataType._BigInt, ManageFor));
            DataTable dt = Connection.GetTable("recommendedbymanage_GetAll", param);

            CLayer.Recommended temp;
            foreach (DataRow dr in dt.Rows)
            {
                temp               = new CLayer.Recommended();
                temp.PropertyId    = Connection.ToLong(dr["PropertyId"]);
                temp.EndDate       = Connection.ToDate(dr["EndDate"]);
                temp.StartDate     = Connection.ToDate(dr["StartDate"]);
                temp.Order         = Connection.ToInteger(dr["Order"]);
                temp.Status        = Connection.ToInteger(dr["Status"]);
                temp.UpdatedByUser = Connection.ToString(dr["UpdatedBy"]);
                temp.UpdatedDate   = Connection.ToDate(dr["UpdatedDate"]);
                temp.Title         = Connection.ToString(dr["Title"]);
                temp.Supplier      = Connection.ToString(dr["Name"]);
                temp.ManageFor     = Connection.ToInteger(dr["ManageFor"]);
                //   temp.AccommodationType = Connection.ToString(dr["AccType"]);
                result.Add(temp);
            }
            return(result);
        }
Ejemplo n.º 5
0
        public CLayer.Invoice GetInvoice(long invoiceId)
        {
            string    sql = "Select * from Invoices Where InvoiceId=" + invoiceId.ToString();
            DataTable dt  = Connection.GetSQLTable(sql);

            CLayer.Invoice data = null;
            if (dt.Rows.Count == 0)
            {
                return(data);
            }

            data = new CLayer.Invoice();
            DataRow dr = dt.Rows[0];

            data.InvoiceId        = Connection.ToLong(dr["InvoiceId"]);
            data.InvoiceNumber    = Connection.ToString(dr["InvoiceNumber"]);
            data.Discounts        = Connection.ToDouble(dr["Discounts"]);
            data.DueDate          = Connection.ToDate(dr["DueDate"]);
            data.HtmlSection1     = Connection.ToString(dr["HtmlSection1"]);
            data.HtmlSection2     = Connection.ToString(dr["HtmlSection2"]);
            data.HtmlSection3     = Connection.ToString(dr["HtmlSection3"]);
            data.InvoiceDate      = Connection.ToDate(dr["InvoiceDate"]);
            data.InvoiceType      = Connection.ToInteger(dr["InvoiceType"]);
            data.MailedDate       = Connection.ToDate(dr["MailedDate"]);
            data.OfflineBookingId = Connection.ToLong(dr["OfflineBookingId"]);
            data.Others           = Connection.ToDouble(dr["Others"]);
            data.Reimbursements   = Connection.ToDouble(dr["Reimbursements"]);
            data.Status           = Connection.ToInteger(dr["Status"]);
            data.ToAddress        = Connection.ToString(dr["ToAddress"]);

            return(data);
        }
Ejemplo n.º 6
0
        public CLayer.Suggest Get(int InfoId)
        {
            CLayer.Suggest            suggest = null;
            List <DataPlug.Parameter> param   = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pInfoId", DataPlug.DataType._BigInt, InfoId));
            DataTable dt = Connection.GetTable("propertysuggestion_Get", param);

            if (dt.Rows.Count > 0)
            {
                suggest                = new CLayer.Suggest();
                suggest.InfoId         = Connection.ToLong(dt.Rows[0]["InfoId"]);
                suggest.Name           = Connection.ToString(dt.Rows[0]["Name"]);
                suggest.Location       = Connection.ToString(dt.Rows[0]["Location"]);
                suggest.City           = Connection.ToString(dt.Rows[0]["City"]);
                suggest.CountryId      = Connection.ToInteger(dt.Rows[0]["CountryId"]);
                suggest.Country        = Connection.ToString(dt.Rows[0]["Country"]);
                suggest.Address        = Connection.ToString(dt.Rows[0]["Address"]);
                suggest.Phone          = Connection.ToString(dt.Rows[0]["Phone"]);
                suggest.Email          = Connection.ToString(dt.Rows[0]["Email"]);
                suggest.SuggestionDate = Connection.ToDate(dt.Rows[0]["SuggestionDate"]);
                suggest.Status         = Connection.ToInteger(dt.Rows[0]["Status"]);
            }
            return(suggest);
        }
Ejemplo n.º 7
0
        public List <CLayer.StaticPage> GetAll()
        {
            string    sql = "Select * From staticpage";
            DataTable dt  = Connection.GetSQLTable(sql);
            List <CLayer.StaticPage> result = new List <CLayer.StaticPage>();

            CLayer.StaticPage t;
            DateTime          tm;

            foreach (DataRow dr in dt.Rows)
            {
                t           = new CLayer.StaticPage();
                t.PageId    = Connection.ToLong(dr["PageId"]);
                t.City      = Connection.ToString(dr["City"]);
                t.Location  = Connection.ToString(dr["Location"]);
                t.PageTitle = Connection.ToString(dr["PageTitle"]);
                tm          = Connection.ToDate(dr["LastUpdate"]);
                if (tm == DateTime.Now)
                {
                    t.LastUpdate = "";
                }
                else
                {
                    t.LastUpdate = tm.ToShortDateString();
                }
                //t.City = Connection.ToString(dr["City"]);
                //t.City = Connection.ToString(dr["City"]);
                //t.City = Connection.ToString(dr["City"]);
                //t.City = Connection.ToString(dr["City"]);
                result.Add(t);
            }
            return(result);
        }
Ejemplo n.º 8
0
        public List <CLayer.Rates> GetAllRatesByAccId(long accommodationId)
        {
            List <DataPlug.Parameter> param  = new List <DataPlug.Parameter>();
            List <CLayer.Rates>       result = new List <CLayer.Rates>();

            param.Add(Connection.GetParameter("pAccommodationId", DataPlug.DataType._BigInt, accommodationId));
            DataTable dt = Connection.GetTable("ratesaccomodation_GetAllByAccId", param);

            CLayer.Rates rt1;
            foreach (DataRow dr in dt.Rows)
            {
                rt1                 = new CLayer.Rates();
                rt1.RateFor         = Connection.ToInteger(dr["RateFor"]);
                rt1.RateId          = Connection.ToLong(dr["RateId"]);
                rt1.AccommodationId = accommodationId;
                rt1.DailyRate       = Connection.ToDecimal(dr["DailyRate"]);
                rt1.CalcDailyRate   = Connection.ToDecimal(dr["CalcDailyRate"]);
                rt1.GuestRate       = Connection.ToDecimal(dr["GuestRate"]);
                rt1.LongTermRate    = Connection.ToDecimal(dr["LongTermRate"]);
                rt1.MonthlyRate     = Connection.ToDecimal(dr["MonthlyRate"]);
                rt1.WeeklyRate      = Connection.ToDecimal(dr["WeeklyRate"]);
                rt1.StartDate       = Connection.ToDate(dr["StartDate"]);
                rt1.EndDate         = Connection.ToDate(dr["EndDate"]);
                rt1.UpdatedBy       = Connection.ToInteger(dr["UpdatedBy"]);

                result.Add(rt1);
            }
            return(result);
        }
Ejemplo n.º 9
0
        public List <CLayer.GDSTransactionsLog> GetGDSTransactionLog()
        {
            try
            {
                List <CLayer.GDSTransactionsLog> result = new List <CLayer.GDSTransactionsLog>();

                DataTable dt = Connection.GetTable("GetGDSTransactionLog");
                foreach (DataRow dr in dt.Rows)
                {
                    CLayer.GDSTransactionsLog objResult = new CLayer.GDSTransactionsLog();
                    objResult.GDSID           = Connection.ToLong(dr["GDSID"]);
                    objResult.BookingID       = Connection.ToLong(dr["BookingID"]);
                    objResult.CreatedAt       = Connection.ToDate(dr["CreatedAt"]);
                    objResult.GDSTypeValue    = Connection.ToString(dr["GDSTypeValue"]);
                    objResult.GDSRequest      = Connection.ToString(dr["GDSRequest"]);
                    objResult.GDSResult       = Connection.ToString(dr["GDSResult"]);
                    objResult.GDSError        = Connection.ToString(dr["GDSError"]);
                    objResult.GDSErrorMessage = Connection.ToString(dr["GDSErrorMessage"]);
                    objResult.UserID          = Connection.ToInteger(dr["UserID"]);
                    objResult.GDSTransID      = Connection.ToString(dr["GDSTransID"]);

                    result.Add(objResult);
                }
                return(result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 10
0
        public CLayer.SupplierPayment GetPaymentdetails(string refId)
        {
            CLayer.SupplierPayment    user  = null;
            List <DataPlug.Parameter> param = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pRefId", DataPlug.DataType._Varchar, refId));
            DataTable dt = Connection.GetTable("OfflineBooking_GetAllByRefid", param);

            if (dt.Rows.Count > 0)
            {
                user = new CLayer.SupplierPayment();

                user.Buyprice     = Connection.ToDouble(dt.Rows[0]["TotalBuyPrice"]);
                user.propertyname = Connection.ToString(dt.Rows[0]["PropertyName"]);
                user.propertycity = Connection.ToString(dt.Rows[0]["PropertyCityname"]);
                //     FirstName = Connection.ToString(dr["FirstName"]),
                //  LastName = Connection.ToString(dr["LastName"]),
                user.SupplierEmail  = Connection.ToString(dt.Rows[0]["SupplierEmail"]);
                user.SupplierName   = Connection.ToString(dt.Rows[0]["SupplierName"]);
                user.Buyprice       = Connection.ToDouble(dt.Rows[0]["TotalBuyPrice"]);
                user.AmountPaid     = Connection.ToDouble(dt.Rows[0]["amount"]);
                user.SupplierMobile = Connection.ToString(dt.Rows[0]["SupplierMobile"]);
                user.OrderId        = Connection.ToString(dt.Rows[0]["Orderno"]);
                user.CheckIn_date   = Connection.ToDate(dt.Rows[0]["CheckIn_date"]);
                user.CustomerName   = Connection.ToString(dt.Rows[0]["CustName"]);
                //   DeletedDate = Connection.ToDate(dr["DeletedDate"]),
                user.CheckOut_date   = Connection.ToDate(dt.Rows[0]["CheckOut_date"]);
                user.BookingDate     = Connection.ToDate(dt.Rows[0]["BookingDate"]);
                user.supplierId      = Connection.ToLong(dt.Rows[0]["SupplierId"]);
                user.supplierPayment = Connection.ToBoolean(dt.Rows[0]["supplierPayment"]);
            }
            return(user);
        }
Ejemplo n.º 11
0
        public List <CLayer.User> GetAllStaff(int status)
        {
            List <CLayer.User>        users = new List <CLayer.User>();
            List <DataPlug.Parameter> param = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pStatus", DataPlug.DataType._Int, status));
            DataTable dt = Connection.GetTable("user_GetAllStaff", param);

            foreach (DataRow dr in dt.Rows)
            {
                users.Add(new CLayer.User()
                {
                    UserId     = Connection.ToLong(dr["UserId"]),
                    Salutation = Connection.ToString(dr["Salutation"]),
                    //Businessname = Connection.ToString(dr["Businessname"]),
                    FirstName   = Connection.ToString(dr["FirstName"]),
                    LastName    = Connection.ToString(dr["LastName"]),
                    DateOfBirth = Connection.ToDate(dr["DateOfBirth"]),
                    Sex         = Connection.ToInteger(dr["Sex"]),
                    UserType    = Connection.ToString(dr["UserType"]),
                    Status      = Connection.ToInteger(dr["Status"]),
                    Email       = Connection.ToString(dr["Email"]),
                    CreatedDate = Connection.ToDate(dr["CreatedDate"]),
                    DeletedDate = Connection.ToDate(dr["DeletedDate"]),
                    LastLoginOn = Connection.ToDate(dr["LastLoginOn"])
                });
            }

            return(users);
        }
Ejemplo n.º 12
0
        public CLayer.OfflinePayment GetOfflinePaymentDetails(long OfflinePaymentId)
        {
            CLayer.OfflinePayment     result = null;
            List <DataPlug.Parameter> param  = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pOfflinePayId", DataPlug.DataType._BigInt, OfflinePaymentId));
            DataTable dt = Connection.GetTable("OfflinePayment_GetDetails", param);

            if (dt.Rows.Count > 0)
            {
                result                 = new CLayer.OfflinePayment();
                result.UserId          = Connection.ToLong(dt.Rows[0]["UserId"]);
                result.Amount          = Connection.ToDecimal(dt.Rows[0]["Amount"]);
                result.Name            = Connection.ToString(dt.Rows[0]["Name"]);
                result.Message         = Connection.ToString(dt.Rows[0]["Message"]);
                result.ReferenceNumber = Connection.ToString(dt.Rows[0]["ReferenceNo"]);
                result.PaymentRefNo    = Connection.ToString(dt.Rows[0]["PaymentReferenceNo"]);
                result.CreatedDate     = Connection.ToDate(dt.Rows[0]["CreatedDate"]);
                result.Email           = Connection.ToString(dt.Rows[0]["Email"]);
                result.Mobile          = Connection.ToString(dt.Rows[0]["Mobile"]);
                result.Address         = Connection.ToString(dt.Rows[0]["Address"]);
                result.Country         = Connection.ToString(dt.Rows[0]["CountryName"]);
                result.State           = Connection.ToString(dt.Rows[0]["StateName"]);
                result.City            = Connection.ToString(dt.Rows[0]["CityName"]);
                result.CountryCode     = Connection.ToString(dt.Rows[0]["CountryCode"]);
                result.ZipCode         = Connection.ToString(dt.Rows[0]["ZipCode"]);
                //result.PaymentLinkID = (Guid)(dt.Rows[0]["PaymentLinkGuidId"]);
                result.PaymentLinkID = Connection.ToString(dt.Rows[0]["PaymentLinkGuidId"]);
            }
            return(result);
        }
Ejemplo n.º 13
0
        public List <CLayer.OfflinePayment> ReportOfflinePayment_GetAll(int status, string searchString, int searchItem, int start, int limit)
        {
            List <CLayer.OfflinePayment> bookings = new List <CLayer.OfflinePayment>();
            List <DataPlug.Parameter>    param    = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pStatus", DataPlug.DataType._Int, status));
            param.Add(Connection.GetParameter("pSearchString", DataPlug.DataType._Varchar, searchString));
            param.Add(Connection.GetParameter("pSearchItem", DataPlug.DataType._Int, searchItem));
            param.Add(Connection.GetParameter("pStart", DataPlug.DataType._Int, start));
            param.Add(Connection.GetParameter("pLimit", DataPlug.DataType._Int, limit));
            DataSet ds = Connection.GetDataSet("Report_OfflinePaymentGetall", param);

            foreach (DataRow dr in ds.Tables[1].Rows)
            {
                bookings.Add(new CLayer.OfflinePayment()
                {
                    LoginUsername        = Connection.ToString(dr["LoginUsername"]),
                    Name                 = Connection.ToString(dr["PayUserName"]),
                    Amount               = Connection.ToDecimal(dr["PayAmount"]),
                    Message              = Connection.ToString(dr["Message"]),
                    ReferenceNumber      = Connection.ToString(dr["PayUserRefNo"]),
                    PaymentRefNo         = Connection.ToString(dr["PaymentReferenceNo"]),
                    Mobile               = Connection.ToString(dr["Mobile"]),
                    State                = Connection.ToString(dr["State"]),
                    City                 = Connection.ToString(dr["City"]),
                    Email                = Connection.ToString(dr["Email"]),
                    Country              = Connection.ToString(dr["CountryName"]),
                    CreatedDate          = Connection.ToDate(dr["CreatedDate"]),
                    OfflinePaymentStatus = Connection.ToInteger(dr["OfflinePaymentStatus"]),
                    OfflinePaymentId     = Connection.ToInteger(dr["OfflinePaymentId"]),
                    TotalRows            = Connection.ToLong(ds.Tables[0].Rows[0]["NumberOfRows"]),
                });
            }
            return(bookings);
        }
Ejemplo n.º 14
0
        public List <CLayer.Offers> GetForAccommodation(long accommodationId, int activeStatus)
        {
            List <DataPlug.Parameter> param = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pActiveStatus", DataPlug.DataType._Int, activeStatus));
            param.Add(Connection.GetParameter("pAccommodationId", DataPlug.DataType._BigInt, accommodationId));
            DataTable            dt     = Connection.GetTable("offer_ForAccommodation", param);
            List <CLayer.Offers> result = new List <CLayer.Offers>();

            CLayer.Offers temp;
            foreach (DataRow dr in dt.Rows)
            {
                temp            = new CLayer.Offers();
                temp.OfferId    = Connection.ToLong(dr["OfferId"]);
                temp.OfferTitle = Connection.ToString(dr["OfferTitle"]);
                temp.OfferType  = Connection.ToInteger(dr["OfferType"]);
                temp.RateType   = Connection.ToInteger(dr["RateType"]);
                temp.StartDate  = Connection.ToDate(dr["StartDate"]);
                temp.EndDate    = Connection.ToDate(dr["EndDate"]);
                temp.FreeDays   = Connection.ToInteger(dr["FreeDays"]);
                temp.NoOfDays   = Connection.ToInteger(dr["NoOfDays"]);
                temp.Amount     = Connection.ToDecimal(dr["Amount"]);
                result.Add(temp);
            }
            return(result);
        }
Ejemplo n.º 15
0
        public List <CLayer.Tax> GetAllForProperty(long propertyId, DateTime checkIn, DateTime bookingDate)
        {
            List <CLayer.Tax>         result = new List <CLayer.Tax>();
            List <DataPlug.Parameter> param  = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pPropertyId", DataPlug.DataType._BigInt, propertyId));
            param.Add(Connection.GetParameter("pCheckIn", DataPlug.DataType._Date, checkIn));
            param.Add(Connection.GetParameter("pBooking", DataPlug.DataType._Date, bookingDate));
            DataTable dt = Connection.GetTable("tax_GetAllByProperty", param);

            foreach (DataRow dr in dt.Rows)
            {
                result.Add(new CLayer.Tax()
                {
                    TaxId      = Connection.ToInteger(dr["TaxId"]),
                    TaxTitleId = Connection.ToInteger(dr["TaxTitleId"]),
                    Rate       = Connection.ToDecimal(dr["Rate"]),
                    CountryId  = Connection.ToInteger(dr["CountryId"]),
                    //  Country = Connection.ToString(dr["CountryName"]),
                    StateId = Connection.ToInteger(dr["StateId"]),
                    //  State = Connection.ToString(dr["StateName"]),
                    CityId = Connection.ToInteger(dr["CityId"]),
                    //  City = Connection.ToString(dr["CityName"]),
                    Notes         = Connection.ToString(dr["Notes"]),
                    Status        = Connection.ToInteger(dr["Status"]),
                    StartDate     = Connection.ToDate(dr["StartDate"]),
                    EndDate       = Connection.ToDate(dr["EndDate"]),
                    OnDate        = Connection.ToInteger(dr["OnDate"]),
                    OnTotalAmount = Connection.ToBoolean(dr["OnTotalAmount"]),
                    PriceUpto     = Connection.ToDecimal(dr["PriceUpto"]),
                    Unlimited     = Connection.ToBoolean(dr["UnlimitedPrice"])
                });
            }
            return(result);
        }
Ejemplo n.º 16
0
        public CLayer.SupplierInvoice getGetSupplierInvoicedetails(long ID)
        {
            CLayer.SupplierInvoice    result = new CLayer.SupplierInvoice();
            List <DataPlug.Parameter> param  = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pSupplierInvID", DataPlug.DataType._BigInt, ID));
            DataTable dt = Connection.GetTable("getGetSupplierInvoicedetails", param);

            if (dt.Rows.Count > 0)
            {
                result = new CLayer.SupplierInvoice();
                result.SupplierInvoiceID        = Connection.ToLong(dt.Rows[0]["SupplierInvoiceID"]);
                result.PropertyId               = Connection.ToLong(dt.Rows[0]["PropertyID"]);
                result.Property_Name            = Connection.ToString(dt.Rows[0]["Title"]);
                result.SupplierId               = Connection.ToLong(dt.Rows[0]["SupplierID"]);
                result.InvoiceNumber            = Connection.ToString(dt.Rows[0]["InvoiceNumber"]);
                result.InvoiceDate              = Connection.ToDate(dt.Rows[0]["InvoiceDate"]);
                result.ServiceTaxRegNumber      = Connection.ToString(dt.Rows[0]["ServiceTaxRegNumber"]);
                result.PAN_Number               = Connection.ToString(dt.Rows[0]["PAN"]);
                result.BaseAmount               = Connection.ToDecimal(dt.Rows[0]["BaseAmount"]);
                result.LuxuryTax                = Connection.ToDecimal(dt.Rows[0]["LuxuryTax"]);
                result.ServiceTax               = Connection.ToDecimal(dt.Rows[0]["ServiceTax"]);
                result.TotalInvoiceValue        = Connection.ToDecimal(dt.Rows[0]["TotalInvoiceValue"]);
                result.EntryDate                = Connection.ToDate(dt.Rows[0]["EntryDate"]);
                result.txtTotalAdjustmentResult = Connection.ToDecimal(dt.Rows[0]["TotalAdjustment"]);
                result.PropertyEmailAddresss    = Connection.ToString(dt.Rows[0]["PropertyEmailAddress"]);
                result.PropertyType             = Connection.ToString(dt.Rows[0]["PropertyType"]);
                result.TaxType                 = Connection.ToInteger(dt.Rows[0]["TaxType"]);
                result.IsSupInvoicedone        = Connection.ToBoolean(dt.Rows[0]["IsSupInvoicedone"]);
                result.BookingRefNumber        = Connection.ToString(dt.Rows[0]["BookingReferenceIDNo"]);
                result.CheckedBookingRefNumber = Connection.ToString(dt.Rows[0]["CheckedBookingReferenceIDNo"]);
            }
            return(result);
        }
Ejemplo n.º 17
0
        public List <CLayer.OfflinePayment> GetOfflinePaymentDetails2(long OfflinePaymentId)
        {
            List <CLayer.OfflinePayment> result = new List <CLayer.OfflinePayment>();
            List <DataPlug.Parameter>    param  = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pOfflinePayId", DataPlug.DataType._BigInt, OfflinePaymentId));
            DataSet ds = Connection.GetDataSet("OfflinePayment_GetDetails", param);

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                result.Add(new CLayer.OfflinePayment()
                {
                    //result = new CLayer.OfflinePayment(),
                    UserId          = Connection.ToLong(dr["UserId"]),
                    Amount          = Connection.ToDecimal(dr["Amount"]),
                    Name            = Connection.ToString(dr["Name"]),
                    Message         = Connection.ToString(dr["Message"]),
                    ReferenceNumber = Connection.ToString(dr["ReferenceNo"]),
                    PaymentRefNo    = Connection.ToString(dr["PaymentReferenceNo"]),
                    CreatedDate     = Connection.ToDate(dr["CreatedDate"]),
                    Email           = Connection.ToString(dr["Email"]),
                    Mobile          = Connection.ToString(dr["Mobile"]),
                    Address         = Connection.ToString(dr["Address"]),
                    Country         = Connection.ToString(dr["CountryName"]),
                    State           = Connection.ToString(dr["StateName"]),
                    City            = Connection.ToString(dr["CityName"]),
                    CountryCode     = Connection.ToString(dr["CountryCode"]),
                    ZipCode         = Connection.ToString(dr["ZipCode"]),
                    //result.PaymentLinkID = (Guid)(dt.Rows[0]["PaymentLinkGuidId"]);
                    PaymentLinkID = Connection.ToString(ds.Tables[0].Rows[0]["PaymentLinkGuidId"])
                });
            }
            return(result);
        }
Ejemplo n.º 18
0
        public List <CLayer.Tax> GetAll()
        {
            List <CLayer.Tax> result = new List <CLayer.Tax>();
            DataTable         dt     = Connection.GetTable("tax_GetAll", null);

            foreach (DataRow dr in dt.Rows)
            {
                result.Add(new CLayer.Tax()
                {
                    TaxId         = Connection.ToInteger(dr["TaxId"]),
                    Title         = Connection.ToString(dr["Title"]),
                    TaxTitleId    = Connection.ToInteger(dr["TaxTitleId"]),
                    Rate          = Connection.ToDecimal(dr["Rate"]),
                    CountryId     = Connection.ToInteger(dr["CountryId"]),
                    Country       = Connection.ToString(dr["CountryName"]),
                    StateId       = Connection.ToInteger(dr["StateId"]),
                    State         = Connection.ToString(dr["StateName"]),
                    CityId        = Connection.ToInteger(dr["CityId"]),
                    City          = Connection.ToString(dr["CityName"]),
                    Notes         = Connection.ToString(dr["Notes"]),
                    Status        = Connection.ToInteger(dr["Status"]),
                    StartDate     = Connection.ToDate(dr["StartDate"]),
                    EndDate       = Connection.ToDate(dr["EndDate"]),
                    OnDate        = Connection.ToInteger(dr["OnDate"]),
                    OnTotalAmount = Connection.ToBoolean(dr["OnTotalAmount"]),
                    PriceUpto     = Connection.ToDecimal(dr["PriceUpto"]),
                    UpdatedBy     = Connection.ToLong(dr["UpdatedBy"]),
                    UpdatedDate   = Connection.ToDate(dr["UpdatedDate"]),
                    Unlimited     = Connection.ToBoolean(dr["UnlimitedPrice"])
                });
            }
            return(result);
        }
Ejemplo n.º 19
0
        public List <CLayer.Review> GetpropertyId(long propertyId, int Status)
        {
            List <CLayer.Review>      result = new List <CLayer.Review>();
            List <DataPlug.Parameter> param  = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pPropertyId", DataPlug.DataType._BigInt, propertyId));
            param.Add(Connection.GetParameter("pStatus", DataPlug.DataType._Int, Status));
            DataSet ds = Connection.GetDataSet("review_GetPropertyId", param);

            foreach (DataRow dr in ds.Tables[1].Rows)
            {
                result.Add(new CLayer.Review()
                {
                    PropertyId    = Connection.ToLong(dr["PropertyId"]),
                    UserId        = Connection.ToLong(dr["UserId"]),
                    BookingId     = Connection.ToLong(dr["BookingId"]),
                    Rating        = Connection.ToInteger(dr["Rating"]),
                    Status        = Connection.ToInteger(dr["Status"]),
                    ReviewDate    = Connection.ToDate(dr["ReviewDate"]),
                    FirstName     = Connection.ToString(dr["FirstName"]),
                    LastName      = Connection.ToString(dr["LastName"]),
                    Title         = Connection.ToString(dr["Title"]),
                    Location      = Connection.ToString(dr["Location"]),
                    Address       = Connection.ToString(dr["Address"]),
                    Description   = Connection.ToString(dr["Description"]),
                    BookingItemId = Connection.ToLong(dr["BookingItemId"]),
                    TotalRows     = Connection.ToLong(ds.Tables[0].Rows[0]["NumberOfRows"])
                });
            }
            return(result);
        }
Ejemplo n.º 20
0
        public List <CLayer.Review> GetAll(int Start, int Limit)
        {
            List <CLayer.Review>      result = new List <CLayer.Review>();
            List <DataPlug.Parameter> param  = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pStart", DataPlug.DataType._Int, Start));
            param.Add(Connection.GetParameter("pLimit", DataPlug.DataType._Int, Limit));
            DataSet ds = Connection.GetDataSet("review_GetAll", param);

            foreach (DataRow dr in ds.Tables[1].Rows)
            {
                result.Add(new CLayer.Review()
                {
                    PropertyId  = Connection.ToLong(dr["PropertyId"]),
                    UserId      = Connection.ToLong(dr["UserId"]),
                    BookingId   = Connection.ToLong(dr["BookingId"]),
                    Rating      = Connection.ToInteger(dr["Rating"]),
                    Status      = Connection.ToInteger(dr["Status"]),
                    ReviewDate  = Connection.ToDate(dr["ReviewDate"]),
                    FirstName   = Connection.ToString(dr["FirstName"]),
                    LastName    = Connection.ToString(dr["LastName"]),
                    Title       = Connection.ToString(dr["Title"]),
                    Location    = Connection.ToString(dr["Location"]),
                    Address     = Connection.ToString(dr["Address"]),
                    Description = Connection.ToString(dr["Description"]),
                    UpdatedBy   = Connection.ToLong(dr["UpdatedBy"]),
                    UpdatedDate = Connection.ToDate(dr["UpdatedDate"]),
                    Recommended = Connection.ToBoolean(dr["IsRecommended"]),
                    TotalRows   = Connection.ToLong(ds.Tables[0].Rows[0]["NumberOfRows"])
                });
            }
            return(result);
        }
Ejemplo n.º 21
0
        public CLayer.Review Get(long PropertyId, long UserId, long BookingId)
        {
            CLayer.Review             rev   = null;
            List <DataPlug.Parameter> param = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pPropertyId", DataPlug.DataType._BigInt, PropertyId));
            param.Add(Connection.GetParameter("pUserId", DataPlug.DataType._BigInt, UserId));
            param.Add(Connection.GetParameter("pBookingId", DataPlug.DataType._BigInt, BookingId));
            DataTable dt = Connection.GetTable("review_Details", param);

            if (dt.Rows.Count > 0)
            {
                rev             = new CLayer.Review();
                rev.PropertyId  = Connection.ToLong(dt.Rows[0]["PropertyId"]);
                rev.UserId      = Connection.ToLong(dt.Rows[0]["UserId"]);
                rev.BookingId   = Connection.ToLong(dt.Rows[0]["BookingId"]);
                rev.Rating      = Connection.ToInteger(dt.Rows[0]["Rating"]);
                rev.Status      = Connection.ToInteger(dt.Rows[0]["Status"]);
                rev.ReviewDate  = Connection.ToDate(dt.Rows[0]["ReviewDate"]);
                rev.FirstName   = Connection.ToString(dt.Rows[0]["FirstName"]);
                rev.LastName    = Connection.ToString(dt.Rows[0]["LastName"]);
                rev.Title       = Connection.ToString(dt.Rows[0]["Title"]);
                rev.Location    = Connection.ToString(dt.Rows[0]["Location"]);
                rev.Address     = Connection.ToString(dt.Rows[0]["Address"]);
                rev.Description = Connection.ToString(dt.Rows[0]["Description"]);
                rev.UpdatedBy   = Connection.ToLong(dt.Rows[0]["UpdatedBy"]);
                rev.UpdatedDate = Connection.ToDate(dt.Rows[0]["UpdatedDate"]);
                rev.Recommended = Connection.ToBoolean(dt.Rows[0]["IsRecommended"]);
            }
            return(rev);
        }
Ejemplo n.º 22
0
        public CLayer.User GetCountrUser(long userid)
        {
            CLayer.User user = null;
            List <DataPlug.Parameter> param = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pUserId", DataPlug.DataType._BigInt, userid));
            DataTable dt = Connection.GetTable("user_Get", param);

            if (dt.Rows.Count > 0)
            {
                user              = new CLayer.User();
                user.UserId       = Connection.ToLong(dt.Rows[0]["UserId"]);
                user.SalutationId = Connection.ToInteger(dt.Rows[0]["SalutationId"]);
                user.FirstName    = Connection.ToString(dt.Rows[0]["FirstName"]);
                user.LastName     = Connection.ToString(dt.Rows[0]["LastName"]);
                user.DateOfBirth  = Connection.ToDate(dt.Rows[0]["DateOfBirth"]);
                user.Sex          = Connection.ToInteger(dt.Rows[0]["Sex"]);
                user.UserTypeId   = Connection.ToInteger(dt.Rows[0]["UserType"]);
                user.Status       = Connection.ToInteger(dt.Rows[0]["Status"]);
                user.Email        = Connection.ToString(dt.Rows[0]["Email"]);
                user.CreatedDate  = Connection.ToDate(dt.Rows[0]["CreatedDate"]);
                user.Phone        = Connection.ToString(dt.Rows[0]["Phone"]);
                user.Mobile       = Connection.ToString(dt.Rows[0]["Mobile"]);
                user.Country      = Connection.ToString(dt.Rows[0]["Country"]);
            }
            return(user);
        }
Ejemplo n.º 23
0
        public List <CLayer.SupplierPaymetList> getDetails(long SupplierPaymentId)
        {
            List <CLayer.SupplierPaymetList> result = new List <CLayer.SupplierPaymetList>();

            CLayer.SupplierPaymetList res   = null;
            List <DataPlug.Parameter> param = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pSupplierPaymentID", DataPlug.DataType._BigInt, SupplierPaymentId));

            DataSet ds = Connection.GetDataSet("supplierpaymentvoucher_GetAllBySupplierPaymentID", param);

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                result.Add(new CLayer.SupplierPaymetList()
                {
                    SupplierPaymentId    = Connection.ToLong(dr["SupplierPaymentId"]),
                    SupplierId           = Connection.ToLong(dr["SupplierId"]),
                    OfflineSupplierEmail = Connection.ToString(dr["OfflineSupplierEmail"]),
                    SupplierPayment      = Connection.ToDecimal(dr["SupplierPayment"]),
                    dtPayment            = Connection.ToDate(dr["dtPayment"]),
                    grossAmount          = Connection.ToDecimal(dr["grossAmount"]),
                    tdsAmount            = Connection.ToDecimal(dr["tdsAmount"]),
                    netAmtPaid           = Connection.ToDecimal(dr["netAmtPaid"]),
                    modeofPayment        = Connection.ToString(dr["modeofPayment"]),
                    bank         = Connection.ToString(dr["bank"]),
                    SupplierName = Connection.ToString(dr["SupplierName"]),
                    Prop_Name    = Connection.ToString(dr["propertyname"]),
                    // Prop_ID = Connection.ToLong(dr["propertyid"]),
                    OrderNo = Connection.ToString(dr["OrderNo"])
                });
            }
            return(result);
        }
Ejemplo n.º 24
0
        public DateTime GetbookingsmedayforCorp(long b2bId)
        {
            List <DataPlug.Parameter> param = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pB2BId", DataPlug.DataType._BigInt, b2bId));
            object result = Connection.ExecuteQueryScalar("b2bcorporate_GetbookingsmedayforCorp", param);

            return(Connection.ToDate(result));
        }
Ejemplo n.º 25
0
        public List <CLayer.OfflineBooking> SupplierInvoiceSavedBookingList(long PropID, long ID, string BookingRefIDs, string PropertyEmailAddresss, string PropertyType)
        {
            List <CLayer.OfflineBooking> result = new List <CLayer.OfflineBooking>();
            List <DataPlug.Parameter>    param  = new List <DataPlug.Parameter>();
            DataTable dt = new DataTable();

            if (ID > 0)
            {
                param.Add(Connection.GetParameter("pProp_ID", DataPlug.DataType._BigInt, PropID));
                param.Add(Connection.GetParameter("pSupplierInvoice_ID", DataPlug.DataType._BigInt, ID));
                param.Add(Connection.GetParameter("pPropertyEmailAddresss", DataPlug.DataType._Text, PropertyEmailAddresss));
                param.Add(Connection.GetParameter("pPropertyType", DataPlug.DataType._Text, PropertyType));
                dt = Connection.GetTable("SupplierInvoicePropertySavedBooking_List", param);
            }
            else
            {
                param.Add(Connection.GetParameter("pProp_ID", DataPlug.DataType._BigInt, PropID));
                param.Add(Connection.GetParameter("pBookingIDs", DataPlug.DataType._Varchar, BookingRefIDs));
                param.Add(Connection.GetParameter("pPropertyEmailAddresss", DataPlug.DataType._Text, PropertyEmailAddresss));
                param.Add(Connection.GetParameter("pPropertyType", DataPlug.DataType._Text, PropertyType));
                dt = Connection.GetTable("SupplierInvoicePropertyBooking_List_ForSaving", param);
            }

            //param.Add(Connection.GetParameter("pProp_ID", DataPlug.DataType._BigInt, PropID));
            //param.Add(Connection.GetParameter("pSupplierInvoice_ID", DataPlug.DataType._BigInt, ID));
            //DataTable dt = Connection.GetTable("SupplierInvoicePropertySavedBooking_List", param);
            CLayer.OfflineBooking res = null;
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    res                    = new CLayer.OfflineBooking();
                    res.PropertyId         = Connection.ToLong(dr["Prop_ID"]);
                    res.OfflineBookingId   = Connection.ToLong(dr["Primary_ID"]);
                    res.ConfirmationNumber = Connection.ToString(dr["OrderNo"]);
                    //res.Amount = Connection.ToLong(dr["Amount"]);
                    res.CheckIn_date  = Connection.ToDate(dr["CheckIn_date"]);
                    res.CheckOut_date = Connection.ToDate(dr["CheckOut_date"]);
                    //res.BookingDate = Connection.ToDate(dr["BookingDate"]);
                    res.PropertyName      = Connection.ToString(dr["PropertyName"]);
                    res.PropertyContactNo = Connection.ToString(dr["PropertyContactNo"]);
                    res.PropertyEmail     = Connection.ToString(dr["PropertyEmail"]);
                    res.SupplierName      = Connection.ToString(dr["SupplierName"]);
                    res.SupplierMobile    = Connection.ToString(dr["SupplierMobile"]);
                    res.SupplierEmail     = Connection.ToString(dr["SupplierEmail"]);
                    res.TotalBuyPrice     = Connection.ToDecimal(dr["TotalBuyPrice"]);
                    res.City   = Connection.ToString(dr["City"]);
                    res.isOpen = Connection.ToBoolean(dr["open"]);
                    res.SupInvoiceValueBRef = Connection.ToDecimal(dr["SupInvoiceValueBRef"]);
                    res.PaidValueBRef       = Connection.ToDecimal(dr["PaidValueBRef"]);
                    res.AmtTobePaid         = Connection.ToDecimal(dr["AmtTobePaid"]);
                    result.Add(res);
                }
            }
            return(result);
        }
Ejemplo n.º 26
0
        public List <CLayer.SupplierPayment> GetAllSupllierPaymentVoucher(long SupplierPaymentId)
        {
            List <CLayer.SupplierPayment> users = new List <CLayer.SupplierPayment>();
            List <DataPlug.Parameter>     param = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pSupplierPaymentID", DataPlug.DataType._Int, SupplierPaymentId));

            DataSet ds = Connection.GetDataSet("supplierpaymentvoucher_GetAllBySupplierPaymentID", param);

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                users.Add(new CLayer.SupplierPayment()
                {
                    grossAmount   = Connection.ToDecimal(dr["grossAmount"]),
                    tdsAmount     = Connection.ToDecimal(dr["tdsAmount"]),
                    netAmtPaid    = Connection.ToDecimal(dr["netAmtPaid"]),
                    modeofPayment = Connection.ToString(dr["modeofPayment"]),
                    BAnk          = Connection.ToString(dr["bank"]),
                    NoOfPaxChild  = Connection.ToLong(dr["NoOfPaxChild"]),
                    NoOfPaxAdult  = Connection.ToLong(dr["NoOfPaxAdult"]),
                    NoofRooms     = Connection.ToLong(dr["NoofRooms"]),
                    Guestname     = Connection.ToString(dr["Guestname"]),
                    // Salutation = Connection.ToString(dr["Salutation"]),
                    propertyname = Connection.ToString(dr["PropertyName"]),
                    propertycity = Connection.ToString(dr["propertycity"]),
                    Region       = Connection.ToString(dr["Region"]),
                    Amount       = Connection.ToDecimal(dr["Amount"]),
                    SupplierCity = Connection.ToString(dr["SupplierCity"]),
                    //     FirstName = Connection.ToString(dr["FirstName"]),
                    //  LastName = Connection.ToString(dr["LastName"]),
                    SupplierEmail = Connection.ToString(dr["SupplierEmail"]),
                    SupplierName  = Connection.ToString(dr["SupplierName"]),
                    Buyprice      = Connection.ToDouble(dr["TotalBuyPrice"]),

                    pdtPayment     = Connection.ToDate(dr["dtPayment"]),
                    AmountPaid     = Connection.ToDouble(dr["amount"]),
                    SupplierMobile = Connection.ToString(dr["SupplierMobile"]),
                    OrderId        = Connection.ToString(dr["Orderno"]),
                    CheckIn_date   = Connection.ToDate(dr["CheckIn_date"]),
                    //   DeletedDate = Connection.ToDate(dr["DeletedDate"]),
                    CheckOut_date = Connection.ToDate(dr["CheckOut_date"]),
                    BookingDate   = Connection.ToDate(dr["BookingDate"]),
                    NoofDays      = Connection.ToLong(dr["Noofnight"]),
                    Payamount     = Connection.ToDecimal(dr["PayAmount"])
                                    //  Status = Connection.ToInteger(dr["Status"]),
                                    // PANNo = Connection.ToString(dr["PANNo"]),
                                    // UserCode = Connection.ToString(dr["UserCode"]),
                });
            }

            return(users);
        }
Ejemplo n.º 27
0
        //*This is for getting details of offlinebooking
        //*Done by rahul on 06-02-2020
        public List <CLayer.BookingItem> GetAllOfflineDetails(long bookingId, bool IsAmedus = false)
        {
            List <CLayer.BookingItem> result = new List <CLayer.BookingItem>();
            List <DataPlug.Parameter> param  = new List <DataPlug.Parameter>();

            try
            {
                param.Add(Connection.GetParameter("pBookingId", DataPlug.DataType._BigInt, bookingId));
                DataTable dt;

                dt = Connection.GetTable("offlinebooking_GetAllItems", param);



                CLayer.BookingItem bi;
                foreach (DataRow dr in dt.Rows)
                {
                    bi = new CLayer.BookingItem();
                    bi.BookingItemId      = Connection.ToLong(dr["BookingId"]);
                    bi.AccommodationId    = Connection.ToLong(dr["AccommodatoinTypeId"]);
                    bi.BookingId          = Connection.ToLong(dr["Offline_BookingId"]);
                    bi.AccommodationTitle = Connection.ToString(dr["AccommodationType"]);
                    bi.CheckIn            = Connection.ToDate(dr["CheckIn_date"]);
                    bi.CheckOut           = Connection.ToDate(dr["CheckOut_date"]);
                    bi.NoOfAccommodations = Connection.ToInteger(dr["NoOfRooms"]);
                    bi.NoOfAdults         = Connection.ToInteger(dr["NoOfPaxAdult"]);
                    bi.NoOfChildren       = Connection.ToInteger(dr["NoOfPaxChild"]);
                    bi.NoOfDays           = Connection.ToInteger(dr["Noofnight"]);
                    bi.Amount             = Connection.ToDecimal(dr["TotalBuyPrice"]);
                    bi.PropertyTitle      = Connection.ToString(dr["PropertyTitle"]);
                    bi.PropertyAddress    = Connection.ToString(dr["PropertyAddress"]);
                    bi.PropertyId         = Connection.ToLong(dr["PropertyId"]);
                    bi.TotalAmount        = Connection.ToDecimal(dr["TotalAmtForBuyPrice"]);
                    bi.TotalTax           = Connection.ToDecimal(dr["StaxForBuyPrice"]);
                    bi.AccommodationTypeT = Connection.ToString(dr["AccommodationType"]);
                    bi.StayCategoryT      = Connection.ToString(dr["StayCategory"]);
                    bi.DailyRate          = Connection.ToDecimal(dr["DailyRate"]);
                    bi.HotelConfirmNumber = Connection.ToString(dr["HotelConfirmNumber"]);
                    bi.CountryName        = Connection.ToString(dr["CountryName"]);

                    result.Add(bi);
                }
            }
            catch (Exception ex)
            {
                result = null;
            }

            return(result);
        }
Ejemplo n.º 28
0
        public List <CLayer.SupplierInvoice> getSupplierInvoiceList_Report(long Start, long Limit, DateTime?fromDT, DateTime?toDT)
        {
            fromDT = fromDT == DateTime.MinValue ? null : fromDT;
            toDT   = toDT == DateTime.MinValue ? null : toDT;
            List <CLayer.SupplierInvoice> result = new List <CLayer.SupplierInvoice>();
            List <DataPlug.Parameter>     param  = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pfromDT", DataPlug.DataType._Date, fromDT));
            param.Add(Connection.GetParameter("ptoDT", DataPlug.DataType._Date, toDT));
            param.Add(Connection.GetParameter("pStart", DataPlug.DataType._BigInt, Start));
            param.Add(Connection.GetParameter("pLimit", DataPlug.DataType._BigInt, Limit));
            DataSet ds = Connection.GetDataSet("getGetSupplierInvoiceList_Report", param);

            CLayer.SupplierInvoice res = null;
            if (ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[1].Rows)
                {
                    res = new CLayer.SupplierInvoice();
                    res.SupplierInvoiceID = Connection.ToLong(dr["SupplierInvoiceID"]);
                    res.PropertyId        = Connection.ToLong(dr["PropertyID"]);
                    res.Property_Name     = Connection.ToString(dr["Title"]);
                    res.SupplierId        = Connection.ToLong(dr["SupplierID"]);
                    res.SupplierName      = Connection.ToString(dr["SupplierName"]);
                    res.City                = Connection.ToString(dr["City"]);
                    res.InvoiceNumber       = Connection.ToString(dr["InvoiceNumber"]);
                    res.InvoiceDate         = Connection.ToDate(dr["InvoiceDate"]);
                    res.ServiceTaxRegNumber = Connection.ToString(dr["ServiceTaxRegNumber"]);
                    res.PAN_Number          = Connection.ToString(dr["PAN"]);
                    res.BaseAmount          = Connection.ToDecimal(dr["BaseAmount"]);
                    res.LuxuryTax           = Connection.ToDecimal(dr["LuxuryTax"]);
                    res.ServiceTax          = Connection.ToDecimal(dr["ServiceTax"]);
                    res.TotalInvoiceValue   = Connection.ToDecimal(dr["TotalInvoiceValue"]);
                    res.EntryDate           = Connection.ToDate(dr["EntryDate"]);

                    res.SupplierInvoiceBooking_ID = Connection.ToLong(dr["SupplierInvoiceBooking_ID"]);
                    res.BookingRefNumber          = Connection.ToString(dr["BookingRefNumber"]);
                    res.CheckIn_date    = Connection.ToDate(dr["CheckIn_date"]);
                    res.CheckOut_date   = Connection.ToDate(dr["CheckOut_date"]);
                    res.BookinCreatedDT = Connection.ToDate(dr["BookinCreatedDT"]);

                    res.TotalRows = Connection.ToLong(ds.Tables[0].Rows[0]["NumberOfRows"]);

                    result.Add(res);
                }
            }
            return(result);
        }
Ejemplo n.º 29
0
        public CLayer.InvoiceNumberData GetOldGDSInvoiceNumber(long stateId)
        {
            List <DataPlug.Parameter> param = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pStateId", DataPlug.DataType._BigInt, stateId));
            DataTable dt = Connection.GetTable("State_OldGDSInvoiceNumber", param);

            if (dt.Rows.Count == 0)
            {
                return(null);
            }
            CLayer.InvoiceNumberData data = new CLayer.InvoiceNumberData();
            data.InvoiceNumber = Connection.ToString(dt.Rows[0]["IncNumber"]);
            data.InvoiceDate   = Connection.ToDate(dt.Rows[0]["InvDate"]);
            return(data);
        }
Ejemplo n.º 30
0
        public List <CLayer.Review> GetUserId(int Start, int Limit, long id, int status)
        {
            List <CLayer.Review>      result = new List <CLayer.Review>();
            List <DataPlug.Parameter> param  = new List <DataPlug.Parameter>();

            param.Add(Connection.GetParameter("pStart", DataPlug.DataType._Int, Start));
            param.Add(Connection.GetParameter("pLimit", DataPlug.DataType._Int, Limit));
            param.Add(Connection.GetParameter("pUserId", DataPlug.DataType._BigInt, id));
            param.Add(Connection.GetParameter("pStatus", DataPlug.DataType._Int, status));
            DataSet ds = Connection.GetDataSet("review_GetUserId", param);

            foreach (DataRow dr in ds.Tables[1].Rows)
            {
                result.Add(new CLayer.Review()
                {
                    PropertyId  = Connection.ToLong(dr["PropertyId"]),
                    UserId      = Connection.ToLong(dr["UserId"]),
                    BookingId   = Connection.ToLong(dr["BookingId"]),
                    Rating      = Connection.ToInteger(dr["Rating"]),
                    Status      = Connection.ToInteger(dr["Status"]),
                    ReviewDate  = Connection.ToDate(dr["ReviewDate"]),
                    FirstName   = Connection.ToString(dr["FirstName"]),
                    LastName    = Connection.ToString(dr["LastName"]),
                    Title       = Connection.ToString(dr["Title"]),
                    Location    = Connection.ToString(dr["Location"]),
                    Address     = Connection.ToString(dr["Address"]),
                    Description = Connection.ToString(dr["Description"]),
                    UpdatedBy   = Connection.ToLong(dr["UpdatedBy"]),
                    UpdatedDate = Connection.ToDate(dr["UpdatedDate"]),
                    Recommended = Connection.ToBoolean(dr["IsRecommended"]),

                    AccommodationCity = Connection.ToString(dr["AccommodationCity"]),
                    Accessibility     = Connection.ToInteger(dr["Accessibilitytoproperty"]),
                    Easiness          = Connection.ToInteger(dr["EasinessInCheckIn"]),
                    CleanlinessBed    = Connection.ToInteger(dr["CleanlinessBedroom"]),
                    CleanlinessBath   = Connection.ToInteger(dr["CleanlinessBathroom"]),
                    SleepQuality      = Connection.ToInteger(dr["SleepQuality"]),
                    Staffbehave       = Connection.ToInteger(dr["StaffBehavior"]),
                    Considerfornext   = Connection.ToInteger(dr["ConsiderForNextTravel"]),
                    OverallExp        = Connection.ToInteger(dr["OverallExperience"]),

                    //BookingItemId=Connection.ToLong(dr["BookingItemId"]),
                    TotalRows = Connection.ToLong(ds.Tables[0].Rows[0]["NumberOfRows"])
                });
            }
            return(result);
        }