public List <SqlParameter> SetValuesInRoomType(RoomTypeInfo roomtype) { List <SqlParameter> sqlParam = new List <SqlParameter>(); if (roomtype.RoomTypeId != 0) { sqlParam.Add(new SqlParameter("RoomTypeId", roomtype.RoomTypeId)); } else { sqlParam.Add(new SqlParameter("CreatedDate", roomtype.CreatedDate)); sqlParam.Add(new SqlParameter("CreatedBy", roomtype.CreatedBy)); } sqlParam.Add(new SqlParameter("RoomTypeName", roomtype.RoomTypeName)); Logger.Debug("RoomType Controller RoomTypeName:" + roomtype.RoomTypeName); sqlParam.Add(new SqlParameter("@IsActive", roomtype.IsActive)); Logger.Debug("RoomType Controller IsActive:" + roomtype.IsActive); sqlParam.Add(new SqlParameter("UpdatedBy", roomtype.UpdatedBy)); sqlParam.Add(new SqlParameter("UpdatedDate", roomtype.UpdatedDate)); return(sqlParam); }
public static List <BuildingData> ImportMesh(TextAsset asset) { List <BuildingData> buildingDatas = new List <BuildingData>(); APIResponse apiResponse = JsonUtility.FromJson <APIResponse>(asset.text); List <BuildingInfo> buildingInfos = apiResponse.data; for (int i = 0; i < buildingInfos.Count; i++) { BuildingData buildingData = new BuildingData(); for (int j = 0; j < buildingInfos[i].roomtypes.Count; j++) { RoomTypeInfo roomtype = buildingInfos[i].roomtypes[j]; for (int k = 0; k < roomtype.coordinatesBase64s.Count; k++) { string coordinatesString = roomtype.coordinatesBase64s[k]; byte[] bytes = Convert.FromBase64String(coordinatesString); float[] floats = new float[bytes.Length / 4]; for (int l = 0; l < bytes.Length / 4; l++) { floats[l] = BitConverter.ToSingle(bytes, l * 4); } buildingData.AddVertices(floats); } } buildingData.GenerateMesh(); buildingData.SetMetaData(buildingInfos[i].meta); buildingDatas.Add(buildingData); } return(buildingDatas); }
public RoomTypeInfo GetRoomTypeValues(DataRow dr) { RoomTypeInfo retVal = new RoomTypeInfo(); retVal.RoomTypeId = Convert.ToInt32(dr["RoomTypeId"]); retVal.RoomTypeName = Convert.ToString(dr["RoomTypeName"]); return(retVal); }
public RoomTypeViewModel() { RoomType = new RoomTypeInfo(); RoomTypes = new List <RoomTypeInfo>(); Filter = new RoomTypeFilter(); Pager = new PaginationInfo(); FriendlyMessage = new List <FriendlyMessage>(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { rtCount = rtbll.GetModelList("").Count; if (rtCount % 3 == 0) { rtMaxPage = rtCount / 3; } else { rtMaxPage = rtCount / 3 + 1; } } // 页面加载时获取房型信息 if (!string.IsNullOrEmpty(Request["postTag"])) { if (Request["postTag"] == "load") { string sqlStrByPage = "select * from (" + " select ROW_NUMBER() over(order by RoomType ASC) AS Row, *" + " from RoomTypeInfo) T where T.Row between 1 and 3"; Response.Write(Get_Serialize_Data_FromSql(connectString, sqlStrByPage)); Response.End(); } } // Ajax分页查询房型信息 if (!string.IsNullOrEmpty(Request["postTag"])) { if (Request["postTag"] == "rtByPage") { rtNowPage = int.Parse(Request["rtNowPage"]); StringBuilder sqlPage = new StringBuilder(); sqlPage.AppendFormat("select * from (" + " select ROW_NUMBER() over(order by RoomType ASC) AS Row, *" + " from RoomTypeInfo) T where T.Row between {0} and {1}", (rtNowPage - 1) * 3 + 1, rtNowPage * 3); Response.Write(Get_Serialize_Data_FromSql(connectString, sqlPage.ToString())); Response.End(); } } // update if (!string.IsNullOrEmpty(Request["postTag"])) { if (Request["postTag"] == "update") { int roomtype = int.Parse(Request["roomtype"]); int bedtype = int.Parse(Request["bedtype"]); string syno = Request["syno"]; RoomTypeInfo rt = rtbll.GetModel(roomtype, bedtype); rt.Syno = syno; Response.Write(rtbll.Update(rt) ? 1 : 0); Response.End(); } } }
public void Update(RoomTypeInfo roomtype) { _sqlHelper.ExecuteNonQuery(SetValuesInRoomType(roomtype), Storeprocedures.spUpdateRoomType.ToString(), CommandType.StoredProcedure); }
public int Insert(RoomTypeInfo roomtype) { return(Convert.ToInt32(_sqlHelper.ExecuteScalerObj(SetValuesInRoomType(roomtype), Storeprocedures.spInsertRoomType.ToString(), CommandType.StoredProcedure))); }
public LohanaPackageTariffSearchViewModel() { FriendlyMessage = new List <FriendlyMessage>(); LohanaPackageTariffSearch = new LohanaPackageTariffSearchInfo(); LohanaPackageTariffSearchList = new List <LohanaPackageTariffSearchInfo>(); LohanaPackageTariffRoot = new LohanaPackageTariffRootInfo(); LohanaPackageTariffRootList = new List <LohanaPackageTariffRootInfo>(); LohanaPackageTariff = new LohanaPackageTariffInfo(); LohanaPackageTariffList = new List <LohanaPackageTariffInfo>(); HotelTariff = new HotelTariffInfo(); HotelTariffs = new List <HotelTariffInfo>(); PackageType = new PackageTypeInfo(); PackageTypes = new List <PackageTypeInfo>(); Hotel = new HotelInfo(); Hotels = new List <HotelInfo>(); RoomType = new RoomTypeInfo(); Cities = new List <CityInfo>(); City = new CityInfo(); Pager = new PaginationInfo(); HotelTariffDate = new HotelTariffDateDetailsInfo(); HotelTariffDates = new List <HotelTariffDateDetailsInfo>(); HotelTariffDuration = new HotelTariffDurationDetailsInfo(); HotelTariffDurations = new List <HotelTariffDurationDetailsInfo>(); HotelTariffPrice = new HotelTariffPriceDetailsInfo(); HotelTariffPrices = new List <HotelTariffPriceDetailsInfo>(); HotelTariffRoom = new HotelTariffRoomDetailsInfo(); HotelTariffRooms = new List <HotelTariffRoomDetailsInfo>(); LohanaPackageTariffSearchRoomList = new List <LohanaPackageTariffSearchInfo>(); LohanaPackageTariffSearchExtraChildList = new List <LohanaPackageTariffSearchInfo>(); LohanaPackageTariffSearchExtraList = new List <LohanaPackageTariffSearchInfo>(); LohanaPackageTariffSearchFilter = new LohanaPackageTariffSearchInfo(); LohanaPackageTariffSearchFilterList = new List <LohanaPackageTariffSearchInfo>(); LohanaPackageItienaryList = new List <LohanaPackageTariffSearchInfo>(); Enquiry = new EnquiryInfo(); }