Esempio n. 1
0
        /// <summary>
        /// 根据用户所玩游戏信息获取相应成就信息
        /// </summary>
        /// <param name="gameInfo">包含(用户id,游戏名字,游戏表)的信息</param>
        /// <returns>成就信息</returns>
        public static AchieveInfo GetAllAchieveByID(GameInfo gameInfo)
        {
            ISqlMapper  mapper      = GetSqlMapper.GetMapper();
            AchieveInfo achieveInfo = null;

            try
            {
                mapper.BeginTransaction();
                achieveInfo = mapper.QueryForObject <AchieveInfo>("GetAllAchieveByID", gameInfo);
                mapper.CommitTransaction();
            }
            catch { }

            return(achieveInfo);
        }
Esempio n. 2
0
        public ChangeInfo(AchieveInfo ai)
        {
            this.ai=ai;
            achI = new AchieveInfoINot()
            {
                aName = ai.Name,
                aDate = ai.Date,
                aPoints = ai.Points,
                aSubscribe = ai.Subscribe,
            };
            InitializeComponent();
            CreateDelegates();
            ComboBoxFill();
            DataContext = achI;

            
            ComboBoxTheme.SelectedValue = ai.Theme.Name;
            ComboBoxSubtheme.SelectedValue=ai.Subtheme.Name;
           
        }
 void Read()
 {
     Hashtable tb = new Hashtable();
     ParseData(table, tb);
     foreach (DictionaryEntry t in tb)
     {
         AchieveInfo info = new AchieveInfo();
         int key = new int();
         Hashtable value = (Hashtable)t.Value;
         info.id = ParseTableValueToInt(value["ID"]);
         info.name = ParseTableValueToString(value["Name"]);
         info.type = (AchieveType)ParseTableValueToInt(value["Type"]);
         info.level = ParseTableValueToString(value["Level"]);
         info.goal = ParseTableValueToInt(value["Goal"]);
         info.DescriptionID = ParseTableValueToInt(value["DescriptionID"]);
         info.Description = ParseTableValueToString(value["Description"]);
         info.IconName = ParseTableValueToString(value["IconName"]);
         key = info.id;
         mAchieveDictionary.Add(key, info);
     }
 }
Esempio n. 4
0
    void Read()
    {
        Hashtable tb = new Hashtable();

        ParseData(table, tb);
        foreach (DictionaryEntry t in tb)
        {
            AchieveInfo info  = new AchieveInfo();
            int         key   = new int();
            Hashtable   value = (Hashtable)t.Value;
            info.id            = ParseTableValueToInt(value["ID"]);
            info.name          = ParseTableValueToString(value["Name"]);
            info.type          = (AchieveType)ParseTableValueToInt(value["Type"]);
            info.level         = ParseTableValueToString(value["Level"]);
            info.goal          = ParseTableValueToInt(value["Goal"]);
            info.DescriptionID = ParseTableValueToInt(value["DescriptionID"]);
            info.Description   = ParseTableValueToString(value["Description"]);
            info.IconName      = ParseTableValueToString(value["IconName"]);
            key = info.id;
            mAchieveDictionary.Add(key, info);
        }
    }