예제 #1
0
        public EditUser(DAL.spUser _user, string Conn)
        {
            InitializeComponent();

            if (string.IsNullOrEmpty(Conn))
                throw new ArgumentNullException("connection");
            connection = Conn;

            de = new DataEntry(connection);
            db = new SBPayrollDBEntities(connection);
            rep = new Repository(connection);
            user = _user;
        }
예제 #2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (dataGridViewUsers.SelectedRows.Count != 0)
     {
         try
         {
             DAL.spUser     user = (DAL.spUser)bindingSourceUsers.Current;
             Forms.EditUser f    = new Forms.EditUser(user, connection)
             {
                 Owner = this
             };
             f.Text = user.UserName.ToString().Trim().ToUpper();
             f.ShowDialog();
         }
         catch (Exception ex)
         {
             Utils.ShowError(ex);
         }
     }
 }
예제 #3
0
 public void UpdateUser(DAL.spUser user, string password, int roleid, bool locked)
 {
     rep.UpdateUser(user, password, roleid, locked);
 }