예제 #1
0
        private void mnuRptEmployeeContractEnd_Click(object sender, EventArgs e)
        {
            var userAccess = userAccessRepository.GetAll();

            bool isAllowed = userAccess.Exists(u => u.FullName == Store.ActiveUser &&
                                               u.ObjectName == "Karyawan -> Habis Kontrak" && u.IsOpen);

            if (isAllowed || Store.IsAdministrator)
            {
                Store.ActiveReport = "EmployeeContractEnd";

                var frm1 = new ReportUI();
                frm1.Show();
                frm1.Text = "Karyawan Habis Kontrak";
            }
            else
            {
                MessageBox.Show("Anda tidak dapat membuka laporan ini", "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
예제 #2
0
        private void mnuRptSalaryUpdate_Click_1(object sender, EventArgs e)
        {
            var userAccess = userAccessRepository.GetAll();

            bool isAllowed = userAccess.Exists(u => u.FullName == Store.ActiveUser &&
                                               u.ObjectName == "Gaji - Update Gaji" && u.IsOpen);

            if (isAllowed || Store.IsAdministrator)
            {
                Store.ActiveReport = "SalaryUpdate";

                var frm1 = new ReportUI();
                frm1.Show();
                frm1.Text = "Update Gaji";
            }
            else
            {
                MessageBox.Show("Anda tidak dapat membuka form ini", "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
예제 #3
0
        private void mnuRptBranch_Click(object sender, EventArgs e)
        {
            var userAccess = userAccessRepository.GetAll();

            bool isAllowed = userAccess.Exists(u => u.FullName == Store.ActiveUser &&
                                               u.ObjectName == "Master -> Cabang" && u.IsOpen);

            if (isAllowed || Store.IsAdministrator)
            {
                Store.ActiveReport = "Branch";

                var frm1 = new ReportUI();
                frm1.Show();
                frm1.Text = "Cabang";
            }
            else
            {
                MessageBox.Show("Anda tidak dapat membuka laporan ini", "Perhatian", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
예제 #4
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            var frmReport = new ReportUI(this);

            frmReport.Show();
        }