예제 #1
0
 public void Update(Vote_Mapping instance)
 {
     if (instance == null)
     {
         throw new ArgumentNullException();
     }
     this._repository.Update(instance);
 }
예제 #2
0
 public string Create(Vote_Mapping instance)
 {
     if (instance == null)
     {
         throw new ArgumentNullException();
     }
     return(this._repository.Create(instance));
 }
예제 #3
0
        /// <summary>
        /// insert vote data
        /// </summary>
        /// <param name="Id">login Id</param>
        /// <param name="className">which vote class</param>
        /// <param name="fK_Vote_ItemCatalogId">vote item</param>
        /// <returns></returns>
        public bool InsertVote_Mapping(int Id, string className, List <int> fK_Vote_ItemCatalogId)
        {
            bool _Success = false;

            foreach (int v in fK_Vote_ItemCatalogId)
            {
                Vote_Mapping _Vote_Mapping = new Vote_Mapping();
                _Vote_Mapping.FK_Vote_ItemCatalogId = v;
                _Vote_Mapping.FK_LoginId            = Id;
                _Vote_Mapping.ClassName             = className;
                this._vote_MappingService.Create(_Vote_Mapping);
            }
            _Success = true;
            return(_Success);
        }