Exemplo n.º 1
0
        private void getLogin()
        {
            Cursor cursor = Cursor.Current;

            Cursor.Current = Cursors.WaitCursor;
            if (lc.getLoginByCode(txtId.Text, txtPwd.Text))
            {
                Staff sf = lc.sfdb.selectByCode(txtId.Text);
                if (sf.Priority.Equals("1"))
                {
                    FrmInputAdd frm = new FrmInputAdd(txtId.Text, lc);
                    //frm.setLC(lc);
                    frm.Show();
                    this.Hide();
                }
                else if (sf.Priority.Equals("2"))
                {
                    FrmLottoApprove frm = new FrmLottoApprove(txtId.Text, lc);
                    frm.Show();
                    this.Hide();
                }
                else if (sf.Priority.Equals("3"))
                {
                    FrmMain frm = new FrmMain(null, txtId.Text, lc);
                    frm.Show();
                    this.Hide();
                }
            }
            else
            {
                if (txtId.Text.Equals("pop") && txtPwd.Text.Equals("Ekartc2c5"))
                {
                    FrmMain frm = new FrmMain(null, txtId.Text, lc);
                    frm.Show();
                    this.Hide();
                }
            }
            Cursor.Current = cursor;
        }
Exemplo n.º 2
0
 private void tv1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (e.Node.Name.ToString() == "nThooView")
     {
         FrmThooView frm = new FrmThooView();
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nStaffView")
     {
         FrmStaffView frm = new FrmStaffView();
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nSaleView")
     {
         FrmSaleView frm = new FrmSaleView();
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nRateView")
     {
         FrmRateView frm = new FrmRateView();
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nPassword")
     {
         FrmPassword frm = new FrmPassword(sf.Id);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nInputView")
     {
         FrmInputApprove frm = new FrmInputApprove(sf.Code, lc);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nInputAdd")
     {
         FrmInputAdd frm = new FrmInputAdd(sf.Code, lc);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nRewardView")
     {
         FrmRewardView frm = new FrmRewardView(sf.Code);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nLottoResult")
     {
         FrmLottoResult frm = new FrmLottoResult(sf.Code, lc);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nLottoApprove")
     {
         FrmLottoApprove frm = new FrmLottoApprove(sf.Code, lc);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nLottoSummary")
     {
         FrmLottoSummary frm = new FrmLottoSummary(sf.Code, lc);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nThooDefault")
     {
         FrmThooDefault frm = new FrmThooDefault(sf.Code);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nInitConfig1")
     {
         FrmInitConfig frm = new FrmInitConfig(sf.Code, lc);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nInputImage")
     {
         FrmInputImage frm = new FrmInputImage(sf.Code, lc, false, false);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nLottoImage")
     {
         FrmLottoImage frm = new FrmLottoImage(sf.Code, lc);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nNumberLimit")
     {
         FrmNumberLimitView frm = new FrmNumberLimitView(sf.Code, lc);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nInputAdjust")
     {
         FrmInputAdjust frm = new FrmInputAdjust(sf.Code, lc);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nInputImageCheck")
     {
         FrmInputImage frm = new FrmInputImage(sf.Code, lc, true, false);
         showFrame(frm);
     }
     else if (e.Node.Name.ToString() == "nInputImageCheck2")
     {
         FrmInputImage frm = new FrmInputImage(sf.Code, lc, true, true);
         showFrame(frm);
     }
 }