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(); }
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; } }