Ejemplo n.º 1
0
        private void Check_in_out_BT_Click(object sender, EventArgs e)
        {
            Check_in_outForm frm = new Check_in_outForm();

            this.Width    = 1340;
            this.Height   = 700;
            frm.MdiParent = this.ParentForm;
            frm.TopLevel  = false;
            panel2.Controls.Clear();
            panel2.Controls.Add(frm);
            frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm.Dock            = DockStyle.Fill;
            if (this.Check_in_out_BT.FillColor == Color.Transparent && this.Check_in_out_BT.FillColor2 == Color.Transparent)
            {
                this.employ_BT.FillColor        = Color.Transparent;
                this.employ_BT.FillColor2       = Color.Transparent;
                this.mngRooms_BT.FillColor      = Color.Transparent;
                this.mngRooms_BT.FillColor2     = Color.Transparent;
                this.mngSchedules_BT.FillColor  = Color.Transparent;
                this.mngSchedules_BT.FillColor2 = Color.Transparent;
                this.mngPayment_BT.FillColor    = Color.Transparent;
                this.mngPayment_BT.FillColor2   = Color.Transparent;
                this.mngPayment2_BT.FillColor   = Color.Transparent;
                this.mngPayment2_BT.FillColor2  = Color.Transparent;

                this.Check_in_out_BT.FillColor  = Color.FromArgb(0, 192, 192);
                this.Check_in_out_BT.FillColor2 = Color.Teal;
                frm.Show();
            }
            else
            {
                this.Check_in_out_BT.FillColor  = Color.Transparent;
                this.Check_in_out_BT.FillColor2 = Color.Transparent;
            }
        }
Ejemplo n.º 2
0
        private void JanitorForm_Load(object sender, EventArgs e)
        {
            SqlCommand com = new SqlCommand("Select firstname, photo From Employees Where emp_id=@id");

            com.Parameters.Add("@id", SqlDbType.Int).Value = Globals.GlobalUserId;
            DataTable dt = emp.getEmployees(com);

            welcome_LB.Text = "Welcome Back " + dt.Rows[0][0].ToString();
            byte[] pic;
            pic = (byte[])dt.Rows[0][1];
            MemoryStream picture = new MemoryStream(pic);

            avatar_PB.Image = Image.FromStream(picture);

            Check_in_outForm frm = new Check_in_outForm();

            frm.MdiParent = this.ParentForm;
            frm.TopLevel  = false;
            panel2.Controls.Clear();
            panel2.Controls.Add(frm);
            frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm.Dock            = DockStyle.Fill;
            frm.Show();
            this.Width  = 830;
            this.Height = 560;
        }