Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AgentRepository agentRepository = new AgentRepository();
        DataSet         dsAgent         = agentRepository.GetAllAgent();

        rptAgent.DataSource = dsAgent;
        rptAgent.DataBind();
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        DataSet dsCustomer = customerRepository.GetAllCustomer();

        if (dsCustomer != null)
        {
            custoemrCount = dsCustomer.Tables[0].Rows.Count;
        }

        DataSet dsAgent = agentRepository.GetAllAgent();

        if (dsAgent != null)
        {
            agentCount = dsAgent.Tables[0].Rows.Count;
        }

        DataSet dsOrder = orderRepository.GetAllOrders();

        DataSet dsConfirmdOrder = orderRepository.GetAllConfirmOrders();

        if (dsConfirmdOrder != null)
        {
            orderConfirmCount = dsConfirmdOrder.Tables[0].Rows.Count;
        }

        DataSet dsSaveOnlyOrder = orderRepository.GetAllSaveOnlyOrders();

        if (dsSaveOnlyOrder != null)
        {
            orderSaveOnlyCount = dsSaveOnlyOrder.Tables[0].Rows.Count;
        }


        lblAgentCount.Text              = agentCount.ToString();
        lblConfirmOrderCount.Text       = orderConfirmCount.ToString();
        lblSaveOrderCount.Text          = orderSaveOnlyCount.ToString();
        lblRegisteredCustomerCount.Text = custoemrCount.ToString();


        rptCustomer.DataSource = dsCustomer;
        rptCustomer.DataBind();


        rptAgent.DataSource = dsAgent;
        rptAgent.DataBind();

        rptOrder.DataSource = dsOrder;
        rptOrder.DataBind();
    }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet dsCustomer = customerRepository.GetAllCustomer();

            if (dsCustomer != null)
            {
                custoemrCount = dsCustomer.Tables[0].Rows.Count;
            }

            DataSet dsAgent = agentRepository.GetAllAgent();

            if (dsAgent != null)
            {
                agentCount = dsAgent.Tables[0].Rows.Count;
            }

            DataSet dsCompletedOrder = orderRepository.GetAllCompletedOrders();

            if (dsCompletedOrder != null)
            {
                orderCompletedCount = dsCompletedOrder.Tables[0].Rows.Count;
            }

            DataSet dsPendingOrder = orderRepository.GetAllPendingOrders();

            if (dsPendingOrder != null)
            {
                orderPendingCount = dsPendingOrder.Tables[0].Rows.Count;
            }


            lblAgentCount.Text              = agentCount.ToString();
            lblCompletedOrderCount.Text     = orderCompletedCount.ToString();
            lblPendingOrderCount.Text       = orderPendingCount.ToString();
            lblRegisteredCustomerCount.Text = custoemrCount.ToString();


            rptCustomer.DataSource = dsCustomer;
            rptCustomer.DataBind();


            rptAgent.DataSource = dsAgent;
            rptAgent.DataBind();
        }