Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.
1st set Works but wrong variable... var dbTimeClockPlus = new TimeClockPlusDataContext(); var SearchInfo = (from c in dbTimeClockPlus.EmployeeLists where c.Suspend == false select c.RecordId).FirstOrDefault(); Random r = new Random(); int RcdId = SearchInfo == 0 ? 1 : SearchInfo; RcdId = r.Next(1, RcdId); txtRcdId.Text = Convert.ToString(RcdId); 2nd set - Correct variable but get several errors regarding conversion from double to int. var dbTimeClockPlus = new TimeClockPlusDataContext(); double EmpNo = (from c in dbTimeClockPlus.EmployeeLists where c.Suspend == false select c.EmployeeId).FirstOrDefault(); Random r = new Random(); double EmpId = EmpNo == 0 ? 1 : EmpNo; EmpId = r.Next(1, EmpId); txtEmpNo.Text = EmpId;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.