Ejemplo n.º 1
0
 public HomeControl()
 {
     InitializeComponent();
     HideByRole();
     maintenanceMenu = new MaintenanceMenuControl(this);
     resportMenu     = new ReportControl();
 }
 /// <summary>
 /// Creates a new instance of the ReportControlManipulator class.
 /// </summary>
 /// <param name="reportControl">ReportControl upon which all visual changes are performed.</param>
 public ReportControlManipulator(ReportControl reportControl)
 {
     if (reportControl == null)
     {
         throw new ArgumentException("reportControl");
     }
     _owningControl = reportControl;
 }
Ejemplo n.º 3
0
        private ReportControl CreateReportControl()
        {
            var reportControl = new ReportControl()
            {
                DataContext = analyst.Host,
            };

            return(reportControl);
        }
Ejemplo n.º 4
0
        public FormManagerRequisitions(SqlConnection getData, SqlConnection getIgdData)
        {
            InitializeComponent();

            _controle = new ProductionController(getData, getIgdData);

            _reportModule  = ReportModuleProduction.GetInstance();
            _reportControl = new MP.Reporting.WinForms.ReportControl();
        }
Ejemplo n.º 5
0
        protected void btnGenerarReporte_Click(object sender, EventArgs e)
        {
            ReportControl report = GetControlReport();

            if (report != null)
            {
                report.GenerateReport();
            }
        }
Ejemplo n.º 6
0
        public FormCertificadoImpressao(SqlConnection getData, SqlConnection getIgdData)
        {
            InitializeComponent();

            _reportModule        = ReportModuleCertificado.GetInstance();
            _reportControl       = new ReportControl();
            _certificadoControle = new CertificadoControle(getData, getIgdData);
            _produtoControl      = new ProdutoControle(getData, getIgdData);
            CarregarProdutosPedidos();
        }
    public void Displayselecteddata(Hashtable hashtable, object objsender)
    {
        ReportControl rpt = (ReportControl)objsender;

        if (rpt.ID == "SchoolwiseStudentGenderGrid")
        {
            GenderwiseReport1.Visible           = true;
            GenderwiseReport2.Visible           = true;
            GenderwiseReport3.Visible           = false;
            lblTitleFirst.Visible               = true;
            lblTitleSecond.Visible              = true;
            lblTitleThird.Visible               = false;
            btnBack.Visible                     = true;
            SchoolwiseStudentGenderGrid.Visible = false;
            BMSwiseStudentGender.Visible        = true;
            BMSwiseStudentList.Visible          = false;
            this.AcademicYear                   = hashtable["AcademicYear"].ToString();
            lblYearValueSecond.Text             = this.AcademicYear;
            lblSchoolValueSecond.Text           = ddlSchool.SelectedItem.Text;
            BindBoardDropdown(ddlBoardSecond);
            CurrentReport = "BMSwise Student Gender";
            StageTwoCalling();
        }
        else if (rpt.ID == "BMSwiseStudentGender")
        {
            GenderwiseReport1.Visible           = true;
            GenderwiseReport2.Visible           = false;
            GenderwiseReport3.Visible           = true;
            lblTitleFirst.Visible               = true;
            lblTitleSecond.Visible              = false;
            lblTitleThird.Visible               = true;
            SchoolwiseStudentGenderGrid.Visible = false;
            BMSwiseStudentGender.Visible        = false;
            BMSwiseStudentList.Visible          = true;

            btnBack.Visible          = true;
            lblYearValueThird.Text   = this.AcademicYear;
            lblSchoolValueThird.Text = ddlSchool.SelectedItem.Text;
            lblBMSValueThird.Text    = hashtable["BMS"].ToString();
            this.BMSID = Convert.ToInt32(hashtable["BMSID"].ToString());
            lblDivisionValueThird.Text = hashtable["Division"].ToString();
            this.DivisionID            = Convert.ToInt32(hashtable["DivisionID"].ToString());
            StageThirdCalling();
            BMSwiseStudentList.Visible = true;
        }
        else if (rpt.ID == "BMSwiseStudentList")
        {
            std.Visible           = true;
            this.StudentID        = Convert.ToInt32(hashtable["StudentID"].ToString());
            Session["ReportYear"] = this.AcademicYear;
            std.BindStudentDetails(StudentID.ToString());

            mpStudent.Show();
        }
    }
Ejemplo n.º 8
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="reportItems">ReportItems.</param>
        public ReportDocument(SourceFile[] reportItems)
        {
            if (reportItems == null)
            {
                throw new ArgumentNullException("reportItems");
            }

            ReportItems = reportItems;

            View             = new ReportControl();
            View.ReportItems = ReportItems;
        }
        void DisplaySettings(object sender, EventArgs e)
        {
            var document = AdnInventorUtilities.InvApplication.ActiveDocument;

            if (document == null)
            {
                return;
            }
            ReportControl dlg = new ReportControl(document);

            dlg.Location = Cursor.Position;
            dlg.ShowDialog();
        }
Ejemplo n.º 10
0
        protected override void OnExecute(NameValueMap context)
        {
            var document = Application.ActiveDocument;

            if (document == null)
            {
                return;
            }
            ReportControl reportControl = new ReportControl(document);

            reportControl.ShowAsChildModal();
            Terminate();
        }
Ejemplo n.º 11
0
 public Main(ProviderControl providerControl, InvoiceControl invoiceControl, RequestControl requestControl, UsersControl usersControl, ReportControl reportsControl, ProductControl productControl, PersonalDataControl personalDataControl)
 {
     _logger = LogManager.GetCurrentClassLogger();
     _logger.Debug("Iniciando Menu Principal");
     InitializeComponent();
     _providerControl     = providerControl;
     _invoiceControl      = invoiceControl;
     _requestControl      = requestControl;
     _productControl      = productControl;
     _usersControl        = usersControl;
     _reportsControl      = reportsControl;
     _personalDataControl = personalDataControl;
 }
Ejemplo n.º 12
0
 void m_reportTab_Enter(object sender, EventArgs e)
 {
     m_removeEnabled = removeItemButton.Enabled;
     foreach (ToolStripItem item in standardToolStrip.Items)
     {
         item.Enabled = false;
     }
     foreach (Control c in m_reportTab.Controls)
     {
         if (c is ReportControl)
         {
             ReportControl rc = c as ReportControl;
             rc.UpdateReport();
         }
     }
 }
Ejemplo n.º 13
0
 private void mnReport_Click(object sender, EventArgs e)
 {
     if (Utilities.CurrentUser.PositionId != 1)
     {
         MessageBox.Show("Bạn không thể truy cập chức năng này");
         return;
     }
     MenuSelected((sender as ToolStripMenuItem).Name);
     if (reportCtr == null)
     {
         reportCtr      = new ReportControl();
         reportCtr.Dock = DockStyle.Fill;
         pnlMain.Controls.Add(reportCtr);
     }
     reportCtr.BringToFront();
 }
Ejemplo n.º 14
0
        public FormOrderStarter(ProductionOrder ordemProducao, ProductionController controle)
        {
            InitializeComponent();

            _ordemProducao = ordemProducao;

            _controle = controle;

            _requisicoesSelecionadas = new BindingList <int>();

            _reportModule  = ReportModuleProduction.GetInstance();
            _reportControl = new ReportControl();

            CarregarOrdemProducao();
            CarregarProdutosFinais();
            CarregarRequisicoes();
        }
Ejemplo n.º 15
0
        public string GetIncomeModel(DateTime stDate, DateTime edDate, DateTime lstDate, DateTime ledDate)
        {
            UgcList list = new UgcList();

            try
            {
                list.DataList = ReportControl.GetIncomeModel(stDate, edDate, lstDate, ledDate);
            }
            catch (Exception ex)
            {
                Logger.Error("获取付费相关报表错误!", ex);
                return("");
            }


            return
                (CommonLib.Helper.JsonSerializeObject(list));
        }
Ejemplo n.º 16
0
        public void GetFileReportClass(string id)
        {
            var reports = (from l in _context.Learners
                           join st in _context.StudyProcesses on l.Id equals st.LearnerId
                           where (st.Status == Status.Active && st.LanguageClassId == id)
                           select new
            {
                Index = 1,
                FullName = l.FirstName + " " + l.LastName,
                YearOfBirth = l.Birthday.Year.ToString(),
                Gender = l.Sex == true ? "Name" : "Nữ",
                l.Phone,
                ClassName = _context.LanguageClasses.Where(x => x.Id == id).Single().Name,
                Note = ""
            }).OrderBy(x => x.FullName).ToList();

            int i       = 1;
            var results = new List <ReportViewModel>();

            foreach (var item in reports)
            {
                ReportViewModel reportViewModel = new ReportViewModel()
                {
                    Index       = i,
                    FullName    = item.FullName,
                    ClassName   = item.ClassName,
                    Gender      = item.Gender,
                    Note        = "",
                    Phone       = item.Phone,
                    YearOfBirth = item.YearOfBirth
                };
                results.Add(reportViewModel);
                i++;
            }


            HtmlToPdf Renderer = new HtmlToPdf();

            Renderer.RenderHtmlAsPdf(ReportControl.GetHTMLString(results)).SaveAs("baocaolop.pdf");

            var PDF = Renderer.RenderHtmlAsPdf(ReportControl.GetHTMLString(results), @"C:\Users\Than Hoang\source\repos\LanguageCenterPLC_BE\LanguageCenterPLC\wwwroot\css\");

            PDF.SaveAs("html-with-assets.pdf");
        }
Ejemplo n.º 17
0
        private void discontinueProductToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var rc = from Control c
                     in m_reportTab.Controls
                     where c is ReportControl
                     select c;
            ReportControl report = rc.First() as ReportControl;

            var ic = from Control c
                     in m_inventoryTab.Controls
                     where c is InventoryControl
                     select c;
            InventoryControl inventory = ic.First() as InventoryControl;

            DiscontinueItemForm dif = new DiscontinueItemForm(ref m_register,
                                                              ref inventory,
                                                              ref report);

            dif.ShowDialog();
        }
Ejemplo n.º 18
0
        private void returnMenuItem_Click(object sender, EventArgs e)
        {
            var rc = from Control c
                     in m_reportTab.Controls
                     where c is ReportControl
                     select c;
            ReportControl report = rc.First() as ReportControl;

            var ic = from Control c
                     in m_inventoryTab.Controls
                     where c is InventoryControl
                     select c;

            InventoryControl inventory = ic.First() as InventoryControl;

            ReturnForm rf = new ReturnForm(ref m_register,
                                           ref inventory,
                                           ref report);

            rf.ShowDialog();
        }
Ejemplo n.º 19
0
        private void newShipmentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var rc = from Control c
                     in m_reportTab.Controls
                     where c is ReportControl
                     select c;
            ReportControl report = rc.First() as ReportControl;

            var ic = from Control c
                     in m_inventoryTab.Controls
                     where c is InventoryControl
                     select c;

            InventoryControl inventory = ic.First() as InventoryControl;

            ShipmentForm sf = new ShipmentForm(ref m_register,
                                               ref inventory,
                                               ref report);

            sf.ShowDialog();
        }
    public void Displayselecteddata(Hashtable hashtable, object objsender)
    {
        ReportControl rpt = (ReportControl)objsender;

        if (rpt.ID == "rptSchoolAttendance")
        {
            rptSchoolAttendance.Visible = false;
            rptClassAttendance.Visible  = true;
            //FirstReport.Visible = false;
            Div1.Visible      = true;
            secondRpt.Visible = true;
            btnback.Visible   = true;

            this.SchoolID      = Convert.ToInt32(ddlSchool.SelectedValue.ToString());
            this.BMSID         = Convert.ToInt32(hashtable["BMSID"].ToString());
            ViewState["BMSID"] = Convert.ToInt32(hashtable["BMSID"].ToString());
            this.BMS           = (hashtable["BMS"].ToString());
            this.Attendance    = (hashtable["Attendance"].ToString());
            this.Division      = (hashtable["Division"].ToString());
            this.Date          = Convert.ToDateTime(txtDate.Text);
            BindValuesToLabels();

            DataSet          ds             = new DataSet();
            ReportsForResult objRsultReport = new ReportsForResult();
            this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();
            ds = this.Obj_Dal_ClassroomWiseAttendance.GetAttendance(SchoolID, Date, BMSID);

            GetConnectionStringSTRING obj = new GetConnectionStringSTRING();
            connectionstring = obj.BAL_EpathshalaString();

            try
            {
                rptClassAttendance.XMLReportFile = Server.MapPath("../ReportXMLFiles/ClassroomWiseAttendanceSecond.xml");
                rptClassAttendance.Search(ds.Tables[0]);
                CurrentReport = "ClassAttendance";
            }
            catch (Exception ex)
            {
                WebMsg.Show("" + ex.Message.ToString());
            }
        }
        if (rpt.ID == "rptClassAttendance")
        {
            this.SchoolID = Convert.ToInt32(ddlSchool.SelectedValue.ToString());
            this.BMSID    = Convert.ToInt32(ViewState["BMSID"].ToString());
            this.Date     = Convert.ToDateTime(txtDate.Text);
            BindValuesToLabels();

            DataSet          ds             = new DataSet();
            ReportsForResult objRsultReport = new ReportsForResult();
            this.Obj_Dal_ClassroomWiseAttendance = new ClassroomWiseAttendance();

            ds = this.Obj_Dal_ClassroomWiseAttendance.GetAttendance(SchoolID, Date, BMSID);

            GetConnectionStringSTRING obj = new GetConnectionStringSTRING();
            connectionstring = obj.BAL_EpathshalaString();

            try
            {
                rptClassAttendance.XMLReportFile = Server.MapPath("../ReportXMLFiles/ClassroomWiseAttendanceSecond.xml");
                rptClassAttendance.Search(ds.Tables[0]);
                CurrentReport = "ClassAttendance";
            }
            catch (Exception ex)
            {
                WebMsg.Show("" + ex.Message.ToString());
            }
        }
    }
    public void Displayselecteddata(Hashtable hashtable, object objsender)
    {
        ReportControl rpt = (ReportControl)objsender;

        if (rpt.ID == "ClasswiseSyllabusGrid")
        {
            ClasswiseReport.Visible   = true;
            SubjectwiseReport.Visible = true;
            ChapterwiseReport.Visible = false;
            TopicwiseReport.Visible   = false;

            btnBack.Visible                 = true;
            lblFirstTitle.Visible           = true;
            lblSecondTitle.Visible          = true;
            lblThirdTitle.Visible           = false;
            lblForthTitle.Visible           = false;
            ClasswiseSyllabusGrid.Visible   = false;
            SubjectwiseSyllabusGrid.Visible = true;
            ChapterwiseSyllabusGrid.Visible = false;
            TopicwiseSyllabusGrid.Visible   = false;
            BindFieldIDFromDropDown();
            BindDivLableValues(hashtable);
            this.SchoolID   = Convert.ToInt32(hashtable["SchoolID"]);
            this.BMSID      = Convert.ToInt32(hashtable["BMSID"]);
            this.DivisionID = Convert.ToInt32(hashtable["DivisionID"]);
            StageTwoCalling();
        }
        else if (rpt.ID == "SubjectwiseSyllabusGrid")
        {
            ClasswiseReport.Visible         = true;
            SubjectwiseReport.Visible       = false;
            ChapterwiseReport.Visible       = true;
            TopicwiseReport.Visible         = false;
            lblFirstTitle.Visible           = true;
            lblSecondTitle.Visible          = false;
            lblThirdTitle.Visible           = true;
            lblForthTitle.Visible           = false;
            ClasswiseSyllabusGrid.Visible   = false;
            SubjectwiseSyllabusGrid.Visible = false;
            ChapterwiseSyllabusGrid.Visible = true;
            TopicwiseSyllabusGrid.Visible   = false;
            btnBack.Visible = true;

            lblSubjectValueThird.Text         = hashtable["Subject"].ToString();
            lblCoveredSyllabusValueThird.Text = hashtable["SyllabusCovered"].ToString() + " %";
            lblSubjectValueForth.Text         = hashtable["Subject"].ToString();
            this.SubjectID = Convert.ToInt32(hashtable["SubjectID"]);

            StageThreeCalling();
        }
        else if (rpt.ID == "ChapterwiseSyllabusGrid")
        {
            ClasswiseReport.Visible         = true;
            SubjectwiseReport.Visible       = false;
            ChapterwiseReport.Visible       = false;
            TopicwiseReport.Visible         = true;
            lblFirstTitle.Visible           = true;
            lblSecondTitle.Visible          = false;
            lblThirdTitle.Visible           = false;
            lblForthTitle.Visible           = true;
            ClasswiseSyllabusGrid.Visible   = false;
            SubjectwiseSyllabusGrid.Visible = false;
            ChapterwiseSyllabusGrid.Visible = false;
            TopicwiseSyllabusGrid.Visible   = true;

            this.ChapterID                    = Convert.ToInt32(hashtable["ChapterID"]);
            lblChapterValueForth.Text         = hashtable["Chapter"].ToString();
            lblCoveredSyllabusValueForth.Text = hashtable["Percentage"].ToString() + " %";
            StageForthCalling();
        }
        else if (rpt.ID == "TopicwiseSyllabusGrid")
        {
            StageForthCalling();
        }
    }
Ejemplo n.º 22
0
        public async Task <IActionResult> GetFileReportClassx(string id)
        {
            var reports = (from l in _context.Learners
                           join st in _context.StudyProcesses on l.Id equals st.LearnerId
                           where (st.Status == Status.Active && st.LanguageClassId == id)
                           select new
            {
                Index = 1,
                FullName = l.FirstName + " " + l.LastName,
                YearOfBirth = l.Birthday.Year.ToString(),
                Gender = l.Sex == true ? "Name" : "Nữ",
                l.Phone,
                ClassName = _context.LanguageClasses.Where(x => x.Id == id).Single().Name,
                Note = ""
            }).OrderBy(x => x.FullName).ToList();

            int i       = 1;
            var results = new List <ReportViewModel>();

            foreach (var item in reports)
            {
                ReportViewModel reportViewModel = new ReportViewModel()
                {
                    Index       = i,
                    FullName    = item.FullName,
                    ClassName   = item.ClassName,
                    Gender      = item.Gender,
                    Note        = "",
                    Phone       = item.Phone,
                    YearOfBirth = item.YearOfBirth
                };
                results.Add(reportViewModel);
                i++;
            }


            HtmlToPdf Renderer = new HtmlToPdf();

            Renderer.RenderHtmlAsPdf(ReportControl.GetHTMLString(results)).SaveAs("html-string.pdf");

            var PDF = Renderer.RenderHtmlAsPdf(ReportControl.GetHTMLString(results), @"C:\Users\Than Hoang\source\repos\LanguageCenterPLC_BE\LanguageCenterPLC\wwwroot\css\");

            PDF.SaveAs("html-with-assets.pdf");


            try
            {
                var globalSettings = new GlobalSettings
                {
                    ColorMode   = ColorMode.Color,
                    Orientation = Orientation.Portrait,
                    PaperSize   = PaperKind.A5,
                    Margins     = new MarginSettings {
                        Top = 10
                    },
                    DocumentTitle = "PDF Report",
                };

                var objectSettings = new ObjectSettings
                {
                    PagesCount  = true,
                    HtmlContent = ReportControl.GetHTMLString(results),
                    WebSettings = { DefaultEncoding = "utf-8", UserStyleSheet = Path.Combine(Directory.GetCurrentDirectory(), "Models\\Untility\\Template\\assets", "styles.css") },
                };

                var pdf = new HtmlToPdfDocument()
                {
                    GlobalSettings = globalSettings,
                    Objects        = { objectSettings }
                };
                var file = _converter.Convert(pdf);
                return(File(file, "application/pdf"));
            }
            catch (ApplicationException e)
            {
                return(BadRequest(new
                {
                    result = -1,
                    message = e.Message
                }));
            }
            catch
            {
                return(BadRequest(new { result = -2, message = "Lỗi cơ sở dữ liệu" }));
            }
        }
Ejemplo n.º 23
0
    public void Displayselecteddata(Hashtable hashtable, object objsender)
    {
        ReportControl rpt = (ReportControl)objsender;

        if (rpt.ID == "gvboard")
        {
            div_general.Visible  = true;
            gvboard.Visible      = false;
            gvmedium.Visible     = true;
            btnbackboard.Visible = true;
            Button exporttoexcel = (Button)gvmedium.FindControl("btnexporttoexcel");
            exporttoexcel.Visible = true;

            GridView gridreport = (GridView)gvmedium.FindControl("gridreport");
            gridreport.Width = 600;
            //gridreport.AllowSorting = false;

            //Label lblaverage = (Label)gvmedium.FindControl("lblaverage");
            //lblaverage.Visible = false;

            Label lbltotal = (Label)gvmedium.FindControl("lbltotal");
            lbltotal.Visible = false;

            this.BoardID = Convert.ToInt32(hashtable["BoardID"]);
            strBMS       = hashtable["Board"].ToString() + " Board";
            //lblbms.Text = strBMS;
            lblboard.Text = hashtable["Board"].ToString();
            StageTwoCalling();
        }
        else if (rpt.ID == "gvmedium")
        {
            gvboard.Visible       = false;
            gvmedium.Visible      = false;
            btnbackboard.Visible  = false;
            btnbackmedium.Visible = true;
            gvstandard.Visible    = true;
            Button exporttoexcel = (Button)gvstandard.FindControl("btnexporttoexcel");
            exporttoexcel.Visible = true;
            //Label lblaverage = (Label)gvstandard.FindControl("lblaverage");
            //lblaverage.Visible = false;

            GridView gridreport = (GridView)gvstandard.FindControl("gridreport");
            gridreport.Width = 600;
            //gridreport.AllowSorting = false;


            Label lbltotal = (Label)gvstandard.FindControl("lbltotal");
            lbltotal.Visible = false;
            //this.BoardID = Convert.ToInt32(hashtable["BoardID"]);
            this.MediumID = Convert.ToInt32(hashtable["MediumID"]);
            this.BMSID    = Convert.ToInt32(hashtable["BMSID"]);

            strBMS += " >> " + hashtable["Medium"].ToString() + " Medium";
            //lblbms.Text = strBMS;
            lblmedium.Text = "  " + hashtable["Medium"].ToString();
            StageThreeCalling();
        }
        else if (rpt.ID == "gvstandard")
        {
            gvStudentList.Visible = true;
            gvboard.Visible       = false;
            gvmedium.Visible      = false;
            gvstandard.Visible    = false;
            btnstandard.Visible   = true;
            btnbackmedium.Visible = false;
            Button exporttoexcel = (Button)gvStudentList.FindControl("btnexporttoexcel");
            exporttoexcel.Visible = true;
            //Label lblaverage = (Label)gvStudentList.FindControl("lblaverage");
            //lblaverage.Visible = false;

            GridView gridreport = (GridView)gvStudentList.FindControl("gridreport");
            gridreport.Width = 600;
            //gridreport.AllowSorting = false;

            Label lbltotal = (Label)gvStudentList.FindControl("lbltotal");
            lbltotal.Visible = false;
            this.StandardID  = Convert.ToInt32(hashtable["StandardID"]);
            strBMS          += " >> " + hashtable["Standard"].ToString() + " Standard ";

            //lblbms.Text = strBMS;
            lblstandard.Text = "  " + hashtable["Standard"].ToString();

            pnlfilter.Enabled = true;
            //select_sucessfulTransactionByStandardID
            StageForthCalling();
        }
    }
Ejemplo n.º 24
0
 public string GetNewAccountModel(DateTime stDate, DateTime edDate, DateTime lstDate, DateTime ledDate)
 {
     return
         (CommonLib.Helper.JsonSerializeObject(ReportControl.GetNewAccountModel(stDate, edDate, lstDate, ledDate)));
 }
Ejemplo n.º 25
0
        public static void Show(ReportViewModel model)
        {
            ReportControl control = new ReportControl()
            {
                DataContext = model
            };

            if (control != null)
            {
                Window wnd = new Window
                {
                    HorizontalAlignment   = HorizontalAlignment.Right,
                    VerticalAlignment     = VerticalAlignment.Top,
                    SizeToContent         = SizeToContent.WidthAndHeight,
                    WindowStartupLocation = WindowStartupLocation.CenterScreen,
                    // ResizeMode = ResizeMode.NoResize
                };



                Grid newGrid = new Grid()
                {
                    HorizontalAlignment = HorizontalAlignment.Stretch,
                    VerticalAlignment   = VerticalAlignment.Stretch
                };

                RowDefinition R1 = new RowDefinition();
                R1.Height = new GridLength(12, GridUnitType.Star);
                newGrid.RowDefinitions.Add(R1);
                RowDefinition R2 = new RowDefinition();
                R2.Height = new GridLength(50);
                newGrid.RowDefinitions.Add(R2);
                RowDefinition R3 = new RowDefinition();
                R3.Height = new GridLength(50);

                newGrid.RowDefinitions.Add(R3);
                wnd.Content = newGrid;

                Grid.SetRow(control, 0);
                newGrid.Children.Add(control);


                // Панель для двух кнопок
                Grid buttonGrid = new Grid()
                {
                    HorizontalAlignment = HorizontalAlignment.Stretch,
                    VerticalAlignment   = VerticalAlignment.Stretch
                };

                ColumnDefinition C1 = new ColumnDefinition();
                C1.Width = new GridLength(1, GridUnitType.Star);
                buttonGrid.ColumnDefinitions.Add(C1);
                ColumnDefinition C2 = new ColumnDefinition();
                C2.Width = new GridLength(2, GridUnitType.Star);
                buttonGrid.ColumnDefinitions.Add(C2);
                ColumnDefinition C3 = new ColumnDefinition();
                C3.Width = new GridLength(1, GridUnitType.Star);
                buttonGrid.ColumnDefinitions.Add(C3);

                Grid.SetRow(buttonGrid, 1);
                newGrid.Children.Add(buttonGrid);


                Button applyButton = new Button
                {
                    Content             = "Закрыть",
                    HorizontalAlignment = HorizontalAlignment.Left,
                    Width             = 200,
                    Height            = 35,
                    VerticalAlignment = VerticalAlignment.Top
                };
                applyButton.Click += (s, e) => {
                    wnd.Close();
                };
                Grid.SetColumn(applyButton, 2);
                buttonGrid.Children.Add(applyButton);


                wnd.Closed += (s, e) => wnd.Close();
                wnd.ShowDialog();
            }
        }
Ejemplo n.º 26
0
 public string GetConversionModel(DateTime stDate, DateTime edDate)
 {
     edDate = ControlHelper.GetEndDate(edDate);
     return
         (CommonLib.Helper.JsonSerializeObject(ReportControl.GetConversionModel(stDate, edDate)));
 }
    public void Displayselecteddata(Hashtable hashtable, object objsender)
    {
        ReportControl rpt = (ReportControl)objsender;

        if (rpt.ID == "rptSchool")
        {
            rptSchool.Visible   = false;
            rptAgeGroup.Visible = true;
            rptStudent.Visible  = false;
            FirstRpt.Visible    = true;
            SecondRpt.Visible   = true;
            ThirdReport.Visible = false;
            btnback.Visible     = true;

            this.SchoolID       = Convert.ToInt32(ddlSchool.SelectedValue.ToString());
            this.BoardID        = Convert.ToInt32(ddlBoard.SelectedValue.ToString());
            this.MediumID       = Convert.ToInt32(ddlMedium.SelectedValue.ToString());
            this.GroupName      = (hashtable["GroupName"].ToString());
            this.AgeGroup       = (hashtable["AgeGroup"].ToString());
            this.Year           = ddlYear.SelectedItem.ToString();
            Session["YearExam"] = Year;

            this.StudentAgeGropID     = Convert.ToInt32(hashtable["StudentAgeGropID"].ToString());
            Session["Example"]        = StudentAgeGropID;
            this.StudentAgeGropIDPara = Convert.ToInt32(Session["Example"]);
            BindValuesToLabels();

            StageSecondCalling();
        }
        else if (rpt.ID == "rptAgeGroup")
        {
            rptSchool.Visible   = false;
            rptAgeGroup.Visible = false;
            rptStudent.Visible  = true;
            FirstRpt.Visible    = true;
            SecondRpt.Visible   = false;
            ThirdReport.Visible = true;
            btnback.Visible     = true;

            this.SchoolID        = Convert.ToInt32(ddlSchool.SelectedValue.ToString());
            this.BoardID         = Convert.ToInt32(ddlBoard.SelectedValue.ToString());
            this.MediumID        = Convert.ToInt32(ddlMedium.SelectedValue.ToString());
            this.GroupName       = (hashtable["GroupName"].ToString());
            this.Year            = ddlYear.SelectedItem.ToString();
            this.BMSID           = Convert.ToInt32(hashtable["BMSID"].ToString());
            this.BMS             = (hashtable["BMS"].ToString());
            this.DivisionID      = Convert.ToInt32(hashtable["DivisionID"].ToString());
            this.Division        = (hashtable["Division"].ToString());
            this.Description     = (hashtable["Description"].ToString());
            lblTeacherValue.Text = AppSessions.UserName;
            BindValuesToLabels2();

            StageThirdCalling();
        }
        else if (rpt.ID == "rptStudent")
        {
            std.Visible = true;

            this.StudentID          = Convert.ToInt32(hashtable["StudentID"].ToString());
            Session["NewStudentID"] = StudentID;
            Session["ReportYear"]   = Session["YearExam"].ToString();
            std.BindStudentDetails(Session["NewStudentID"].ToString());

            mpStudent.Show();
        }
    }