public void Show_Gridview() { DAL.User user = new DAL.User(); var ds = user.Select(); if (ds == null) { return; } dataGridView1.DataSource = user.Select().Tables[0]; }
private void login_page_english_Load(object sender, EventArgs e) { this.MinimumSize = this.Size; this.MaximumSize = this.Size; MyControls.Helper.Numeric(txtAmount); cmbAccountNumber.DataSource = user.Select().Tables[0]; cmbAccountNumber.DisplayMember = "id"; cmbAccountNumber.ValueMember = "id"; cmbAccountNumber.SelectedValue = -1; }
private void login_page_english_Load(object sender, EventArgs e) { this.MinimumSize = this.Size; this.MaximumSize = this.Size; ToolTip t = new ToolTip(); t.SetToolTip(pictureBox2, "Logout"); DAL.User user = new DAL.User(); cmbView_account_info.DataSource = user.Select().Tables[0]; cmbView_account_info.DisplayMember = "id"; cmbView_account_info.ValueMember = "id"; cmbView_account_info.SelectedValue = -1; txtName.Text += Name; Show_Gridview(); }
public string Login(string username, string password) { string message = SystemVar.Exception; try { T_User user = dalUser.Login(new T_User { F_UserName = username }, out message); if (user == null) { if (message.Equals(SystemVar.Success)) { return(SystemVar.NoData); } else { return(SystemVar.Exception); } } else { user = dalUser.Select(user); if (user.F_PassWord.Equals(password)) { return(SystemVar.Success); } else { return(SystemVar.Failure); } } } catch (Exception exc) { LogHelper.log.Fatal("DAL层" + this.GetType().ToString() + "Login方法异常,异常信息为:" + exc.Message);//异常,致命错误 return(SystemVar.Failure); } }