コード例 #1
0
        public DisplayChart GetQuotationAmountForLastTweleveMonthsCompleted(int VendorId)
        {
            DisplayChart objModel = new DisplayChart();

            try
            {
                List <string> CountList = new List <string>();
                List <string> MonList   = new List <string>();
                string        sqlstr    = "Select sum(count) as count, ''''+mon+'''' as mon from ACRFVW_GetLastTweleveMonthQuotationAmountWithStatus "
                                          + " where VendorId in (0," + VendorId + ") and QuotationStatus in ('','" + QuotationType.Completed + "') group by yyyy,mon,mon_number order by mon_number";
                var connection = gConnection.Connection();
                connection.Open();
                SqlCommand    cmd = new SqlCommand(sqlstr, connection);
                SqlDataReader sdr = cmd.ExecuteReader();
                while (sdr.Read())
                {
                    CountList.Add(sdr["count"].ToString());
                    MonList.Add(sdr["mon"].ToString());
                }
                connection.Close();
                objModel.Count = CountList;
                objModel.Text  = MonList;
            }
            catch (Exception ex)
            {
                ErrorHandlerClass.LogError(ex);
            }
            return(objModel);
        }
コード例 #2
0
        public IHttpActionResult GetQuotationAmountForLastTweleveMonthsCompleted(int VendorId)
        {
            DisplayChart objDispChart = new DisplayChart();

            try
            {
                objDispChart = objVDVM.GetQuotationAmountForLastTweleveMonthsCompleted(VendorId);
            }
            catch (Exception ex)
            {
                ErrorHandlerClass.LogError(ex);
            }
            return(Ok(new { results = objDispChart }));
        }
コード例 #3
0
 private void ShowChart()
 {
     analyzer.Analyze((int)DisplayChart.ActualWidth, (int)DisplayChart.ActualHeight);
     DisplayChart.NavigateToString(analyzer.Chart.ChartHTML);
 }