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); }
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); }
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); }
public List <CLayer.StayCategory> GetAll() { List <CLayer.StayCategory> staycategorylist = new List <CLayer.StayCategory>(); DataTable dt = Connection.GetSQLTable("SELECT *,(CASE WHEN (SELECT COUNT(*) FROM accommodation p WHERE p.StayCategoryId=c.CategoryId)>0 THEN 0 ELSE 1 END ) " + " AS CanDelete FROM staycategory c ORDER BY Title ASC"); foreach (DataRow dr in dt.Rows) { staycategorylist.Add(new CLayer.StayCategory() { CategoryId = Connection.ToLong(dr["CategoryId"]), Title = Connection.ToString(dr["Title"]), CanDelete = Connection.ToBoolean(dr["CanDelete"]) }); } return(staycategorylist); }
public List <CLayer.Country> GetAllForProperty() { DataTable dt = Connection.GetSQLTable("SELECT * FROM country Where ForProperty= 1 And Status = 1 order by IsDefault DESC,`Name`"); List <CLayer.Country> result = new List <CLayer.Country>(); foreach (DataRow dr in dt.Rows) { result.Add(new CLayer.Country() { CountryId = Connection.ToLong(dr["CountryId"]), Name = Connection.ToString(dr["Name"]), IsDefault = Connection.ToBoolean(dr["IsDefault"]), Status = Connection.ToInteger(dr["Status"]), ForProperty = Connection.ToBoolean(dr["ForProperty"]) }); } return(result); }
public List <CLayer.AccommodationType> GetAll() { List <CLayer.AccommodationType> typelist = new List <CLayer.AccommodationType>(); DataTable dt = Connection.GetTable("accommodationtype_GetAll"); foreach (DataRow dr in dt.Rows) { typelist.Add(new CLayer.AccommodationType() { AccommodationTypeId = Connection.ToInteger(dr["AccommodationTypeId"]), Title = Connection.ToString(dr["Title"]), CanDelete = Connection.ToBoolean(dr["CanDelete"]) }); } return(typelist); }
public CLayer.AccommodationFeature Get(int AccomodationFeatureID) { CLayer.AccommodationFeature roomtype = null; List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pFeatureId", DataPlug.DataType._BigInt, AccomodationFeatureID)); DataTable dt = Connection.GetTable("accommodationfeature_Get", param); if (dt.Rows.Count > 0) { roomtype = new CLayer.AccommodationFeature(); roomtype.AccommodationFeatureId = Connection.ToLong(dt.Rows[0]["AccommodationFeatureId"]); roomtype.Title = Connection.ToString(dt.Rows[0]["Title"]); roomtype.Style = Connection.ToString(dt.Rows[0]["Style"]); roomtype.Showfeatures = Connection.ToBoolean(dt.Rows[0]["IsShow"]); } return(roomtype); }
public CLayer.PropertyFeature Get(int PropertyFeatureId) { CLayer.PropertyFeature propertyfeature = null; List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pPropertyFeatureId", DataPlug.DataType._BigInt, PropertyFeatureId)); DataTable dt = Connection.GetTable("propertyfeature_Get", param); if (dt.Rows.Count > 0) { propertyfeature = new CLayer.PropertyFeature(); propertyfeature.PropertyFeatureId = Connection.ToLong(dt.Rows[0]["PropertyFeatureId"]); propertyfeature.Title = Connection.ToString(dt.Rows[0]["Title"]); propertyfeature.Style = Connection.ToString(dt.Rows[0]["Style"]); propertyfeature.Showfeatures = Connection.ToBoolean(dt.Rows[0]["IsShow"]); } return(propertyfeature); }
public List <CLayer.Mail> GetAllId(bool UnSubscribed) { List <CLayer.Mail> result = new List <CLayer.Mail>(); List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pUnsubscribed", DataPlug.DataType._Int, UnSubscribed)); DataTable dt = Connection.GetTable("subscribtions_getid", param); foreach (DataRow dr in dt.Rows) { result.Add(new CLayer.Mail() { Mailaddress = Connection.ToString(dr["EmailId"]), UnSubscribed = Connection.ToBoolean(dr["UnSubscribed"]), CreatedOn = Connection.ToDate(dr["CreatedOn"]) }); } return(result); }
public List <CLayer.RoomType> GetAll() { List <CLayer.RoomType> roomtypelist = new List <CLayer.RoomType>(); DataTable dt = Connection.GetSQLTable("SELECT *,(CASE WHEN (SELECT COUNT(*) FROM room rm WHERE rm.RoomTypeId=rt.RoomTypeId)>0 THEN 0 ELSE 1 END ) " + " AS CanDelete FROM roomtype rt ORDER BY Title ASC"); foreach (DataRow dr in dt.Rows) { roomtypelist.Add(new CLayer.RoomType() { RoomTypeId = Connection.ToInteger(dr["RoomTypeId"]), Title = Connection.ToString(dr["Title"]), CanDelete = Connection.ToBoolean(dr["CanDelete"]) }); } return(roomtypelist); }
public List <CLayer.Salutation> GetAll() { List <CLayer.Salutation> salutationlist = new List <CLayer.Salutation>(); DataTable dt = Connection.GetSQLTable("SELECT *,(CASE WHEN (SELECT COUNT(*) FROM user p WHERE p.SalutationId=c.SalutationId)>0 THEN 0 ELSE 1 END ) " + " AS CanDelete FROM salutation c ORDER BY Title ASC"); foreach (DataRow dr in dt.Rows) { salutationlist.Add(new CLayer.Salutation() { SalutationId = Connection.ToLong(dr["SalutationId"]), Title = Connection.ToString(dr["Title"]), CanDelete = Connection.ToBoolean(dr["CanDelete"]) }); } return(salutationlist); }
public List <CLayer.Country> GetAll() { DataTable dt = Connection.GetSQLTable("SELECT c.* FROM country c inner join state s on c.CountryId=s.CountryId where c.Status=1 group by c.CountryId order by IsDefault DESC,c.Name"); List <CLayer.Country> result = new List <CLayer.Country>(); foreach (DataRow dr in dt.Rows) { result.Add(new CLayer.Country() { CountryId = Connection.ToLong(dr["CountryId"]), Name = Connection.ToString(dr["Name"]), IsDefault = Connection.ToBoolean(dr["IsDefault"]), Status = Connection.ToInteger(dr["Status"]), ForProperty = Connection.ToBoolean(dr["ForProperty"]), Code = Connection.ToString(dr["Code"]) }); } return(result); }
public List <CLayer.PropertyFeature> GetAllSearch() { DataTable dt = Connection.GetSQLTable("SELECT *,(select count(*) from property_propertyfeature ppf where" + " ppf.PropertyFeatureId=propertyfeature.PropertyFeatureId) As candelete" + " FROM propertyfeature where IsShow=1 order by Title "); List <CLayer.PropertyFeature> result = new List <CLayer.PropertyFeature>(); foreach (DataRow dr in dt.Rows) { result.Add(new CLayer.PropertyFeature() { PropertyFeatureId = Connection.ToLong(dr["PropertyFeatureId"]), Title = Connection.ToString(dr["Title"]), Style = Connection.ToString(dr["Style"]), Showfeatures = Connection.ToBoolean(dr["IsShow"]), CanDelete = (Connection.ToInteger(dr["candelete"]) < 1) }); } return(result); }
public List <CLayer.AccommodationFeature> GetAll() { List <CLayer.AccommodationFeature> AccomodationFeaturelist = new List <CLayer.AccommodationFeature>(); DataTable dt = Connection.GetTable("accommodationfeature_GetAll"); foreach (DataRow dr in dt.Rows) { AccomodationFeaturelist.Add(new CLayer.AccommodationFeature() { AccommodationFeatureId = Connection.ToLong(dr["AccommodationFeatureId"]), Title = Connection.ToString(dr["Title"]), Style = Connection.ToString(dr["Style"]), CanDelete = !Connection.ToBoolean(dr["CanDelete"]), Showfeatures = Connection.ToBoolean(dr["IsShow"]), }); } return(AccomodationFeaturelist); }
public List <CLayer.BookingItemTax> GetAllByBookingItem(long bookingItemId) { string sql = "SELECT tt.Title,bt.Rate,bt.Amount,bt.OnGrandTotal FROM bookingitem_tax bt INNER JOIN tax t ON bt.TaxId = t.TaxId "; sql = sql + " INNER JOIN taxtitle tt ON t.TaxTitleId = tt.TaxTitleId Where bt.BookingItemId=" + bookingItemId.ToString(); DataTable dt = Connection.GetSQLTable(sql); List <CLayer.BookingItemTax> result = new List <CLayer.BookingItemTax>(); CLayer.BookingItemTax temp; foreach (DataRow dr in dt.Rows) { temp = new CLayer.BookingItemTax(); temp.Title = Connection.ToString(dr["Title"]); temp.OnGrandTotal = Connection.ToBoolean(dr["OnGrandTotal"]); temp.Amount = Connection.ToDouble(dr["Amount"]); temp.Rate = Connection.ToDouble(dr["Rate"]); result.Add(temp); } return(result); }
// // TODO Delete Country // public CLayer.Country Get(int CountryId) { CLayer.Country country = null; List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pCountryId", DataPlug.DataType._BigInt, CountryId)); DataTable dt = Connection.GetTable("country_Get", param); if (dt.Rows.Count > 0) { country = new CLayer.Country(); country.CountryId = Connection.ToLong(dt.Rows[0]["CountryId"]); country.Name = Connection.ToString(dt.Rows[0]["Name"]); country.IsDefault = Connection.ToBoolean(dt.Rows[0]["IsDefault"]); country.Status = Connection.ToInteger(dt.Rows[0]["Status"]); country.ForProperty = Connection.ToBoolean(dt.Rows[0]["ForProperty"]); country.Code = Connection.ToString(dt.Rows[0]["Code"]); } return(country); }
public List <CLayer.SupplierPayment> GetAllSupllierPaymentSearch(int status, string searchString, int searchItem, int userType, int start, int limit) { List <CLayer.SupplierPayment> users = new List <CLayer.SupplierPayment>(); 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("pUserType", DataPlug.DataType._Int, userType)); param.Add(Connection.GetParameter("pStart", DataPlug.DataType._Int, start)); param.Add(Connection.GetParameter("pLimit", DataPlug.DataType._Int, limit)); DataSet ds = Connection.GetDataSet("OfflineBookingSupplierpayment_GetSearch", param); foreach (DataRow dr in ds.Tables[1].Rows) { users.Add(new CLayer.SupplierPayment() { // Salutation = Connection.ToString(dr["Salutation"]), propertyname = Connection.ToString(dr["PropertyName"]), // 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"]), supplierPayment = Connection.ToBoolean(dr["supplierPayment"]), 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"]), // Status = Connection.ToInteger(dr["Status"]), // PANNo = Connection.ToString(dr["PANNo"]), // UserCode = Connection.ToString(dr["UserCode"]), TotalRows = Connection.ToLong(ds.Tables[0].Rows[0]["NumberOfRows"]) }); } return(users); }
public List <CLayer.AccommodationFeature> GetAllWithSelectedForAccommodation(long accommodationId) { List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pAccommodationId", DataPlug.DataType._BigInt, accommodationId)); DataTable dt = Connection.GetTable("accommodationfeature_GetAllForAccommodation", param); List <CLayer.AccommodationFeature> result = new List <CLayer.AccommodationFeature>(); foreach (DataRow dr in dt.Rows) { result.Add(new CLayer.AccommodationFeature() { AccommodationFeatureId = Connection.ToLong(dr["AccommodationFeatureId"]), Title = Connection.ToString(dr["Title"]), Style = Connection.ToString(dr["Style"]), IsUsed = Connection.ToBoolean(dr["Used"]) }); } return(result); }
public List <CLayer.RoomFeature> GetAll() { List <CLayer.RoomFeature> roomfeaturelist = new List <CLayer.RoomFeature>(); DataTable dt = Connection.GetSQLTable("SELECT rf.*,1 AS CanDelete, " + " rt.Title as RoomType FROM roomfeature rf inner join RoomType rt on rf.RoomTypeId=rt.RoomTypeId ORDER BY Title ASC"); foreach (DataRow dr in dt.Rows) { roomfeaturelist.Add(new CLayer.RoomFeature() { RoomFeatureId = Connection.ToLong(dr["RoomFeatureId"]), Title = Connection.ToString(dr["Title"]), RoomTypeId = Connection.ToInteger(dr["RoomTypeId"]), RoomType = Connection.ToString(dr["RoomType"]), CanDelete = Connection.ToBoolean(dr["CanDelete"]) }); } return(roomfeaturelist); }
public List <CLayer.PropertyFeature> GetAllWithSelectedForProperty(long propertyId) { List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pPropertyId", DataPlug.DataType._BigInt, propertyId)); DataTable dt = Connection.GetTable("propertyfeature_GetAllForProperty", param); List <CLayer.PropertyFeature> result = new List <CLayer.PropertyFeature>(); foreach (DataRow dr in dt.Rows) { result.Add(new CLayer.PropertyFeature() { PropertyFeatureId = Connection.ToLong(dr["PropertyFeatureId"]), Title = Connection.ToString(dr["Title"]), Style = Connection.ToString(dr["Style"]), IsUsed = Connection.ToBoolean(dr["Used"]) }); } return(result); }
// // TODO Delete Currency // public CLayer.Currency Get(string code) { CLayer.Currency currency = null; DataTable dt = Connection.GetSQLTable("Select * From currency Where Title like '" + code + "'"); if (dt.Rows.Count > 0) { currency = new CLayer.Currency(); currency.CurrencyId = Connection.ToLong(dt.Rows[0]["CurrencyId"]); currency.Title = Connection.ToString(dt.Rows[0]["Title"]); currency.Symbol = Connection.ToString(dt.Rows[0]["Symbol"]); currency.ConversionRate = Connection.ToDecimal(dt.Rows[0]["ConversionRate"]); currency.ConversionPercentage = Connection.ToDecimal(dt.Rows[0]["ConversionPercentage"]); currency.LastUpdate = Connection.ToDate(dt.Rows[0]["LastUpdate"]); currency.IsDefault = Connection.ToBoolean(dt.Rows[0]["IsDefault"]); currency.Status = Connection.ToInteger(dt.Rows[0]["Status"]); currency.Exchangecode = Connection.ToString(dt.Rows[0]["ExchgCode"]); } return(currency); }
public CLayer.City Get(int?cityId) { CLayer.City city = null; List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pCityId", DataPlug.DataType._Int, cityId)); DataTable dt = Connection.GetTable("city_Get", param); if (dt.Rows.Count > 0) { city = new CLayer.City() { CityId = Connection.ToInteger(dt.Rows[0]["CityId"]), Name = Connection.ToString(dt.Rows[0]["Name"]), StateId = Connection.ToInteger(dt.Rows[0]["StateId"]), ForListing = Connection.ToBoolean(dt.Rows[0]["ForListing"]), Keywords = Connection.ToString(dt.Rows[0]["Keywords"]) }; } return(city); }
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"]); rev.AccommodationCity = Connection.ToString(dt.Rows[0]["AccommodationCity"]); rev.Accessibility = Connection.ToInteger(dt.Rows[0]["Accessibilitytoproperty"]); rev.Easiness = Connection.ToInteger(dt.Rows[0]["EasinessInCheckIn"]); rev.CleanlinessBed = Connection.ToInteger(dt.Rows[0]["CleanlinessBedroom"]); rev.CleanlinessBath = Connection.ToInteger(dt.Rows[0]["CleanlinessBathroom"]); rev.SleepQuality = Connection.ToInteger(dt.Rows[0]["SleepQuality"]); rev.Staffbehave = Connection.ToInteger(dt.Rows[0]["StaffBehavior"]); rev.Considerfornext = Connection.ToInteger(dt.Rows[0]["ConsiderForNextTravel"]); rev.OverallExp = Connection.ToInteger(dt.Rows[0]["OverallExperience"]); } return(rev); }
public List <CLayer.Tax> GetStandardOnly() { List <CLayer.Tax> result = new List <CLayer.Tax>(); DataTable dt = Connection.GetTable("tax_GetStandardOnly", null); foreach (DataRow dr in dt.Rows) { result.Add(new CLayer.Tax() { TaxId = Connection.ToInteger(dt.Rows[0]["TaxId"]), Title = Connection.ToString(dt.Rows[0]["Title"]), Rate = Connection.ToDecimal(dt.Rows[0]["Title"]), CountryId = Connection.ToInteger(dt.Rows[0]["CountryId"]), StateId = Connection.ToInteger(dt.Rows[0]["StateId"]), Description = Connection.ToString(dt.Rows[0]["Description"]), Notes = Connection.ToString(dt.Rows[0]["Notes"]), IsStandard = Connection.ToBoolean(dt.Rows[0]["IsStandard"]), Status = Connection.ToInteger(dt.Rows[0]["Status"]) }); } return(result); }
public CLayer.Tax Get(int taxId) { CLayer.Tax result = null; List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pTaxId", DataPlug.DataType._Int, taxId)); DataTable dt = Connection.GetTable("tax_Get", param); if (dt.Rows.Count > 0) { result = new CLayer.Tax() { TaxId = Connection.ToInteger(dt.Rows[0]["TaxId"]), Title = Connection.ToString(dt.Rows[0]["Title"]), TaxTitleId = Connection.ToInteger(dt.Rows[0]["TaxTitleId"]), Rate = Connection.ToDecimal(dt.Rows[0]["Rate"]), CountryId = Connection.ToInteger(dt.Rows[0]["CountryId"]), Country = Connection.ToString(dt.Rows[0]["CountryName"]), StateId = Connection.ToInteger(dt.Rows[0]["StateId"]), State = Connection.ToString(dt.Rows[0]["StateName"]), CityId = Connection.ToInteger(dt.Rows[0]["CityId"]), City = Connection.ToString(dt.Rows[0]["CityName"]), Notes = Connection.ToString(dt.Rows[0]["Notes"]), Status = Connection.ToInteger(dt.Rows[0]["Status"]), StartDate = Connection.ToDate(dt.Rows[0]["StartDate"]), EndDate = Connection.ToDate(dt.Rows[0]["EndDate"]), OnDate = Connection.ToInteger(dt.Rows[0]["OnDate"]), OnTotalAmount = Connection.ToBoolean(dt.Rows[0]["OnTotalAmount"]), PriceUpto = Connection.ToDecimal(dt.Rows[0]["PriceUpto"]), UpdatedBy = Connection.ToLong(dt.Rows[0]["UpdatedBy"]), UpdatedDate = Connection.ToDate(dt.Rows[0]["UpdatedDate"]), Unlimited = Connection.ToBoolean(dt.Rows[0]["UnlimitedPrice"]) }; } return(result); }
public CLayer.Testimonial Get(int TestimonialId) { CLayer.Testimonial testimonial = null; List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pTestimonialId", DataPlug.DataType._BigInt, TestimonialId)); DataTable dt = Connection.GetTable("testimonial_Get", param); if (dt.Rows.Count > 0) { testimonial = new CLayer.Testimonial(); testimonial.TestimonialId = Connection.ToLong(dt.Rows[0]["TestimonialId"]); testimonial.Description = Connection.ToString(dt.Rows[0]["Description"]); testimonial.Picture = Connection.ToString(dt.Rows[0]["Picture"]); testimonial.Status = Connection.ToInteger(dt.Rows[0]["Status"]); testimonial.Title = Connection.ToString(dt.Rows[0]["Title"]); testimonial.Name = Connection.ToString(dt.Rows[0]["Name"]); testimonial.Company = Connection.ToString(dt.Rows[0]["Company"]); testimonial.ShowInWidget = Connection.ToBoolean(dt.Rows[0]["ShowInWidget"]); } return(testimonial); }
public List <CLayer.Currency> GetAll() { DataTable dt = Connection.GetSQLTable("SELECT * FROM currency order by IsDefault DESC,Title"); List <CLayer.Currency> result = new List <CLayer.Currency>(); foreach (DataRow dr in dt.Rows) { result.Add(new CLayer.Currency() { CurrencyId = Connection.ToLong(dr["CurrencyId"]), Title = Connection.ToString(dr["Title"]), Symbol = Connection.ToString(dr["Symbol"]), ConversionRate = Connection.ToDecimal(dr["ConversionRate"]), ConversionPercentage = Connection.ToDecimal(dr["ConversionPercentage"]), LastUpdate = Connection.ToDate(dr["LastUpdate"]), IsDefault = Connection.ToBoolean(dr["IsDefault"]), Status = Connection.ToInteger(dr["Status"]), Exchangecode = Connection.ToString(dr["ExchgCode"]) }); } return(result); }
public CLayer.Currency Get(int CurrencyId) { CLayer.Currency currency = null; List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pCurrencyId", DataPlug.DataType._BigInt, CurrencyId)); DataTable dt = Connection.GetTable("currency_Get", param); if (dt.Rows.Count > 0) { currency = new CLayer.Currency(); currency.CurrencyId = Connection.ToLong(dt.Rows[0]["CurrencyId"]); currency.Title = Connection.ToString(dt.Rows[0]["Title"]); currency.Symbol = Connection.ToString(dt.Rows[0]["Symbol"]); currency.ConversionRate = Connection.ToDecimal(dt.Rows[0]["ConversionRate"]); currency.ConversionPercentage = Connection.ToDecimal(dt.Rows[0]["ConversionPercentage"]); currency.LastUpdate = Connection.ToDate(dt.Rows[0]["LastUpdate"]); currency.IsDefault = Connection.ToBoolean(dt.Rows[0]["IsDefault"]); currency.Status = Connection.ToInteger(dt.Rows[0]["Status"]); currency.Exchangecode = Connection.ToString(dt.Rows[0]["ExchgCode"]); } return(currency); }
public List <CLayer.Testimonial> GetAll(int status) { List <CLayer.Testimonial> testimonial = new List <CLayer.Testimonial>(); DataTable dt = Connection.GetSQLTable("SELECT * FROM testimonial WHERE `Status`=" + status.ToString()); foreach (DataRow dr in dt.Rows) { testimonial.Add(new CLayer.Testimonial() { TestimonialId = Connection.ToLong(dr["TestimonialId"]), Description = Connection.ToString(dr["Description"]), Picture = Connection.ToString(dr["Picture"]), Status = Connection.ToInteger(dr["Status"]), Title = Connection.ToString(dr["Title"]), Name = Connection.ToString(dr["Name"]), Company = Connection.ToString(dr["Company"]), ShowInWidget = Connection.ToBoolean(dr["ShowInWidget"]) }); } return(testimonial); }
public List <CLayer.Tax> GetAllByTaxtTitleId(int taxtitleId) { List <CLayer.Tax> result = new List <CLayer.Tax>(); List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pTaxTitleId", DataPlug.DataType._Int, taxtitleId)); DataTable dt = Connection.GetTable("tax_GetAllByTaxTitleId", param); 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); }