Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            Property = REIQ.Access.Property.GetFromPropertyId(this.PropertyId);

            if (Property != null)
            {
                Suburb = REIQ.Access.Suburb.GetFromName(Property.suburb);

                if (!IsPostBack)
                {
                    //Suburb Chart stuff
                    ch = new ChartClass();
                    ch.intChartRange = Convert.ToInt32("4");

                    cboChartType.SelectedValue = ChartType.ToString();

                    if (Suburb != null)
                    {
                        DataTable dtsuburbChart = ch.GetSubrub("any", Suburb.name, Suburb.postcode == null ? "0" : Suburb.postcode.ToString());

                        if (dtsuburbChart.Rows.Count > 0)
                        {
                            chartwork(int.Parse(dtsuburbChart.Rows[0]["suburbid"].ToString()), dtsuburbChart.Rows[0]["suburbname"].ToString());
                        }
                    }
                }
            }
        }
        catch (Exception ex)
        {
            AutoMail.sendErrorMail(ex);
        }
    }
Example #2
0
        public List <ChartClass> ChartValue()
        {
            List <Subject> liste = subRepo.GetAll();

            foreach (var item in liste)
            {
                int count = qRepo.GetAll().Where(p => p.SubjectID == item.Id).ToList().Count;
                if (count > 0)
                {
                    ChartClass c = new ChartClass();
                    c.value     = count;
                    c.highlight = "#006391";
                    c.label     = item.Name;
                    c.color     = "#0072A5";
                    chartList.Add(c);
                }
            }
            return(chartList);
        }
Example #3
0
        public List <ChartClass> ChartUserValue()
        {
            int        studentCount = sRepo.GetAll().ToList().Count;
            int        trainerCount = tRepo.GetAll().ToList().Count;
            ChartClass c            = new ChartClass();

            c.value     = studentCount;
            c.highlight = "#00BEBB";
            c.label     = "Öğrenciler";
            c.color     = "#1CCDCA";
            chartListUser.Add(c);

            ChartClass c1 = new ChartClass();

            c1.value     = trainerCount;
            c1.highlight = "#868686";
            c1.label     = "Eğitmenler";
            c1.color     = "#868686";
            chartListUser.Add(c1);

            return(chartListUser);
        }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            Suburb = REIQ.Access.Suburb.GetFromName(SuburbName);

            if (!IsPostBack)
            {
                //Binding Suburbs
                //DataTable dtsuburb = ch.GetAllSubrubWithdesc("1000");

                //ahc.connection.Close();

                //for (int i = 0; i < dtsuburb.Rows.Count; i++)
                //{
                //    cboSuburbInfo.Items.Add(new ListItem(dtsuburb.Rows[i]["name"].ToString() + ", " + dtsuburb.Rows[i]["postcode"].ToString(), dtsuburb.Rows[i]["sid"].ToString()));
                //}

                //cboSuburbInfo.DataSource = REIQ.Access.Suburb.GetAllSuburbsByTop(1000);

                //cboSuburbInfo.Items.Insert(0, new ListItem("-Select Suburb-", ""));
                //cboSuburbInfo.DataBind();


                //Bedrooms setup
                cboSuburbInfo.Items.Add(new ListItem("Select Suburb", ""));
                foreach (REIQ.Entities.Suburb suburb in REIQ.Access.Suburb.GetAllSuburbsByTop(2000))
                {
                    cboSuburbInfo.Items.Add(new ListItem(suburb.name, suburb.name));
                }
                cboSuburbInfo.DataBind();

                cboSuburbInfo.SelectedValue = SuburbName;


                //if (!String.IsNullOrEmpty(Request.QueryString["su"]) && Request.QueryString["postcode"] != null)
                //{
                //    strSearchSuburb = Request.QueryString["su"].ToString();
                //    strSearchPostcode = Request.QueryString["postcode"].ToString();
                //}
                //else
                //{
                //    //cboSuburbInfo.SelectedIndex = 1;

                //    //DataRow[] drsuburb = dtsuburb.Select("sid=" + cboSuburbInfo.SelectedValue);

                //    //strSearchSuburb = drsuburb[0]["name"].ToString();
                //    //strSearchPostcode = drsuburb[0]["postcode"].ToString();
                //}

                //Suburb Chart stuff
                ch = new ChartClass();
                ch.intChartRange = Convert.ToInt32("4");

                cboChartType.SelectedValue = ChartType.ToString();

                if (Suburb != null)
                {
                    DataTable dtsuburbChart = ch.GetSubrub("any", Suburb.name, Suburb.postcode == null ? "0" : Suburb.postcode.ToString());

                    if (dtsuburbChart.Rows.Count > 0)
                    {
                        chartwork(int.Parse(dtsuburbChart.Rows[0]["suburbid"].ToString()), dtsuburbChart.Rows[0]["suburbname"].ToString());
                    }
                }
            }
        }
        catch (Exception ex)
        {
            AutoMail.sendErrorMail(ex);
        }
    }