public static Login_Table SendType(Login_Table L)
        {
            var l = from v in T.Login_Table
                    where v.User_ID == L.User_ID && v.Password == v.Password
                    select v;

            return(l.First());
        }
Example #2
0
        //insert selected values to Login_Table during registration
        public static regValidation insertLogin(regValidation C)
        {
            try
            {
                Login_Table l = new Login_Table();
                l.User_ID  = C.CustomeriD;
                l.Password = C.Password;
                l.UserType = "Customer";
                T.Login_Table.Add(l);
                T.SaveChanges();

                return(C);
            }
            catch (DbUpdateException E)
            {
                SqlException ex = E.GetBaseException() as SqlException;
            }
            return(null);
        }