Exemplo n.º 1
0
 public UserEditVM(IPageService pageService)
 {
     Initialize();
     _pageService  = pageService;
     EditCommand   = new Command(async() => await Edit(), () => NotEmpty() && User != null);
     SearchCommand = new Command(async() => await Search(), () => SearchLogin.Replace(" ", "") != string.Empty);
     RemoveCommand = new Command(async() => await Remove(), () => NotEmpty() && User != null);
 }
Exemplo n.º 2
0
        public ActionResult chkLogin(SearchLogin log)
        {
            con.ConnectionString = "Data Source=DESKTOP-HKD1BEO\\SQLEXPRESS;Initial Catalog=BookStore;Integrated Security=True";


            con.Open();
            cmd.Connection = con;

            cmd.CommandText = "select * from Login where UserName='******' and Password='******'";

            dr = cmd.ExecuteReader();

            if (dr.Read())
            {
                con.Close();
                return(View("DashBoard"));
            }
            else
            {
                con.Close();
                return(View("Invalid"));
            }
        }