Exemplo n.º 1
0
        public void AcceptCandidateMemberShip(int Ids)
        {
            tblvoter k = con.da.tblvoters.Where(x => x.Id == Ids).FirstOrDefault();

            if (k != null)
            {
                k.IsActive = true;
            }
            con.da.SubmitChanges();
        }
Exemplo n.º 2
0
 public static int AddVoter(tblvoter voter)
 {
     try
     {
         using (var objdata = new DataClasses1DataContext())
         {
             voter.IsActive = true;
             voter.Crdt     = DateTime.Now;
             voter.Updt     = DateTime.Now;
             objdata.tblvoters.InsertOnSubmit(voter);
             objdata.SubmitChanges();
             return(1);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }