コード例 #1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            frmInputLP frm = new frmInputLP();

            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.ShowDialog(this);
            this.vlappenTableAdapter.FillByTanggal(this.sinarekDataSet.vlappen, dtpTanggal.Value, "Penjualan");
        }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: m0ch4/Sinarek
        private void mainradMenu_Click(object sender, EventArgs e)
        {
            string menuText = string.Empty;
            string MenuName = string.Empty;
            string Menu     = string.Empty;

            if (sender is RadMenuItem)
            {
                RadMenuItem item = (RadMenuItem)sender;
                menuText = item.Text.Replace("&", "");
                MenuName = (item.Tag != null?item.Tag.ToString():"");
                RadForm frm = new RadForm();
                string  tipe;
                switch (MenuName)
                {
                case "":
                    NBConfig.bLoggedIn = false;
                    helper.SysLog(this.GetType().Name, NBConfig.ValidUserName, "Logout");
                    //this.Owner.Show();
                    this.Close();
                    break;

                case "frmInputLP":
                    //get tipe
                    menuText = menuText.Split('.')[1];
                    tipe     = menuText.Replace("Input", "");
                    tipe     = tipe.Trim();
                    frm      = new frmInputLP(tipe);
                    break;

                case "frmInputTMR":
                    menuText = menuText.Split('.')[1];
                    frm      = new frmInputTMR(menuText, true);
                    break;

                case "frmLihatTotal":
                    menuText = menuText.Split('.')[1];
                    frm      = new frmLihatTotal(menuText.ToLower().Replace("stock ", ""));
                    break;

                case "frmLihatSJ":
                    menuText = menuText.Split('.')[1];
                    tipe     = menuText.Replace("Lihat SJ", "");
                    tipe     = tipe.Trim();
                    frm      = new frmLihatSJ(tipe);
                    break;

                case "frmLihatTM":
                    menuText = menuText.Split('.')[1];
                    tipe     = menuText.Replace("Lihat Transaksi", "");
                    tipe     = tipe.Trim();
                    frm      = new frmLihatTM(tipe);
                    break;

                case "frmLihatNR":
                    menuText = menuText.Split('.')[1];
                    tipe     = menuText.Replace("Check", "");
                    tipe     = tipe.Trim();
                    frm      = new frmLihatNR(tipe);
                    break;

                case "frmInputIntern":
                    menuText = menuText.Split('.')[1];
                    frm      = new frmInputIntern(menuText, true);
                    break;

                default:
                    SetForm(MenuName, out frm);
                    break;
                }
                if (!string.IsNullOrEmpty(MenuName))
                {
                    Menu            = item.Text.Split('.')[1];
                    frm.Tag         = Menu;
                    frm.MaximizeBox = false;
                    frm.MinimizeBox = false;
                    frm.FormElement.TitleBar.TitlePrimitive.Font = new System.Drawing.Font("Lucida Bright", 12, FontStyle.Bold);
                    frm.StartPosition = FormStartPosition.CenterParent;
                    frm.ShowDialog(this);
                }
            }
        }