예제 #1
0
        private void finance_Click(object sender, EventArgs e)
        {
            switch (niveau.Text)
            {
            case "1":
                FrmFinance p = new FrmFinance();
                p.idagent.Text    = id.Text;
                panelMouve.Height = finance.Height;
                panelMouve.Top    = finance.Top;
                fx.openChildForm(p, afficher);

                break;

            case "2":

                FrmFinance f = new FrmFinance();
                f.idagent.Text    = id.Text;
                panelMouve.Height = finance.Height;
                panelMouve.Top    = finance.Top;
                fx.openChildForm(f, afficher);

                break;

            default:
                MessageBox.Show("Vous n'avez pas l'autorisation d'acceder à ce formulaire ! ", "Message d'erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
                ; break;
            }
        }
예제 #2
0
        /// <summary>
        /// Gets the N02 SDKP DVDT t T77.
        /// </summary>
        /// <param name="reportParameter">The report parameter.</param>
        /// <param name="oRsTool">The o rs tool.</param>
        /// <returns>IList&lt;N02_SDKP_DVDT_TT77Model&gt;.</returns>
        public IList <N02_SDKP_DVDT_TT77Model> GetN02_SDKP_DVDT_TT77(ReportParameter reportParameter, ReportSharpHelper oRsTool)
        {
            IList <N02_SDKP_DVDT_TT77Model> reports = null;

            GlobalVariable.IsDisplayNewLicenseInfo = false;

            if (!oRsTool.IsRefresh)
            {
                using (var frmParam = new FrmFinance())
                {
                    GlobalVariable.IsDisplayNewLicenseInfo = false;
                    frmParam.Text = @"Bảng đối chiếu tình hình sử dụng kinh phí tại KBNN";
                    if (frmParam.ShowDialog() == DialogResult.OK)
                    {
                        var fromDate = DateTime.Parse(frmParam.FromDate);
                        var toDate   = DateTime.Parse(frmParam.ToDate);
                        if (frmParam.selectReport == 1)
                        {
                            oRsTool.ReportFileName = "N02_SDKP_DVDT_TT61.rst";
                        }
                        if (!oRsTool.Parameters.ContainsKey("FromDate"))
                        {
                            oRsTool.Parameters.Add("FromDate", fromDate.ToShortDateString());
                        }
                        if (!oRsTool.Parameters.ContainsKey("ToDate"))
                        {
                            oRsTool.Parameters.Add("ToDate", toDate.ToShortDateString());
                        }
                        if (!oRsTool.Parameters.ContainsKey("ReportDate"))
                        {
                            oRsTool.Parameters.Add("ReportDate", GlobalVariable.PostedDate);
                        }
                        if (!oRsTool.Parameters.ContainsKey("CompanyCode"))
                        {
                            oRsTool.Parameters.Add("CompanyCode", string.IsNullOrEmpty(GlobalVariable.CompanyCode) ? string.Empty : GlobalVariable.CompanyCode);
                        }

                        reports = Model.GetN02_SDKP_DVDT_TT77(DateTime.Parse(GlobalVariable.SystemDate), DateTime.Parse(GlobalVariable.SystemDate),
                                                              fromDate, toDate, frmParam.ListBudgetSourceId, frmParam.BudgetChapterCode,
                                                              frmParam.BudgetSubKindItemCode,
                                                              frmParam.MethodDistributeId, frmParam.ExpendKind, null, frmParam.IsSummaryBudgetSource,
                                                              frmParam.IsSummaryBudgetChapter, frmParam.IsSummaryBudgetSubKindItem,
                                                              frmParam.SummaryMethodDistribute, true, false, false);
                    }
                }
            }
            return(reports);
        }