public List <CLayer.Tax> GetOnStatus(CLayer.ObjectStatus.StatusType status) { List <CLayer.Tax> result = new List <CLayer.Tax>(); List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pStatus", DataPlug.DataType._Int, (int)status)); DataTable dt = Connection.GetTable("tax_GetOnStatus", 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 void SetStatus(int taxId, CLayer.ObjectStatus.StatusType status) { List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pTaxId", DataPlug.DataType._Int, taxId)); param.Add(Connection.GetParameter("pStatus", DataPlug.DataType._Int, (int)status)); Connection.ExecuteQueryScalar("tax_SetStatus", param); return; }
public long CreateGuest(string email, string phone, CLayer.ObjectStatus.StatusType userStatus, CLayer.Role.Roles userRole, CLayer.Address.AddressTypes addrType) { //`(pEmail VARCHAR(200),pPhone VARCHAR(20),pStatus INT, pToken VARCHAR(100),pUType INT,pAType INT) List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pEmail", DataPlug.DataType._Varchar, email)); param.Add(Connection.GetParameter("pPhone", DataPlug.DataType._Varchar, phone)); param.Add(Connection.GetParameter("pStatus", DataPlug.DataType._Int, (int)userStatus)); param.Add(Connection.GetParameter("pUType", DataPlug.DataType._Int, (int)userRole)); param.Add(Connection.GetParameter("pToken", DataPlug.DataType._Varchar, Guid.NewGuid().ToString())); param.Add(Connection.GetParameter("pAType", DataPlug.DataType._Int, (int)addrType)); object obj = Connection.ExecuteQueryScalar("user_CreateGuest", param); return(Connection.ToLong(obj)); }
//OfferList for Admin public List <CLayer.Offers> GetAllBySatus(CLayer.ObjectStatus.StatusType Status, int Start, int Limit) { List <CLayer.Offers> offer = new List <CLayer.Offers>(); List <DataPlug.Parameter> param = new List <DataPlug.Parameter>(); param.Add(Connection.GetParameter("pStatus", DataPlug.DataType._BigInt, Status)); param.Add(Connection.GetParameter("pStart", DataPlug.DataType._Int, Start)); param.Add(Connection.GetParameter("pLimit", DataPlug.DataType._Int, Limit)); DataSet ds = Connection.GetDataSet("offer_GetByStatusAll", param); foreach (DataRow dr in ds.Tables[1].Rows) { offer.Add(new CLayer.Offers() { OfferId = Connection.ToLong(dr["OfferId"]), NoOfDays = Connection.ToInteger(dr["NoOfDays"]), StartDate = Connection.ToDate(dr["StartDate"]), EndDate = Connection.ToDate(dr["EndDate"]), Status = Connection.ToInteger(dr["Status"]), AccommodationId = Connection.ToLong(dr["AccommodationId"]), Amount = Connection.ToDecimal(dr["Amount"]), OfferFor = Connection.ToInteger(dr["OfferFor"]), RateType = Connection.ToInteger(dr["RateType"]), SBCommission = Connection.ToDecimal(dr["SBCommission"]), OfferTitle = Connection.ToString(dr["OfferTitle"]), FreeDays = Connection.ToInteger(dr["FreeDays"]), PropertyId = Connection.ToLong(dr["PropertyId"]), OfferType = Connection.ToInteger(dr["OfferType"]), StayCategoryId = Connection.ToInteger(dr["StayCategoryId"]), //Display Title = Connection.ToString(dr["Title"]), Location = Connection.ToString(dr["Location"]), Address = Connection.ToString(dr["Address"]), TotalRows = Connection.ToLong(ds.Tables[0].Rows[0]["NumberOfRows"]) }); } return(offer); }
public void SetStatus(int taxId, CLayer.ObjectStatus.StatusType status) { DataLayer.Tax task = new DataLayer.Tax(); task.SetStatus(taxId, status); return; }
public List <CLayer.Tax> GetOnStatus(CLayer.ObjectStatus.StatusType status) { DataLayer.Tax task = new DataLayer.Tax(); return(task.GetOnStatus(status)); }
public static int SetStatus(long propertyId, CLayer.ObjectStatus.StatusType status) { DataLayer.Property property = new DataLayer.Property(); return(property.SetStatus(propertyId, status)); }
public void SetStatus(long bookingItemId, CLayer.ObjectStatus.StatusType status) { string sql = "Update bookingitems Set Status=" + ((int)status).ToString() + " Where BookingItemId=" + bookingItemId.ToString(); Connection.ExecuteSqlQuery(sql); }
public static void SetStatus(long bookingItemId, CLayer.ObjectStatus.StatusType status) { DataLayer.BookingItem bi = new DataLayer.BookingItem(); bi.SetStatus(bookingItemId, status); }
//###Offer List Active or out of date public static List <CLayer.Offers> GetAllByStatus(CLayer.ObjectStatus.StatusType status, int Start, int Limit) { DataLayer.Offers Offer = new DataLayer.Offers(); return(Offer.GetAllBySatus(status, Start, Limit)); }