示例#1
0
        protected void rcomCompany_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
        {
            rcomCycle.Enabled = true;
            List <tblCycle> cycleObjList;
            GetInfo         bllGetInfo = new GetInfo();

            cycleObjList = bllGetInfo.GetCycleByCompanyId(rcomCompany.SelectedItem.Value);
            if (cycleObjList != null && cycleObjList.Count > 0)
            {
                rcomCycle.DataSource     = cycleObjList;
                rcomCycle.DataTextField  = "Cycle";
                rcomCycle.DataValueField = "Cycle";
                rcomCycle.DataBind();
            }
            else
            {
                tblCycle cycleObj = new tblCycle();
                cycleObj.Description = "N/A";
                cycleObjList.Add(cycleObj);
                rcomCycle.DataSource     = cycleObjList;
                rcomCycle.DataTextField  = "Description";
                rcomCycle.DataValueField = "Description";
                rcomCycle.DataBind();
                rcomCycle.Enabled = false;
            }
        }
示例#2
0
        protected void BillingChartDataBinding()
        {
            //获取当前年的月底日期
            string firstMothDateTimeStr =
                DateTime.Parse(DateTime.Now.ToString("01/01/yyyy")).AddMonths(1).AddDays(-1).ToShortDateString();
            DateTime firstMothDate = DateTime.Parse(firstMothDateTimeStr);

            //生成Chart的X轴角标
            dt = new DataTable();
            DataColumn transaction = new DataColumn("Amount");
            transaction.DataType = typeof(int);
            dt.Columns.Add(transaction);
            transaction = new DataColumn("month");
            transaction.DataType = typeof(string);
            dt.Columns.Add(transaction);

            GetInfo bllGetInfo = new GetInfo();

            //decimal usageAmount = bllGetInfo.GetBillingInfo();
            //统计当前月份的前N个月的数据
            for (int i = DateTime.Now.Month - 7; i < DateTime.Now.Month - 1; i++)
            {
                DateTime currentDate = firstMothDate.AddMonths(i);

                dt.Rows.Add(new object[] { bllGetInfo.GetBillingInfo(currentDate), currentDate.ToString("MM/yyyy") });
            }
            RChartCDProBilling.DataSource = dt;
            RChartCDProBilling.DataBind();
        }
示例#3
0
        protected void BillingChartDataBinding()
        {
            //获取当前年的月底日期
            string firstMothDateTimeStr =
                DateTime.Parse(DateTime.Now.ToString("01/01/yyyy")).AddMonths(1).AddDays(-1).ToShortDateString();
            DateTime firstMothDate = DateTime.Parse(firstMothDateTimeStr);

            //生成Chart的X轴角标
            dt = new DataTable();
            DataColumn transaction = new DataColumn("Amount");

            transaction.DataType = typeof(int);
            dt.Columns.Add(transaction);
            transaction          = new DataColumn("month");
            transaction.DataType = typeof(string);
            dt.Columns.Add(transaction);

            GetInfo bllGetInfo = new GetInfo();

            //decimal usageAmount = bllGetInfo.GetBillingInfo();
            //统计当前月份的前N个月的数据
            for (int i = DateTime.Now.Month - 7; i < DateTime.Now.Month - 1; i++)
            {
                DateTime currentDate = firstMothDate.AddMonths(i);

                dt.Rows.Add(new object[] { bllGetInfo.GetBillingInfo(currentDate), currentDate.ToString("MM/yyyy") });
            }
            RChartCDProBilling.DataSource = dt;
            RChartCDProBilling.DataBind();
        }
示例#4
0
        protected void BindingGridView()
        {
            GetInfo bllGetInfo = new GetInfo();
            List<ViewTopCustomer> viewTopCustomerList=bllGetInfo.GetTopCustomer();

            rGridCustomer.DataSource = viewTopCustomerList;
            rGridCustomer.DataBind();
        }
示例#5
0
        protected void BindingGridView()
        {
            GetInfo bllGetInfo = new GetInfo();
            List <ViewTopCustomer> viewTopCustomerList = bllGetInfo.GetTopCustomer();

            rGridCustomer.DataSource = viewTopCustomerList;
            rGridCustomer.DataBind();
        }
        protected void BindingCombox()
        {
            List<tblCompany> companyObjList;
            GetInfo bllGetInfo = new GetInfo();
            companyObjList=bllGetInfo.GetCompany();
            if (companyObjList != null && companyObjList.Count>0)
            {
                tblCompany companyObj = new tblCompany();
                companyObj.CompName = "N/A";
                companyObj.CompanyID = "N/A";
                companyObjList.Add(companyObj);
                rcomCompany.DataSource = companyObjList;
                rcomCompany.DataTextField = "CompName";
                rcomCompany.DataValueField = "CompanyID";
                rcomCompany.DataBind();

                rcomCompany.SelectedValue = "N/A";
            }
        }
示例#7
0
        protected void BindingCombox()
        {
            List <tblCompany> companyObjList;
            GetInfo           bllGetInfo = new GetInfo();

            companyObjList = bllGetInfo.GetCompany();
            if (companyObjList != null && companyObjList.Count > 0)
            {
                tblCompany companyObj = new tblCompany();
                companyObj.CompName  = "N/A";
                companyObj.CompanyID = "N/A";
                companyObjList.Add(companyObj);
                rcomCompany.DataSource     = companyObjList;
                rcomCompany.DataTextField  = "CompName";
                rcomCompany.DataValueField = "CompanyID";
                rcomCompany.DataBind();

                rcomCompany.SelectedValue = "N/A";
            }
        }
示例#8
0
        protected void BillingChartDataBinding(string company = null, string cycle = null, string accNum = null)
        {
            //获取当前年的月底日期
            string firstMothDateTimeStr =
                DateTime.Parse(DateTime.Now.ToString("01/01/yyyy")).AddMonths(1).AddDays(-1).ToShortDateString();
            DateTime firstMothDate = DateTime.Parse(firstMothDateTimeStr);

            //生成Chart的X轴角标
            DataTable  dt          = new DataTable();
            DataColumn transaction = new DataColumn("Amount");

            transaction.DataType = typeof(int);
            dt.Columns.Add(transaction);
            transaction          = new DataColumn("month");
            transaction.DataType = typeof(string);
            dt.Columns.Add(transaction);

            GetInfo bllGetInfo = new GetInfo();

            //decimal usageAmount = bllGetInfo.GetBillingInfo();
            //统计当前月份的前N个月的数据
            if (string.IsNullOrEmpty(company) && string.IsNullOrEmpty(cycle) && string.IsNullOrEmpty(accNum))
            {
                //默认的查询所有的数据
                for (int i = DateTime.Now.Month - 7; i < DateTime.Now.Month - 1; i++)
                {
                    DateTime currentDate = firstMothDate.AddMonths(i);

                    dt.Rows.Add(new object[] { bllGetInfo.GetBillingInfo(currentDate), currentDate.ToString("MM/dd/yyyy") });
                }
            }
            else if (!string.IsNullOrEmpty(company) && string.IsNullOrEmpty(cycle) && string.IsNullOrEmpty(accNum))
            {
                //查询公司的
                for (int i = DateTime.Now.Month - 7; i < DateTime.Now.Month - 1; i++)
                {
                    DateTime currentDate = firstMothDate.AddMonths(i);

                    dt.Rows.Add(new object[] { bllGetInfo.GetBillingInfo(currentDate, company), currentDate.ToString("MM/dd/yyyy") });
                }
            }
            else if (!string.IsNullOrEmpty(company) && !string.IsNullOrEmpty(cycle) && string.IsNullOrEmpty(accNum))
            {
                //查询公司和相应区域
                for (int i = DateTime.Now.Month - 7; i < DateTime.Now.Month - 1; i++)
                {
                    DateTime currentDate = firstMothDate.AddMonths(i);

                    dt.Rows.Add(new object[] { bllGetInfo.GetBillingInfo(currentDate, company, cycle), currentDate.ToString("MM/dd/yyyy") });
                }
            }
            else if (!string.IsNullOrEmpty(company) && !string.IsNullOrEmpty(cycle) && !string.IsNullOrEmpty(accNum))
            {
                //查询公司和相应区域
                for (int i = DateTime.Now.Month - 7; i < DateTime.Now.Month - 1; i++)
                {
                    DateTime currentDate = firstMothDate.AddMonths(i);

                    dt.Rows.Add(new object[] { bllGetInfo.GetBillingInfo(currentDate, company, cycle, accNum), currentDate.ToString("MM/dd/yyyy") });
                }
            }
            RChartCDProBilling.DataSource = dt;
            RChartCDProBilling.DataBind();
        }
        protected void rcomCompany_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
        {
            rcomCycle.Enabled = true;
            List<tblCycle> cycleObjList;
            GetInfo bllGetInfo = new GetInfo();

            cycleObjList = bllGetInfo.GetCycleByCompanyId(rcomCompany.SelectedItem.Value);
            if (cycleObjList != null && cycleObjList.Count>0)
            {
                rcomCycle.DataSource = cycleObjList;
                rcomCycle.DataTextField = "Cycle";
                rcomCycle.DataValueField = "Cycle";
                rcomCycle.DataBind();
            }
            else
            {
                tblCycle cycleObj = new tblCycle();
                cycleObj.Description = "N/A";
                cycleObjList.Add(cycleObj);
                rcomCycle.DataSource = cycleObjList;
                rcomCycle.DataTextField = "Description";
                rcomCycle.DataValueField = "Description";
                rcomCycle.DataBind();
                rcomCycle.Enabled = false;
            }
        }
        protected void BillingChartDataBinding(string company = null, string cycle = null, string accNum = null)
        {
            //获取当前年的月底日期
            string firstMothDateTimeStr =
                DateTime.Parse(DateTime.Now.ToString("01/01/yyyy")).AddMonths(1).AddDays(-1).ToShortDateString();
            DateTime firstMothDate = DateTime.Parse(firstMothDateTimeStr);

            //生成Chart的X轴角标
            DataTable dt = new DataTable();
            DataColumn transaction = new DataColumn("Amount");
            transaction.DataType = typeof(int);
            dt.Columns.Add(transaction);
            transaction = new DataColumn("month");
            transaction.DataType = typeof(string);
            dt.Columns.Add(transaction);

            GetInfo bllGetInfo = new GetInfo();

            //decimal usageAmount = bllGetInfo.GetBillingInfo();
            //统计当前月份的前N个月的数据
            if (string.IsNullOrEmpty(company) && string.IsNullOrEmpty(cycle) && string.IsNullOrEmpty(accNum))
            {
                //默认的查询所有的数据
                for (int i = DateTime.Now.Month-7; i < DateTime.Now.Month-1; i++)
                {
                    DateTime currentDate = firstMothDate.AddMonths(i);

                    dt.Rows.Add(new object[] { bllGetInfo.GetBillingInfo(currentDate), currentDate.ToString("MM/dd/yyyy") });
                }
            }
            else if (!string.IsNullOrEmpty(company) && string.IsNullOrEmpty(cycle) && string.IsNullOrEmpty(accNum))
            {
                //查询公司的
                for (int i = DateTime.Now.Month - 7; i < DateTime.Now.Month-1; i++)
                {
                    DateTime currentDate = firstMothDate.AddMonths(i);

                    dt.Rows.Add(new object[] { bllGetInfo.GetBillingInfo(currentDate, company), currentDate.ToString("MM/dd/yyyy") });
                }
            }
            else if (!string.IsNullOrEmpty(company) && !string.IsNullOrEmpty(cycle) && string.IsNullOrEmpty(accNum))
            {
                //查询公司和相应区域
                for (int i = DateTime.Now.Month - 7; i < DateTime.Now.Month-1; i++)
                {
                    DateTime currentDate = firstMothDate.AddMonths(i);

                    dt.Rows.Add(new object[] { bllGetInfo.GetBillingInfo(currentDate, company, cycle), currentDate.ToString("MM/dd/yyyy") });
                }
            }
            else if (!string.IsNullOrEmpty(company) && !string.IsNullOrEmpty(cycle) && !string.IsNullOrEmpty(accNum))
            {
                //查询公司和相应区域
                for (int i = DateTime.Now.Month - 7; i < DateTime.Now.Month-1; i++)
                {
                    DateTime currentDate = firstMothDate.AddMonths(i);

                    dt.Rows.Add(new object[] { bllGetInfo.GetBillingInfo(currentDate, company, cycle, accNum), currentDate.ToString("MM/dd/yyyy") });
                }
            }
            RChartCDProBilling.DataSource = dt;
            RChartCDProBilling.DataBind();
        }