Beispiel #1
0
        private void SellerMenu_Load(object sender, EventArgs e)
        {
            Authorization_form f = (Authorization_form)this.Owner;

            label1.Text += " " + f.Surname.ToString().TrimEnd() + " " + f.First_name.ToString().TrimEnd() + " " + f.Last_name.ToString().TrimEnd();
            label2.Text += " " + f.Role.ToString().TrimEnd();
            MaxId();
            InsertUserSession();
        }
Beispiel #2
0
 public void InsertUserSession()
 {
     using (SqlConnection connect = new SqlConnection(con))
     {
         connect.Open();
         Authorization_form f   = (Authorization_form)this.Owner;
         SqlCommand         com = new SqlCommand("EXECUTE dbo.InsertUserSession '" + insertId + "','" + f.Login.ToString() +
                                                 "','" + DateTime.Now.ToString("dd.MM.yyyy") + "','" + DateTime.Now.ToString("hh:mm:ss") + "'", connect);
         com.ExecuteNonQuery();
     }
 }
        private void ВыходToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Authorization_form f = (Authorization_form)this.Owner;

            f.Close();
        }