/// <summary> /// 遍历普通枚举 /// </summary> /// <returns></returns> public static void ForEachEnum() { foreach (string Type in Enum.GetNames(typeof(shopInfo))) { shopInfo type = (shopInfo)Enum.Parse(typeof(shopInfo), Type); string Key = type.ToString(); string EnumValue = type.GetHashCode().ToString(); } }
private static shopInfo ConvertFromDto(HotelInfoDto hotelDto) { if (hotelDto == null) { return(null); } shopInfo user = new shopInfo() { Shop_Address = hotelDto.HAddress, Shop_chuanzen = hotelDto.HFax, id = hotelDto.HID, Shop_x = hotelDto.HLocationX.ToString(), Shop_y = hotelDto.HLocationY.ToString(), shop_Name = hotelDto.HName, Shop_Telphone = hotelDto.HPhone, Shop_Remaker = hotelDto.Remark, Shop_date = hotelDto.CreateTime }; return(user); }
private static HotelInfoDto ConvertFromBllEntity(shopInfo shop) { if (shop == null) { return(null); } HotelInfoDto accountDto = new HotelInfoDto() { HAddress = shop.Shop_Address, HFax = shop.Shop_chuanzen, HID = shop.id, HLocationX = float.Parse(shop.Shop_x), HLocationY = float.Parse(shop.Shop_y), HName = shop.shop_Name, HPhone = shop.Shop_Telphone, Remark = shop.Shop_Remaker, CreateTime = shop.Shop_date.Value }; return(accountDto); }
/// <summary> /// 根据枚举Key 获取枚举的序号 /// </summary> /// <returns></returns> public static void ForEachEnum(shopInfo parm) { shopInfo type = parm; string Key = type.ToString(); string EnumValue = type.GetHashCode().ToString(); }