示例#1
0
    protected void FillData(int Type)
    {
        if (Request.Params["type"] != null)
        {
            PIKCV.BUS.Orders objOrders = new PIKCV.BUS.Orders();
            PIKCV.COM.EnumDB.OrderProcessTypeCode ProcessTypeCode = PIKCV.COM.EnumDB.OrderProcessTypeCode.unknown;

            if (Type == (int)PIKCV.COM.EnumDB.OrderProcessTypeCode.non_invoiced)
            {
                ltlTransaction_non_invoiced.Visible = true;
                ltlTransaction_paid.Visible         = false;
                ltlTransaction_unpaid.Visible       = false;
                ProcessTypeCode = PIKCV.COM.EnumDB.OrderProcessTypeCode.non_invoiced;
            }
            else if (Type == (int)PIKCV.COM.EnumDB.OrderProcessTypeCode.paid)
            {
                ltlTransaction_paid.Visible         = true;
                ltlTransaction_non_invoiced.Visible = false;
                ltlTransaction_unpaid.Visible       = false;
                ProcessTypeCode = PIKCV.COM.EnumDB.OrderProcessTypeCode.paid;
            }
            else if (Type == (int)PIKCV.COM.EnumDB.OrderProcessTypeCode.unpaid)
            {
                ltlTransaction_unpaid.Visible       = true;
                ltlTransaction_non_invoiced.Visible = false;
                ltlTransaction_paid.Visible         = false;
                ProcessTypeCode = PIKCV.COM.EnumDB.OrderProcessTypeCode.unpaid;
            }
            ddlTransactionType.SelectedValue = Type.ToString();

            if (ProcessTypeCode != PIKCV.COM.EnumDB.OrderProcessTypeCode.unknown)
            {
                DataTable dt = objOrders.GetTransactions(this.smCompanyID, ProcessTypeCode, this.smLanguageID, PIKCV.COM.EnumDB.OrderTypeCode.CreditBuy);
                if (dt.Rows.Count > 0)
                {
                    UPaging1.GeneratePager(ref dt, rptTransactions);
                    ltlNoRecord.Visible     = false;
                    rptTransactions.Visible = true;
                    UPaging1.Visible        = true;
                }
                else
                {
                    ltlNoRecord.Visible     = true;
                    rptTransactions.Visible = false;
                    UPaging1.Visible        = false;
                }
            }
        }
    }
示例#2
0
    protected void FillData(DateTime OrderStartDate, DateTime OrderEndDate)
    {
        PIKCV.BUS.Orders objOrders = new PIKCV.BUS.Orders();
        DataTable        dt        = objOrders.GetTransactionReport(this.smCompanyID, PIKCV.COM.EnumDB.OrderTypeCode.EmployeeInfoAchieving,
                                                                    PIKCV.COM.EnumDB.OrderTypeCode.CreditBuy, PIKCV.COM.EnumDB.OrderProcessTypeCode.paid, true, this.smLanguageID, OrderStartDate, OrderEndDate);

        if (dt.Rows.Count > 0)
        {
            UPaging1.GeneratePager(ref dt, rptReports);
            rptReports.Visible    = true;
            ltlNoRecord.Visible   = false;
            ChartControl1.Visible = true;
            CreateChart();
        }
        else
        {
            rptReports.Visible    = false;
            ltlNoRecord.Visible   = true;
            ChartControl1.Visible = false;
        }
    }