Ejemplo n.º 1
0
        protected void btFind_Click(object sender, EventArgs e)
        {
            DateTime?from = ctrlDateFrom.SelectedDate;
            DateTime?to   = ctrlDateTo.SelectedDate;

            List <MemberBO> businessMen = this.MemberService.GetBusinessMen(this.LoggedInOrganizationIds);

            foreach (MemberBO m in businessMen)
            {
                BussinessReportByUser report = new BussinessReportByUser();
                report          = (BussinessReportByUser)Page.LoadControl("~/Modules/BussinessReportByUser.ascx");
                report.ID       = m.UserId.ToString();
                report.From     = from;
                report.To       = to;
                report.MemberId = m.UserId;
                panelBusiness.Controls.Add(report);
            }
            List <int> orgsId = new List <int>();

            if (int.Parse(ddlCompany.SelectedValue) == 0)
            {
                foreach (ListItem i in ddlCompany.Items)
                {
                    if (int.Parse(i.Value) != 0)
                    {
                        orgsId.Add(int.Parse(i.Value));
                    }
                }
            }
            else
            {
                orgsId.Add(int.Parse(ddlCompany.SelectedValue));
            }

            List <MemberBO> designers = this.MemberService.GetDesigners(orgsId);

            foreach (MemberBO m in designers)
            {
                DesignRequestReportByDesigner designReport = new DesignRequestReportByDesigner();
                designReport          = (DesignRequestReportByDesigner)Page.LoadControl("~/Modules/DesignRequestReportByDesigner.ascx");
                designReport.MemberId = m.UserId;
                designReport.From     = from;
                designReport.To       = to;
                panelDesignRequest.Controls.Add(designReport);
            }
        }
Ejemplo n.º 2
0
        protected void btFind_Click(object sender, EventArgs e)
        {
            DateTime? from = ctrlDateFrom.SelectedDate;
            DateTime? to = ctrlDateTo.SelectedDate;

            List<MemberBO> businessMen = this.MemberService.GetBusinessMen(this.LoggedInOrganizationIds);
            foreach (MemberBO m in businessMen)
            {
                BussinessReportByUser report = new BussinessReportByUser();
                report = (BussinessReportByUser)Page.LoadControl("~/Modules/BussinessReportByUser.ascx");
                report.ID = m.UserId.ToString();
                report.From = from;
                report.To = to;
                report.MemberId = m.UserId;
                panelBusiness.Controls.Add(report);
            }
            List<int> orgsId = new List<int>();
            if (int.Parse(ddlCompany.SelectedValue) == 0)
            {
                foreach (ListItem i in ddlCompany.Items)
                {
                    if (int.Parse(i.Value) != 0)
                        orgsId.Add(int.Parse(i.Value));
                }
            }
            else
            {
                orgsId.Add(int.Parse(ddlCompany.SelectedValue));
            }

            List<MemberBO> designers = this.MemberService.GetDesigners(orgsId);
            foreach (MemberBO m in designers)
            {
                DesignRequestReportByDesigner designReport = new DesignRequestReportByDesigner();
                designReport = (DesignRequestReportByDesigner)Page.LoadControl("~/Modules/DesignRequestReportByDesigner.ascx");
                designReport.MemberId = m.UserId;
                designReport.From = from;
                designReport.To = to;
                panelDesignRequest.Controls.Add(designReport);
            }
        }