Exemple #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)
     {
     }
 }
Exemple #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)
     {
     }
  
 }
 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();
 }
Exemple #4
0
 partial void DeleteVoteDetail(VoteDetail instance);
Exemple #5
0
 partial void UpdateVoteDetail(VoteDetail instance);
Exemple #6
0
 partial void InsertVoteDetail(VoteDetail instance);
 partial void DeleteVoteDetail(VoteDetail instance);
 partial void UpdateVoteDetail(VoteDetail instance);
 partial void InsertVoteDetail(VoteDetail instance);