Example #1
0
 public VoteModel(VoteDetail VoteDetail)
 {
     try
     {
         Voter      = m_internetDc.Voters.First(v => v.IdentityNo == VoteDetail.IdentityNo);
         Election   = m_merkezDc.Elections.First(e => e.ElectionId == VoteDetail.ElectionId);
         Region     = m_merkezDc.Regions.First(r => r.RegionId == VoteDetail.RegionId.Value);
         District   = m_merkezDc.Districts.First(d => d.DistrictId == VoteDetail.DistrictId.Value);
         VotingDate = VoteDetail.VotingDate.Value;
     }
     catch (Exception)
     {
     }
 }
Example #2
0
 public VoteModel(VoteDetail VoteDetail)
 {
     try
     {
         Voter = m_internetDc.Voters.First(v => v.IdentityNo == VoteDetail.IdentityNo);
         Election = m_merkezDc.Elections.First(e => e.ElectionId == VoteDetail.ElectionId);
         Region = m_merkezDc.Regions.First(r => r.RegionId == VoteDetail.RegionId.Value);
         District = m_merkezDc.Districts.First(d => d.DistrictId == VoteDetail.DistrictId.Value);
         VotingDate = VoteDetail.VotingDate.Value;
     }
     catch (Exception)
     {
     }
  
 }
Example #3
0
 public ActionResult Votedetails(VoteDetail model)
 {
     var IdentityNo = Request.Form["IdentityNo"];
     List<VoteModel> votes = null;
     try
     {
         if (m_internetDc.VoteDetails.Any(h => h.IdentityNo == IdentityNo.ToString()))
         {
             votes = new List<VoteModel>();
             foreach (var vote in m_internetDc.VoteDetails.Where(h => h.IdentityNo == IdentityNo.ToString()).ToList())
             {
                 votes.Add(new VoteModel(vote));
             }
         }
         ViewData["Votes"] = votes;
     }
     catch(Exception exp)
     {}
     ViewData["Message"] = "Seçmene ait oy kaydı bulunmuyor...";
     return View();
 }
Example #4
0
 partial void DeleteVoteDetail(VoteDetail instance);
Example #5
0
 partial void UpdateVoteDetail(VoteDetail instance);
Example #6
0
 partial void InsertVoteDetail(VoteDetail instance);
Example #7
0
 partial void DeleteVoteDetail(VoteDetail instance);
Example #8
0
 partial void UpdateVoteDetail(VoteDetail instance);
Example #9
0
 partial void InsertVoteDetail(VoteDetail instance);