private string ValidData1(string usnm) { DataClassesDataContext ob = new DataClassesDataContext(); Student_Master SM = new Student_Master(); Login_Master LM = new Login_Master(); Issued_Master IM = new Issued_Master(); string bn = "S"; var data1 = from a in ob.Login_Masters where a.UserName == usnm select new { usnm = a.UserName }; foreach (var d in data1) { bn = "F"; usnm = d.usnm; } return(bn); }
private string ValidData(string rolno) { DataClassesDataContext ob = new DataClassesDataContext(); Student_Master SM = new Student_Master(); Login_Master LM = new Login_Master(); Issued_Master IM = new Issued_Master(); string bn = "S"; var data = from a in ob.Student_Masters where a.Roll_No == rolno select new { rolno = a.Roll_No }; foreach (var d in data) { bn = "F"; rolno = d.rolno; } return(bn); }