private double GetNewVersionNumber(tblUser user)
        {
            try
            {
                List<double> versions = new List<double>();

                foreach (var q in dc.tblLogs.Select(z => z.LOG_VERSION))
                {
                    double ver = 0;
                    double.TryParse(q, out ver);
                    versions.Add(ver);
                }
                return versions.Max();
            }
            catch { return 0; }
        }
Beispiel #2
0
 partial void DeletetblUser(tblUser instance);
Beispiel #3
0
 partial void UpdatetblUser(tblUser instance);
Beispiel #4
0
 partial void InserttblUser(tblUser instance);
        private void ChangeUserNameForm_Load(object sender, EventArgs e)
        {

           User = dc.tblUsers.Where(z => z.ID == _admin.UserID).First();
           usernameInputTextbox.Text = User.USER_NAME;
        }
 partial void DeletetblUser(tblUser instance);
 partial void UpdatetblUser(tblUser instance);
 partial void InserttblUser(tblUser instance);
        private void CreateNewUserIfNotExist()
        {

            if (!dc.tblUsers.Any(z => z.USER_MACADRESS == mac))
            {
                var user = new tblUser
                {
                    USER_NAME = Utilities.GetUsername(),
                    USER_MACADRESS = mac,
                    USER_ADMIN = false,

                };
                dc.tblUsers.InsertOnSubmit(user);
                dc.SubmitChanges();
            }
        }
 private void userListView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
 {
     if (userListView.SelectedItems.Count == 0) return;
     Cursor = Cursors.WaitCursor;
     SelectedUser = (tblUser)userListView.SelectedItems[0].Tag;
     foreach (ListViewItem lvi in userListView.Items) lvi.Checked = false;
     Cursor = Cursors.Default;
 }
        private void DisplayUserInfo(tblUser user)
        {
            nameSelectedLabel.Text = "Send :";

        }