コード例 #1
0
 private void openaddpay()
 {
     if (this.addpay == null)
     {
         this.addpay = new addPayMode(this)
         {
             MdiParent = this
         };
         this.addpay.Show();
     }
     else
     {
         this.addpay.WindowState = FormWindowState.Normal;
     }
 }
コード例 #2
0
        public Central2(string alias)
        {
            InitializeComponent();
            this.DB              = new dbop();
            this.MaximizeBox     = true;
            this.Text            = "SET SOFTWARE";
            this.Shown          += this.showINFO;
            this.FormClosing    += onClose;
            this.DoubleBuffered  = true;
            this.FormBorderStyle = FormBorderStyle.None;
            this.usr             = this.DB.usrget(alias);

            this.sesion = new login()
            {
                idusuario    = this.usr.id_usuario,
                hora_inicio  = TimeSpan.Parse(genericDefinitions.getTimeExact()),
                fecha_inicio = DateTime.Parse(genericDefinitions.getDate()),
            };

            genericDefinitions.globalsesion = this.sesion;

            this.lblnombreusuario.Text = (this.usr.nombre + " " + this.usr.apellido).ToUpper();
            this.lblhorainicio.Text    = this.sesion.hora_inicio.ToString();

            this.btnusuario.MouseHover += (sender, atgs) =>
            {
                this.panelSesion.Visible = true;
            };

            this.btnusuario.MouseLeave += (sender, atgs) =>
            {
                this.panelSesion.Visible = false;
            };

            this.product  = null;
            this.customer = null;
            this.addcat   = null;
            this.updcat   = null;
            this.delcat   = null;
            this.addpay   = null;
            this.delpay   = null;
            this.updpay   = null;
            this.seepay   = null;
            this.xventa   = null;
        }