123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157 |
- // DinDanForm.cpp : implementation file
- //
- #include "stdafx.h"
- #include "ylgl.h"
- #include "DinDanForm.h"
- #include "MyMdi.H"
- #include "VcPlot.h"
- #include "VcAxis.h"
- #include "VcValueScale.h"
- #include "VcSeriesCollection.h"
- #include "VcSeries.h"
- #include "VcPen.h"
- #include "VcCategoryScale.h"
- #include "VcColor.h"
- #include "VcDataGrid.h"
- #include "VcBackdrop.h"
- #include "VcFill.h"
- #include "VcBrush.h"
- #include "VcDataPoints.h"
- #include "VcDataPoint.h"
- #include "VcDataPointLabel.h"
- #include "VcAxisTitle.h"
- #include "ShowMschart.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // DinDanForm IDC_RADIO25
- IMPLEMENT_DYNCREATE(DinDanForm, MyFormView)
- DinDanForm::DinDanForm()
- : MyFormView(DinDanForm::IDD)
- {
- //{{AFX_DATA_INIT(DinDanForm)
- m_year = atoi(g_date.Mid(0, 4));
- m_month = atoi(g_date.Mid(5, 2));
- m_day = atoi(g_date.Mid(8, 2));
- m_radio1 = 0;
- m_radio2 = 1;
- m_bInit = 0;
- m_taoxipos = 0;
- m_check1 = FALSE;
- m_pchild = NULL;
- //}}AFX_DATA_INIT
- }
- DinDanForm::~DinDanForm()
- {
- if (m_pchild)
- {
- m_pchild->DestroyWindow();
- delete m_pchild;
- m_pchild = NULL;
- }
- }
- void DinDanForm::DoDataExchange(CDataExchange* pDX)
- {
- MyFormView::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(DinDanForm)
- DDX_Control(pDX, IDC_COMBO1, m_combo1);
- DDX_Control(pDX, IDC_SPIN3, m_spinday);
- DDX_Control(pDX, IDC_SPIN2, m_spinmonth);
- DDX_Control(pDX, IDC_SPIN1, m_spinyear);
- DDX_Control(pDX, IDC_STATIC1, m_static1);
- DDX_Text(pDX, IDC_EDITyear, m_year);
- DDV_MinMaxUInt(pDX, m_year, 1900, 3000);
- DDX_Text(pDX, IDC_EDITmonth, m_month);
- DDV_MinMaxUInt(pDX, m_month, 1, 12);
- DDX_Text(pDX, IDC_EDITday, m_day);
- DDV_MinMaxUInt(pDX, m_day, 1, 31);
- DDX_Radio(pDX, IDC_RADIO3, m_radio1);
- DDX_Control(pDX, IDC_MSCHART3, m_Chart3);
- DDX_Radio(pDX, IDC_RADIO6, m_radio2);
- DDX_Check(pDX, IDC_CHECK1, m_check1);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(DinDanForm, MyFormView)
- //{{AFX_MSG_MAP(DinDanForm)
- ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
- ON_EN_CHANGE(IDC_EDITyear, OnChangeEDITyear)
- ON_EN_CHANGE(IDC_EDITmonth, OnChangeEDITmonth)
- ON_EN_CHANGE(IDC_EDITday, OnChangeEDITday)
- ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
- ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
- ON_BN_CLICKED(IDC_RADIO6, OnRadio6)
- ON_BN_CLICKED(IDC_RADIO7, OnRadio7)
- ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
- ON_BN_CLICKED(IDC_RADIO8, OnRadio8)
- ON_BN_CLICKED(IDC_RADIO10, OnRadio10)
- ON_BN_CLICKED(IDC_RADIO11, OnRadio11)
- ON_BN_CLICKED(IDC_RADIO12, OnRadio12)
- ON_BN_CLICKED(IDC_RADIO13, OnRadio13)
- ON_BN_CLICKED(IDC_RADIO24, OnRadio24)
- ON_BN_CLICKED(IDC_RADIO25, OnRadio25)
- ON_BN_CLICKED(IDC_CHECK1, OnCheck1)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // DinDanForm diagnostics
- #ifdef _DEBUG
- void DinDanForm::AssertValid() const
- {
- MyFormView::AssertValid();
- }
- void DinDanForm::Dump(CDumpContext& dc) const
- {
- MyFormView::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // DinDanForm message handlers
- void DinDanForm::OnInitialUpdate()
- {
- MyFormView::OnInitialUpdate();
- // TODO: Add your specialized code here and/or call the base class
- if (!m_pchild)
- {
- m_pchild = new DinDanForm2;
- m_pchild->m_parent = (DWORD)this;
- m_pchild->m_pfilterarray = &m_filterarray;
- m_pchild->m_pfilterarray2 = &m_filterarray2;
- m_pchild->Create(IDD_DLGDinDanForm2, g_pMainWnd);
- }
- CRect rc;
- rc = g_rc;
- rc.left = 0;
- rc.right = g_rc.left;
- m_pchild->MoveWindow(rc);
- m_pchild->Init();
- m_pchild->ModeChange(m_radio1);
- // m_pchild->ShowWindow (SW_SHOW);
- #ifndef LKAY_VERSION
- GetDlgItem(IDC_RADIO11)->ShowWindow(0);
- #endif
- CMyMdi Mdi;
- Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
- // Here we create the outbar control using the splitter as its parent
- // and setting its id to the first pane.
- CRect rc2;
- GetWindowRect(rc2);
- ::MoveWindow(m_hWnd, g_rc.left, g_rc.top, g_rc.Width(), g_rc.Height(), TRUE);
- EnumChildWindows(m_hWnd, (WNDENUMPROC)EnumChildProc, 0);
- m_static1.SetFont(&g_titlefont);
- m_spinyear.SetRange(1900, 3000);
- m_spinmonth.SetRange(1, 12);
- m_spinday.SetRange(1, 31);
- VARIANT var;
- ///////////////////////////
- m_Chart3.GetBackdrop().GetFill().SetStyle(1);
- m_Chart3.GetBackdrop().GetFill().GetBrush().GetFillColor().Set(255, 255, 255);
- m_Chart3.SetShowLegend(TRUE);
- m_Chart3.SetChartType(1);
- // 栈模式
- m_Chart3.SetStacking(FALSE);
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetAuto(1); // 不自动标注Y轴刻度
- m_Chart3.GetPlot().GetAxis(0, var).GetCategoryScale().SetAuto(0); // 不自动标注X轴刻度
- m_Chart3.GetPlot().GetAxis(0, var).GetCategoryScale().SetDivisionsPerLabel(1);// 每刻度一个标注
- m_Chart3.GetPlot().GetAxis(0, var).GetCategoryScale().SetDivisionsPerTick(1); // 每刻度一个刻度线
- m_Chart3.SetColumnCount(6);
- m_Chart3.SetColumn(1);
- m_Chart3.SetColumnLabel((LPCTSTR)"全部");
- m_Chart3.SetColumn(2);
- m_Chart3.SetColumnLabel((LPCTSTR)"婚纱照");
- m_Chart3.SetColumn(3);
- m_Chart3.SetColumnLabel((LPCTSTR)"写真照");
- m_Chart3.SetColumn(4);
- m_Chart3.SetColumnLabel((LPCTSTR)"宝宝照");
- m_Chart3.SetColumn(5);
- m_Chart3.SetColumnLabel((LPCTSTR)"全家福");
- m_Chart3.SetColumn(6);
- m_Chart3.SetColumnLabel((LPCTSTR)"情侣照");
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(255, 0, 0);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(2).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(0, 255, 0);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(3).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(0, 0, 255);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(4).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(0, 255, 255);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(5).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(255, 255, 0);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(6).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(255, 0, 255);
- // 线宽(对点线图有效)
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(1).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(2).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(3).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(4).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(5).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(6).GetPen().SetWidth(30);
- // 数据点类型显示数据值的模式(对柱柱状图和点线图有效)
- // 0: 不显示 1: 显示在柱状图外
- // 2: 显示在柱状图内上方 3: 显示在柱状图内中间 4: 显示在柱状图内下方
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(2).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(3).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(4).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(5).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(6).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- ////////////////
- GetDlgItem(IDC_STATIC2)->GetWindowRect(rc2);
- ScreenToClient(rc2);
- m_Chart3.MoveWindow(rc2);
- m_combo1.GetWindowRect(rc2);
- ScreenToClient(rc2);
- rc2.bottom += 300;
- m_combo1.MoveWindow(rc2);
- m_bInit = 1;
- DateChange();
- }
- void DinDanForm::FillGrid()
- {
- }
- void DinDanForm::OnBUTclose()
- {
- // TODO: Add your control notification handler code here
- GetParent()->SendMessage(WM_CLOSE);
- }
- void DinDanForm::OnChangeEDITyear()
- {
- // TODO: If this is a RICHEDIT control, the control will not
- // send this notification unless you override the MyFormView::OnInitDialog()
- // function and call CRichEditCtrl().SetEventMask()
- // with the ENM_CHANGE flag ORed into the mask.
- DateChange();
- // TODO: Add your control notification handler code here
- }
- void DinDanForm::OnChangeEDITmonth()
- {
- // TODO: If this is a RICHEDIT control, the control will not
- // send this notification unless you override the MyFormView::OnInitDialog()
- // function and call CRichEditCtrl().SetEventMask()
- // with the ENM_CHANGE flag ORed into the mask.
- // DateChange();
- // TODO: Add your control notification handler code here
- }
- void DinDanForm::OnChangeEDITday()
- {
- // TODO: If this is a RICHEDIT control, the control will not
- // send this notification unless you override the MyFormView::OnInitDialog()
- // function and call CRichEditCtrl().SetEventMask()
- // with the ENM_CHANGE flag ORed into the mask.
- // DateChange();
- // TODO: Add your control notification handler code here
- }
- void DinDanForm::OnRadio3()
- {
- // TODO: Add your control notification handler code here
- m_filterarray.RemoveAll();
- KindChange();
- // UpdateData();
- GetDlgItem(IDC_RADIO6)->ShowWindow(m_radio1 == 0 || m_radio1 == 7 || m_radio1 == 8);
- GetDlgItem(IDC_RADIO7)->ShowWindow(m_radio1 == 0 || m_radio1 == 7 || m_radio1 == 8);
- GetDlgItem(IDC_CHECK1)->ShowWindow(m_radio1 == 7 || m_radio1 == 1);
- GetDlgItem(IDC_RADIO12)->ShowWindow(m_radio1 == 4 || m_radio1 == 5 || m_radio1 == 6);
- GetDlgItem(IDC_RADIO13)->ShowWindow(m_radio1 == 4 || m_radio1 == 5 || m_radio1 == 6);
- if (m_radio1 == 4 || m_radio1 == 5 || m_radio1 == 6)
- GetDlgItem(IDC_COMBO1)->ShowWindow(0);
- else
- GetDlgItem(IDC_COMBO1)->ShowWindow(1);
- m_pchild->ModeChange(m_radio1);
- }
- void DinDanForm::OnRadio4()
- {
- // TODO: Add your control notification handler code here
- OnRadio3();
- }
- void DinDanForm::DateChange()
- {
- if (m_bInit == 0)
- return;
- m_spinyear.EnableWindow(0);
- m_spinmonth.EnableWindow(0);
- m_spinday.EnableWindow(0);
- UpdateData();
- int i;
- int g_nYearposTemp = g_nYearpos;
- BOOL bLastYear = 0;
- BOOL bThisYear = 0;
- #if JEFF_TEST_ON // 2015开始禁用跨年数据;
- int g_nYearposPre = -1;
- if (m_year >= 2014 && m_year <= atoi(g_date.Left(4)) && g_hisyeararray.GetSize())
- {
- g_nYearpos = -1;
- bThisYear = 1;
- if (m_year == 2014)
- {
- g_nYearposPre = GetYearPos(m_year - 1);
- }
- }
- else if (m_year <= 2013 && g_hisyeararray.GetSize())
- {
- g_nYearpos = GetYearPos(m_year);
- if (g_nYearpos != -1)
- g_nYearposPre = GetYearPos(m_year - 1);
- bLastYear = 1;
- }
- #else
- if (m_year == atoi(g_date.Left(4)) && g_hisyeararray.GetSize())
- bThisYear = 1;
- else if (m_year <= atoi(g_date.Left(4)) - 1 && g_hisyeararray.GetSize())
- bLastYear = 1;
- g_nYearpos = GetYearPos(m_year);
- #endif
- g_sendhead.bsql = 0;
- g_sendhead.code[0] = 172;
- g_sendhead.code[1] = 59;
- g_sendhead.tabcount = 2;
- CString sql, strdate, strdate2;
- strdate.Format("%04d-%02d-%02d", m_year, 1, 1);
- strdate2.Format("%04d-%02d-%02d", m_year, 12, 31);
- CRect rc;
- m_static1.GetWindowRect(rc);
- ScreenToClient(rc);
- InvalidateRect(rc);
- m_static1.SetWindowText(strdate.Left(4) + "订单图表");
- sql.Format("time1>='" + strdate + "' and time1<='" + strdate2 + "';[date]>='" + strdate + "' and [date]<='" + strdate2 + "'");
- g_pMainWnd->ProcessChatMessageRequest2(sql);
- if (g_bSendOK == 0)
- {
- g_nYearpos = g_nYearposTemp;
- m_spinyear.EnableWindow(1);
- m_spinmonth.EnableWindow(1);
- m_spinday.EnableWindow(1);
- return;
- }
- DataToArray(&m_dindanarray, &m_moneyarray);
- if (bLastYear)//如果是去年, 则加今年的补款
- {
- g_nYearpos = -1;//今年
- g_sendhead.bsql = 0;
- g_sendhead.code[0] = 172;
- g_sendhead.code[1] = 59;
- g_sendhead.tabcount = 2;
- CString sql, strdate, strdate2;
- strdate.Format("%04d-%02d-%02d", m_year, 1, 1);
- strdate2.Format("%04d-%02d-%02d", m_year, 12, 31);
- sql.Format("time1>='" + strdate + "' and time1<='" + strdate2 + "';[date]>='" + strdate + "' and [date]<='" + strdate2 + "'");
- g_pMainWnd->ProcessChatMessageRequest2(sql);
- if (g_bSendOK == 0)
- {
- g_nYearpos = g_nYearposTemp;
- m_spinyear.EnableWindow(1);
- m_spinmonth.EnableWindow(1);
- m_spinday.EnableWindow(1);
- return;
- }
- CArray<CStringArray, CStringArray>ThisYearm_dindanarray;
- CArray<CStringArray, CStringArray>ThisYearm_moneyarray;
- DataToArray(&ThisYearm_dindanarray, &ThisYearm_moneyarray);
- int oldsize = m_dindanarray.GetSize();
- int newsize = ThisYearm_dindanarray.GetSize();
- m_dindanarray.SetSize(oldsize + ThisYearm_dindanarray.GetSize());
- for (i = oldsize; i < oldsize + ThisYearm_dindanarray.GetSize(); i++)
- {
- m_dindanarray.ElementAt(i).Copy(ThisYearm_dindanarray.ElementAt(i - oldsize));
- }
- oldsize = m_moneyarray.GetSize();
- newsize = ThisYearm_moneyarray.GetSize();
- m_moneyarray.SetSize(oldsize + ThisYearm_moneyarray.GetSize());
- for (i = oldsize; i < oldsize + ThisYearm_moneyarray.GetSize(); i++)
- {
- m_moneyarray.ElementAt(i).Copy(ThisYearm_moneyarray.ElementAt(i - oldsize));
- }
- }
- else if (bThisYear)//如果是今年, 则加去年的补款
- {
- g_nYearpos = 0;//去年
- g_sendhead.bsql = 0;
- g_sendhead.code[0] = 172;
- g_sendhead.code[1] = 59;
- g_sendhead.tabcount = 2;
- CString sql, strdate, strdate2;
- strdate.Format("%04d-%02d-%02d", m_year, 1, 1);
- strdate2.Format("%04d-%02d-%02d", m_year, 12, 31);
- sql.Format("time1>='" + strdate + "' and time1<='" + strdate2 + "';[date]>='" + strdate + "' and [date]<='" + strdate2 + "'");
- g_pMainWnd->ProcessChatMessageRequest2(sql);
- if (g_bSendOK == 0)
- {
- g_nYearpos = g_nYearposTemp;
- m_spinyear.EnableWindow(1);
- m_spinmonth.EnableWindow(1);
- m_spinday.EnableWindow(1);
- return;
- }
- CArray<CStringArray, CStringArray>ThisYearm_dindanarray;
- CArray<CStringArray, CStringArray>ThisYearm_moneyarray;
- DataToArray(&ThisYearm_dindanarray, &ThisYearm_moneyarray);
- int oldsize = m_dindanarray.GetSize();
- int newsize = ThisYearm_dindanarray.GetSize();
- m_dindanarray.SetSize(oldsize + ThisYearm_dindanarray.GetSize());
- for (i = oldsize; i < oldsize + ThisYearm_dindanarray.GetSize(); i++)
- {
- m_dindanarray.ElementAt(i).Copy(ThisYearm_dindanarray.ElementAt(i - oldsize));
- }
- oldsize = m_moneyarray.GetSize();
- newsize = ThisYearm_moneyarray.GetSize();
- m_moneyarray.SetSize(oldsize + ThisYearm_moneyarray.GetSize());
- for (i = oldsize; i < oldsize + ThisYearm_moneyarray.GetSize(); i++)
- {
- m_moneyarray.ElementAt(i).Copy(ThisYearm_moneyarray.ElementAt(i - oldsize));
- }
- }
- g_nYearpos = g_nYearposTemp;
- m_filterarray.RemoveAll();
- KindChange();
- m_spinyear.EnableWindow(1);
- m_spinmonth.EnableWindow(1);
- m_spinday.EnableWindow(1);
- CStringArray m_typearray;
- CStringArray m_txnamearray;
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (::FindArray(&m_typearray, m_dindanarray.ElementAt(i).ElementAt(0)) == -1)
- m_typearray.Add(m_dindanarray.ElementAt(i).ElementAt(0));
- if (::FindArray(&m_txnamearray, m_dindanarray.ElementAt(i).ElementAt(7)) == -1)
- m_txnamearray.Add(m_dindanarray.ElementAt(i).ElementAt(7));
- }
- m_combo1.ResetContent();
- m_combo1.AddString("---全部---");
- m_combo1.AddString("---按套系类别---");
- for (i = 0; i < m_typearray.GetSize(); i++)
- {
- m_combo1.AddString(m_typearray.ElementAt(i));
- }
- m_taoxipos = m_combo1.GetCount();
- m_combo1.AddString("---按套系名称---");
- for (i = 0; i < m_txnamearray.GetSize(); i++)
- {
- m_combo1.AddString(m_txnamearray.ElementAt(i));
- }
- }
- void DinDanForm::KindChange2()
- {
- // UpdateData();
- int i;
- if (m_filterarray.GetSize() == 0)
- {
- CStringArray m_typearray;
- m_typearray.Add("应付");
- m_typearray.Add("前期");
- m_typearray.Add("后期");
- m_typearray.Add("已付");
- m_typearray.Add("欠款");
- m_pchild->TypeChange(&m_typearray);
- return;
- }
- m_Chart3.SetColumnCount(m_filterarray.GetSize());
- VARIANT var;
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetAuto(1);
- COLORREF col[10] = { \
- RGB(0, 0, 255), \
- RGB(0, 255, 255), \
- RGB(255, 0, 255), \
- RGB(0, 255, 0), \
- RGB(255, 0, 0), \
- RGB(255, 255, 0), \
- RGB(127, 0, 0), \
- RGB(0, 127, 0), \
- RGB(0, 0, 127), \
- RGB(127, 127, 0)
- };
- for (i = 0; i < m_filterarray.GetSize(); i++)
- {
- m_Chart3.SetColumn(i + 1);
- m_Chart3.SetColumnLabel((LPCTSTR)m_filterarray.ElementAt(i));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(GetRValue(col[i]), GetGValue(col[i]), GetBValue(col[i]));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- }
- float dindandata1[5][12] = { 0 };
- float dindandatacot[12] = { 0 };
- for (i = 0; i < 5; i++)
- {
- for (int j = 0; j < 12; j++)
- {
- dindandata1[i][j] = 0;
- }
- }
- CString stryear[12] = { "1月", \
- "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" };
- CString type;
- int selpos = m_combo1.GetCurSel();
- if (selpos != -1)
- m_combo1.GetLBText(selpos, type);
- if (selpos == -1 || type.IsEmpty() || type == "---全部---" || type == "---按套系类别---" || type == "---按套系名称---")
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- dindandatacot[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += 1.0;
- dindandata1[0][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[0][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(2));
- dindandata1[1][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[1][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(3));
- dindandata1[2][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[2][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(4));
- dindandata1[3][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[3][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(5));
- dindandata1[4][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[4][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(6));
- }
- }
- else if (selpos > m_taoxipos)
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(7) != type)continue;
- dindandatacot[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += 1.0;
- dindandata1[0][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[0][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(2));
- dindandata1[1][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[1][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(3));
- dindandata1[2][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[2][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(4));
- dindandata1[3][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[3][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(5));
- dindandata1[4][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[4][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(6));
- }
- }
- else
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(0) != type)continue;
- dindandatacot[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += 1.0;
- dindandata1[0][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[0][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(2));
- dindandata1[1][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[1][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(3));
- dindandata1[2][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[2][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(4));
- dindandata1[3][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[3][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(5));
- dindandata1[4][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[4][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_dindanarray.ElementAt(i).ElementAt(6));
- }
- }
- int nRowCount = 12;// VARIANT var;
- m_Chart3.SetRowCount(nRowCount);
- float ftemp;
- for (int row = 1; row <= nRowCount; ++row)
- {
- m_Chart3.SetRow(row);
- m_Chart3.SetRowLabel(stryear[row - 1]);
- for (int j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (m_check1)
- m_Chart3.GetDataGrid().SetData(row, j + 1, (int)(dindandata1[j][row - 1] / dindandatacot[row - 1]), 0);
- else
- m_Chart3.GetDataGrid().SetData(row, j + 1, dindandata1[j][row - 1], 0);
- }
- }
- m_Chart3.Refresh();
- }
- void DinDanForm::KindChange3()
- {
- m_Chart3.SetColumnCount(1);
- m_Chart3.SetColumn(1);
- m_Chart3.SetColumnLabel((LPCTSTR)"平均折扣");
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(255, 0, 0);
- VARIANT var;
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetAuto(0);
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetMaximum(10);
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetMinimum(0);
- float dindandata[12] = { 0 };
- int count[12] = { 0 };
- CString stryear[12] = { "1月", \
- "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" };
- CString str;
- int i;
- CString type;
- int selpos = m_combo1.GetCurSel();
- if (selpos != -1)
- m_combo1.GetLBText(selpos, type);
- if (selpos == -1 || type.IsEmpty() || type == "---全部---" || type == "---按套系类别---" || type == "---按套系名称---")
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (atof(m_dindanarray.ElementAt(i).ElementAt(8)) > 0)
- {
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(m_dindanarray.ElementAt(i).ElementAt(8));
- count[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- }
- }
- }
- else if (selpos > m_taoxipos)
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(7) != type)continue;
- if (atof(m_dindanarray.ElementAt(i).ElementAt(8)) > 0)
- {
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(m_dindanarray.ElementAt(i).ElementAt(8));
- count[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- }
- }
- }
- else
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(0) != type)continue;
- if (atof(m_dindanarray.ElementAt(i).ElementAt(8)) > 0)
- {
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(m_dindanarray.ElementAt(i).ElementAt(8));
- count[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- }
- }
- }
- /* for(int i=0; i<m_dindanarray.GetSize (); i++)
- {
- if(atof(m_dindanarray.ElementAt (i).ElementAt (8))>0)
- {
- dindandata[atoi(m_dindanarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+=atof(m_dindanarray.ElementAt (i).ElementAt (8));
- count[atoi(m_dindanarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]++;
- }
- }*/
- for (i = 0; i < 12; i++)
- {
- if (count[i])
- {
- str.Format("%0.1f", dindandata[i] / count[i]);
- dindandata[i] = atof(str);
- }
- }
- int nRowCount = 12;// VARIANT var;
- m_Chart3.SetRowCount(nRowCount);
- float ftemp;
- for (int row = 1; row <= nRowCount; ++row)
- {
- m_Chart3.SetRow(row);
- m_Chart3.SetRowLabel(stryear[row - 1]);
- m_Chart3.GetDataGrid().SetData(row, 1, dindandata[row - 1], 0);
- }
- m_Chart3.Refresh();
- }
- void DinDanForm::KindChange4()
- {
- m_Chart3.SetColumnCount(2);
- COLORREF col[10] = { \
- RGB(255, 0, 0), \
- RGB(0, 255, 0), \
- RGB(255, 0, 255), \
- RGB(0, 255, 0), \
- RGB(255, 0, 0), \
- RGB(255, 255, 0), \
- RGB(127, 0, 0), \
- RGB(0, 127, 0), \
- RGB(0, 0, 127), \
- RGB(127, 127, 0)
- };
- CStringArray m_typearray;
- m_typearray.Add("选片率=选片/拍摄");
- m_typearray.Add("平均加选(张)");
- int i = 0;
- for ( i = 0; i < 2; i++)
- {
- m_Chart3.SetColumn(i + 1);
- m_Chart3.SetColumnLabel((LPCTSTR)m_typearray.ElementAt(i));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(GetRValue(col[i]), GetGValue(col[i]), GetBValue(col[i]));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- }
- VARIANT var;
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetAuto(0);
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetMaximum(100);
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetMinimum(0);
- float dindandata[12] = { 0 };
- float dindandata2[12] = { 0 };
- float choosezs[12] = { 0 };
- int count[12] = { 0 };
- CString stryear[12] = { "1月", \
- "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" };
- CString str;
- CString type;
- int selpos = m_combo1.GetCurSel();
- if (selpos != -1)
- m_combo1.GetLBText(selpos, type);
- if (selpos == -1 || type.IsEmpty() || type == "---全部---" || type == "---按套系类别---" || type == "---按套系名称---")
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(12) == "OK")
- {
- if (atof(m_dindanarray.ElementAt(i).ElementAt(10)) > (atof(m_dindanarray.ElementAt(i).ElementAt(9)) + atof(m_dindanarray.ElementAt(i).ElementAt(11))))
- {
- choosezs[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(m_dindanarray.ElementAt(i).ElementAt(11));
- str.Format("%f", 100.0*(atof(m_dindanarray.ElementAt(i).ElementAt(9)) + atof(m_dindanarray.ElementAt(i).ElementAt(11))) / atof(m_dindanarray.ElementAt(i).ElementAt(10)));
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(str);
- count[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- }
- }
- }
- }
- else if (selpos > m_taoxipos)
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(7) != type)continue;
- if (m_dindanarray.ElementAt(i).ElementAt(12) == "OK")
- {
- if (atof(m_dindanarray.ElementAt(i).ElementAt(10)) > (atof(m_dindanarray.ElementAt(i).ElementAt(9)) + atof(m_dindanarray.ElementAt(i).ElementAt(11))))
- {
- choosezs[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(m_dindanarray.ElementAt(i).ElementAt(11));
- str.Format("%f", 100.0*(atof(m_dindanarray.ElementAt(i).ElementAt(9)) + atof(m_dindanarray.ElementAt(i).ElementAt(11))) / atof(m_dindanarray.ElementAt(i).ElementAt(10)));
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(str);
- count[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- }
- }
- }
- }
- else
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(0) != type)continue;
- if (m_dindanarray.ElementAt(i).ElementAt(12) == "OK")
- {
- if (atof(m_dindanarray.ElementAt(i).ElementAt(10)) > (atof(m_dindanarray.ElementAt(i).ElementAt(9)) + atof(m_dindanarray.ElementAt(i).ElementAt(11))))
- {
- choosezs[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(m_dindanarray.ElementAt(i).ElementAt(11));
- str.Format("%f", 100.0*(atof(m_dindanarray.ElementAt(i).ElementAt(9)) + atof(m_dindanarray.ElementAt(i).ElementAt(11))) / atof(m_dindanarray.ElementAt(i).ElementAt(10)));
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(str);
- count[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- }
- }
- }
- }
- /* for( i=0; i<m_dindanarray.GetSize (); i++)
- {
- if(m_dindanarray.ElementAt (i).ElementAt (12)=="OK")
- {
- if(atof(m_dindanarray.ElementAt (i).ElementAt (10))>(atof(m_dindanarray.ElementAt (i).ElementAt (9))+atof(m_dindanarray.ElementAt (i).ElementAt (11))))
- {
- choosezs[atoi(m_dindanarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+=atof(m_dindanarray.ElementAt (i).ElementAt (11));
- str.Format ("%f", 100.0*(atof(m_dindanarray.ElementAt (i).ElementAt (9))+atof(m_dindanarray.ElementAt (i).ElementAt (11)))/atof(m_dindanarray.ElementAt (i).ElementAt (10)) );
- dindandata[atoi(m_dindanarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+=atof(str);
- count[atoi(m_dindanarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]++;
- }
- }
- }*/
- for (i = 0; i < 12; i++)
- {
- if (count[i])
- {
- str.Format("%0.1f", dindandata[i] / count[i]);
- dindandata[i] = atof(str);
- str.Format("%0.1f", choosezs[i] / count[i]);
- dindandata2[i] = atof(str);
- }
- }
- int nRowCount = 12;// VARIANT var;
- m_Chart3.SetRowCount(nRowCount);
- float ftemp;
- for (int row = 1; row <= nRowCount; ++row)
- {
- m_Chart3.SetRow(row);
- m_Chart3.SetRowLabel(stryear[row - 1]);
- m_Chart3.GetDataGrid().SetData(row, 1, dindandata[row - 1], 0);
- m_Chart3.GetDataGrid().SetData(row, 2, dindandata2[row - 1], 0);
- }
- m_Chart3.Refresh();
- }
- extern void SortArray(BOOL bAscending, CStringArray &datearray, CArray<int, int>&valuearray);
- void DinDanForm::KindChange()
- {
- UpdateData();
- if (m_radio1 == 1)
- {
- KindChange2();
- return;
- }
- else if (m_radio1 == 2)
- {
- KindChange3();
- return;
- }
- else if (m_radio1 == 3)
- {
- KindChange4();
- return;
- }
- else if (m_radio1 == 4)
- {
- KindChange5();
- return;
- }
- else if (m_radio1 == 5)
- {
- KindChange6();
- return;
- }
- else if (m_radio1 == 6)
- {
- KindChange7();
- return;
- }
- else if (m_radio1 == 7)
- {//MessageBox("fd");
- KindChange8();
- return;
- }
- else if (m_radio1 == 8)
- { //MessageBox("fd2");
- KindChange9();
- return;
- }
- int i = 0;
- if (m_filterarray.GetSize() == 0)
- {
- CStringArray m_typearray;
- CArray<int, int>sortarray;
- for ( i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (::FindArray(&m_typearray, m_dindanarray.ElementAt(i).ElementAt(0)) == -1)
- {
- m_typearray.Add(m_dindanarray.ElementAt(i).ElementAt(0));
- sortarray.Add(0);
- }
- }
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- for (int j = 0; j < m_typearray.GetSize(); j++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(0) == m_typearray.ElementAt(j))
- {
- sortarray.SetAt(j, sortarray.ElementAt(j) + 1);
- }
- }
- }
- SortArray(1, m_typearray, sortarray);
- m_pchild->TypeChange(&m_typearray);
- return;
- }
- if (m_filterarray.GetSize() == 0)return;
- while (m_filterarray.GetSize()>10)
- m_filterarray.RemoveAt(m_filterarray.GetSize() - 1);
- int typecount = m_filterarray.GetSize();
- if (m_radio2)
- m_Chart3.SetColumnCount(typecount);
- else
- m_Chart3.SetColumnCount(1);
- VARIANT var;
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetAuto(1);
- COLORREF col[10] = { \
- RGB(255, 0, 0), \
- RGB(0, 255, 0), \
- RGB(0, 0, 255), \
- RGB(255, 255, 0), \
- RGB(0, 255, 255), \
- RGB(255, 0, 255), \
- RGB(127, 0, 0), \
- RGB(0, 127, 0), \
- RGB(0, 0, 127), \
- RGB(127, 127, 0)
- };
- if (m_radio2)
- {
- for (i = 0; i < m_filterarray.GetSize(); i++)
- {
- m_Chart3.SetColumn(i + 1);
- m_Chart3.SetColumnLabel((LPCTSTR)m_filterarray.ElementAt(i));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(GetRValue(col[i]), GetGValue(col[i]), GetBValue(col[i]));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- }
- }
- else
- {
- m_Chart3.SetColumn(1);
- m_Chart3.SetColumnLabel((LPCTSTR)"全部");
- }
- int dindandata[12] = { 0 };
- int dindandata1[10][12] = { 0 };
- for (i = 0; i < 10; i++)
- {
- for (int j = 0; j < 12; j++)
- {
- dindandata1[i][j] = 0;
- }
- }
- CString stryear[12] = { "1月", \
- "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" };
- ////////////
- CString type;
- int selpos = m_combo1.GetCurSel();
- if (selpos != -1)
- m_combo1.GetLBText(selpos, type);
- if (selpos == -1 || type.IsEmpty() || type == "---全部---" || type == "---按套系类别---" || type == "---按套系名称---")
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- for (int j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(0) == m_filterarray.ElementAt(j))
- {
- dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1;
- break;
- }
- }
- }
- }
- else if (selpos > m_taoxipos)
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(7) != type)continue;
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- for (int j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(0) == m_filterarray.ElementAt(j))
- {
- dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1;
- break;
- }
- }
- }
- }
- else
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(0) != type)continue;
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- for (int j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(0) == m_filterarray.ElementAt(j))
- {
- dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1;
- break;
- }
- }
- }
- }
- /////////////
- int nRowCount = 12;// VARIANT var;
- m_Chart3.SetRowCount(nRowCount);
- float ftemp;
- for (int row = 1; row <= nRowCount; ++row)
- {
- m_Chart3.SetRow(row);
- m_Chart3.SetRowLabel(stryear[row - 1]);
- if (m_radio2)
- {
- for (int j = 0; j < m_filterarray.GetSize(); j++)
- {
- m_Chart3.GetDataGrid().SetData(row, j + 1, dindandata1[j][row - 1], 0);
- }
- }
- else
- {
- m_Chart3.GetDataGrid().SetData(row, 1, dindandata[row - 1], 0);
- }
- }
- m_Chart3.Refresh();
- }
- BEGIN_EVENTSINK_MAP(DinDanForm, MyFormView)
- //{{AFX_EVENTSINK_MAP(DinDanForm)
- ON_EVENT(DinDanForm, IDC_MSCHART3, -601 /* DblClick */, OnDblClickMschart3, VTS_NONE)
- //}}AFX_EVENTSINK_MAP
- END_EVENTSINK_MAP()
- extern BOOL g_bShowMsChart;
- extern HWND g_hShowChartWnd;
- void DinDanForm::OnDblClickMschart3()
- {
- // TODO: Add your control notification handler code here
- if (g_bShowMsChart)
- {
- ::SendMessage(g_hShowChartWnd, WM_CLOSE, 0, 0);
- return;
- }
- g_bShowMsChart = 1;
- CRect rc;
- m_Chart3.GetWindowRect(rc);
- ScreenToClient(rc);
- ShowMschart dlg;
- dlg.m_pParent = this;
- dlg.m_pChart = &m_Chart3;
- dlg.DoModal();
- m_Chart3.MoveWindow(rc);
- g_bShowMsChart = 0;
- }
- void DinDanForm::OnRadio6()
- {
- // TODO: Add your control notification handler code here
- m_filterarray.RemoveAll();
- KindChange();
- }
- void DinDanForm::OnRadio7()
- {
- // TODO: Add your control notification handler code here
- OnRadio6();
- }
- void DinDanForm::OnSelchangeCombo1()
- {
- // TODO: Add your control notification handler code here
- OnRadio6();
- }
- void DinDanForm::OnRadio8()
- {
- // TODO: Add your control notification handler code here
- OnRadio3();
- }
- void DinDanForm::OnRadio10()
- {
- // TODO: Add your control notification handler code here
- OnRadio3();
- }
- void DinDanForm::OnRadio11()
- {
- // TODO: Add your control notification handler code here
- OnRadio3();
- }
- void DinDanForm::OnRadio12()
- {
- // TODO: Add your control notification handler code here
- OnRadio3();
- }
- void DinDanForm::OnRadio13()
- {
- // TODO: Add your control notification handler code here
- OnRadio3();
- }
- void DinDanForm::KindChange5()
- {
- m_Chart3.SetColumnCount(2);
- COLORREF col[10] = { \
- RGB(255, 0, 0), \
- RGB(0, 255, 0), \
- RGB(255, 0, 255), \
- RGB(0, 255, 0), \
- RGB(255, 0, 0), \
- RGB(255, 255, 0), \
- RGB(127, 0, 0), \
- RGB(0, 127, 0), \
- RGB(0, 0, 127), \
- RGB(127, 127, 0)
- };
- CStringArray m_typearray;
- m_typearray.Add("订单总数");
- m_typearray.Add("正式订单");
- int i = 0;
- for ( i = 0; i < 2; i++)
- {
- m_Chart3.SetColumn(i + 1);
- m_Chart3.SetColumnLabel((LPCTSTR)m_typearray.ElementAt(i));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(GetRValue(col[i]), GetGValue(col[i]), GetBValue(col[i]));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- }
- VARIANT var;
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetAuto(0);
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetMaximum(100);
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetMinimum(0);
- float dindandata[12] = { 0 };
- float dindandata2[12] = { 0 };
- CString stryear[12] = { "1月", \
- "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" };
- CString str;
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- if (m_dindanarray.ElementAt(i).ElementAt(13) != "意向客户")
- {
- dindandata2[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- }
- }
- int nRowCount = 12;// VARIANT var;
- m_Chart3.SetRowCount(nRowCount);
- float ftemp;
- for (int row = 1; row <= nRowCount; ++row)
- {
- m_Chart3.SetRow(row);
- m_Chart3.SetRowLabel(stryear[row - 1]);
- m_Chart3.GetDataGrid().SetData(row, 1, dindandata[row - 1], 0);
- m_Chart3.GetDataGrid().SetData(row, 2, dindandata2[row - 1], 0);
- }
- m_Chart3.Refresh();
- }
- void DinDanForm::KindChange6()
- {
- int i = 0;
- CStringArray m_typearray;
- for ( i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(14) == "")continue;
- if (::FindArray(&m_typearray, m_dindanarray.ElementAt(i).ElementAt(14)) == -1)
- m_typearray.Add(m_dindanarray.ElementAt(i).ElementAt(14));
- }
- if (m_typearray.GetSize() == 0)return;
- while (m_typearray.GetSize()>10)
- m_typearray.RemoveAt(m_typearray.GetSize() - 1);
- int typecount = m_typearray.GetSize();
- m_Chart3.SetColumnCount(typecount);
- VARIANT var;
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetAuto(1);
- COLORREF col[10] = { \
- RGB(255, 0, 0), \
- RGB(0, 255, 0), \
- RGB(0, 0, 255), \
- RGB(255, 255, 0), \
- RGB(0, 255, 255), \
- RGB(255, 0, 255), \
- RGB(127, 0, 0), \
- RGB(0, 127, 0), \
- RGB(0, 0, 127), \
- RGB(127, 127, 0)
- };
- for (i = 0; i < m_typearray.GetSize(); i++)
- {
- m_Chart3.SetColumn(i + 1);
- m_Chart3.SetColumnLabel((LPCTSTR)m_typearray.ElementAt(i));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(GetRValue(col[i]), GetGValue(col[i]), GetBValue(col[i]));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- }
- int dindandata1[10][12] = { 0 };
- for (i = 0; i < 10; i++)
- {
- for (int j = 0; j < 12; j++)
- {
- dindandata1[i][j] = 0;
- }
- }
- CString stryear[12] = { "1月", \
- "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" };
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- for (int j = 0; j < m_typearray.GetSize(); j++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(14) == m_typearray.ElementAt(j))
- {
- dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1;
- break;
- }
- }
- }
- /////////////
- int nRowCount = 12;// VARIANT var;
- m_Chart3.SetRowCount(nRowCount);
- float ftemp;
- for (int row = 1; row <= nRowCount; ++row)
- {
- m_Chart3.SetRow(row);
- m_Chart3.SetRowLabel(stryear[row - 1]);
- for (int j = 0; j < m_typearray.GetSize(); j++)
- {
- m_Chart3.GetDataGrid().SetData(row, j + 1, dindandata1[j][row - 1], 0);
- }
- }
- m_Chart3.Refresh();
- }
- void DinDanForm::KindChange7()
- {
- int i = 0;
- CStringArray m_typearray;
- for ( i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(15) == "")continue;
- if (::FindArray(&m_typearray, m_dindanarray.ElementAt(i).ElementAt(15)) == -1)
- m_typearray.Add(m_dindanarray.ElementAt(i).ElementAt(15));
- }
- if (m_typearray.GetSize() == 0)return;
- while (m_typearray.GetSize()>10)
- m_typearray.RemoveAt(m_typearray.GetSize() - 1);
- int typecount = m_typearray.GetSize();
- m_Chart3.SetColumnCount(typecount);
- VARIANT var;
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetAuto(1);
- COLORREF col[10] = { \
- RGB(255, 0, 0), \
- RGB(0, 255, 0), \
- RGB(0, 0, 255), \
- RGB(255, 255, 0), \
- RGB(0, 255, 255), \
- RGB(255, 0, 255), \
- RGB(127, 0, 0), \
- RGB(0, 127, 0), \
- RGB(0, 0, 127), \
- RGB(127, 127, 0)
- };
- for (i = 0; i < m_typearray.GetSize(); i++)
- {
- m_Chart3.SetColumn(i + 1);
- m_Chart3.SetColumnLabel((LPCTSTR)m_typearray.ElementAt(i));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(GetRValue(col[i]), GetGValue(col[i]), GetBValue(col[i]));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- }
- int dindandata1[10][12] = { 0 };
- for (i = 0; i < 10; i++)
- {
- for (int j = 0; j < 12; j++)
- {
- dindandata1[i][j] = 0;
- }
- }
- CString stryear[12] = { "1月", \
- "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" };
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- for (int j = 0; j < m_typearray.GetSize(); j++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(15) == m_typearray.ElementAt(j))
- {
- dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1;
- break;
- }
- }
- }
- /////////////
- int nRowCount = 12;// VARIANT var;
- m_Chart3.SetRowCount(nRowCount);
- float ftemp;
- for (int row = 1; row <= nRowCount; ++row)
- {
- m_Chart3.SetRow(row);
- m_Chart3.SetRowLabel(stryear[row - 1]);
- for (int j = 0; j < m_typearray.GetSize(); j++)
- {
- m_Chart3.GetDataGrid().SetData(row, j + 1, dindandata1[j][row - 1], 0);
- }
- }
- m_Chart3.Refresh();
- }
- void DinDanForm::OnRadio24()
- {
- // TODO: Add your control notification handler code here
- OnRadio3();
- }
- void DinDanForm::OnRadio25()
- {
- // TODO: Add your control notification handler code here
- OnRadio3();
- }
- void DinDanForm::KindChange8()
- {
- int i = 0;
- int j = 0;
- if (m_pchild->m_List2.GetCount() == 0)
- {
- CStringArray m_typearray;
- CArray<int, int>sortarray;
- for ( i = 0; i < m_moneyarray.GetSize(); i++)
- {
- // if(m_moneyarray.ElementAt (i).ElementAt (7)!="选片二销")continue;
- if (::FindArray(&m_typearray, m_moneyarray.ElementAt(i).ElementAt(7)) == -1)
- {
- m_typearray.Add(m_moneyarray.ElementAt(i).ElementAt(7));
- sortarray.Add(0);
- }
- }
- for (i = 0; i < m_moneyarray.GetSize(); i++)
- {
- // if(m_moneyarray.ElementAt (i).ElementAt (7)!="选片二销")continue;
- for ( j = 0; j < m_typearray.GetSize(); j++)
- {
- if (m_moneyarray.ElementAt(i).ElementAt(7) == m_typearray.ElementAt(j))
- {
- sortarray.SetAt(j, sortarray.ElementAt(j) + atoi(m_moneyarray.ElementAt(i).ElementAt(0)));
- }
- }
- }
- SortArray(1, m_typearray, sortarray);
- m_typearray.InsertAt(0, "全部(二销)");
- m_typearray.InsertAt(0, "全部(前期)");
- m_typearray.InsertAt(0, "全部(前期+二销)");
- m_pchild->TypeChange2(&m_typearray);
- }
- if (m_filterarray.GetSize() == 0)
- {
- CStringArray m_typearray;
- CArray<int, int>sortarray; CArray<int, int>sortarray2;
- for ( i = 0; i < m_moneyarray.GetSize(); i++)
- {
- BOOL bOK = 0;
- for ( j = 0; j < m_filterarray2.GetSize(); j++)
- {
- if (m_moneyarray.ElementAt(i).ElementAt(7) == m_filterarray2.ElementAt(j))
- {
- bOK = 1;
- break;
- }
- if ("全部(前期+二销)" == m_filterarray2.ElementAt(j))
- {
- bOK = 1;
- break;
- }
- if ("全部(前期)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) == "预约收款")
- {
- bOK = 1;
- break;
- }
- if ("全部(前期)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) == "预约补款")
- {
- bOK = 1;
- break;
- }
- if ("全部(二销)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) != "预约收款" && m_moneyarray.ElementAt(i).ElementAt(7) != "预约补款")
- {
- bOK = 1;
- break;
- }
- }
- if (bOK == 0)continue;
- if (::FindArray(&m_typearray, m_moneyarray.ElementAt(i).ElementAt(6)) == -1)
- {
- m_typearray.Add(m_moneyarray.ElementAt(i).ElementAt(6));
- sortarray.Add(0); sortarray2.Add(0);
- }
- }
- for (i = 0; i < m_moneyarray.GetSize(); i++)
- {
- BOOL bOK = 0;
- for ( j = 0; j < m_filterarray2.GetSize(); j++)
- {
- if (m_moneyarray.ElementAt(i).ElementAt(7) == m_filterarray2.ElementAt(j))
- {
- bOK = 1;
- break;
- }
- if ("全部(前期+二销)" == m_filterarray2.ElementAt(j))
- {
- bOK = 1;
- break;
- }
- if ("全部(前期)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) == "预约收款")
- {
- bOK = 1;
- break;
- }
- if ("全部(前期)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) == "预约补款")
- {
- bOK = 1;
- break;
- }
- if ("全部(二销)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) != "预约收款" && m_moneyarray.ElementAt(i).ElementAt(7) != "预约补款")
- {
- bOK = 1;
- break;
- }
- }
- if (bOK == 0)continue;
- for (j = 0; j < m_typearray.GetSize(); j++)
- {
- if (m_moneyarray.ElementAt(i).ElementAt(6) == m_typearray.ElementAt(j))
- {
- sortarray.SetAt(j, sortarray.ElementAt(j) + atoi(m_moneyarray.ElementAt(i).ElementAt(0)));
- sortarray2.SetAt(j, sortarray2.ElementAt(j) + 1);
- }
- }
- }
- if (m_check1)//均值
- {
- for ( j = 0; j < sortarray.GetSize(); j++)
- {
- if (sortarray2.ElementAt(j))
- {
- sortarray.SetAt(j, sortarray.ElementAt(j) / sortarray2.ElementAt(j));
- }
- }
- }
- SortArray(1, m_typearray, sortarray);
- m_pchild->TypeChange(&m_typearray);
- return;
- }
- if (m_filterarray.GetSize() == 0)return;
- while (m_filterarray.GetSize()>10)
- m_filterarray.RemoveAt(m_filterarray.GetSize() - 1);
- int typecount = m_filterarray.GetSize();
- if (m_radio2)
- m_Chart3.SetColumnCount(typecount);
- else
- m_Chart3.SetColumnCount(1);
- VARIANT var;
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetAuto(1);
- COLORREF col[10] = { \
- RGB(255, 0, 0), \
- RGB(0, 255, 0), \
- RGB(0, 0, 255), \
- RGB(255, 255, 0), \
- RGB(0, 255, 255), \
- RGB(255, 0, 255), \
- RGB(127, 0, 0), \
- RGB(0, 127, 0), \
- RGB(0, 0, 127), \
- RGB(127, 127, 0)
- };
- if (m_radio2)
- {
- for (i = 0; i < m_filterarray.GetSize(); i++)
- {
- m_Chart3.SetColumn(i + 1);
- m_Chart3.SetColumnLabel((LPCTSTR)m_filterarray.ElementAt(i));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(GetRValue(col[i]), GetGValue(col[i]), GetBValue(col[i]));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- }
- }
- else
- {
- m_Chart3.SetColumn(1);
- m_Chart3.SetColumnLabel((LPCTSTR)"全部");
- }
- float dindandata[12] = { 0 };
- float dindandatacot[12] = { 0 };
- float dindandata1[10][12] = { 0 };
- float dindandatacot2[10][12] = { 0 };
- for (i = 0; i < 10; i++)
- {
- for ( j = 0; j < 12; j++)
- {
- dindandata1[i][j] = 0; dindandatacot2[i][j] = 0;
- }
- }
- CString stryear[12] = { "1月", \
- "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" };
- ////////////
- CString type;
- int selpos = m_combo1.GetCurSel();
- if (selpos != -1)
- m_combo1.GetLBText(selpos, type);
- if (selpos == -1 || type.IsEmpty() || type == "---全部---" || type == "---按套系类别---" || type == "---按套系名称---")
- {
- for (i = 0; i < m_moneyarray.GetSize(); i++)
- {
- // if(m_moneyarray.ElementAt (i).ElementAt (7)!="选片二销")continue;
- BOOL bOK = 0;
- for ( j = 0; j < m_filterarray2.GetSize(); j++)
- {
- if (m_moneyarray.ElementAt(i).ElementAt(7) == m_filterarray2.ElementAt(j))
- {
- bOK = 1;
- break;
- }
- if ("全部(前期+二销)" == m_filterarray2.ElementAt(j))
- {
- bOK = 1;
- break;
- }
- if ("全部(前期)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) == "预约收款")
- {
- bOK = 1;
- break;
- }
- if ("全部(前期)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) == "预约补款")
- {
- bOK = 1;
- break;
- }
- if ("全部(二销)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) != "预约收款" && m_moneyarray.ElementAt(i).ElementAt(7) != "预约补款")
- {
- bOK = 1;
- break;
- }
- }
- if (bOK == 0)continue;
- dindandata[atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(m_moneyarray.ElementAt(i).ElementAt(0));
- dindandatacot[atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += 1.0;
- for (j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (m_moneyarray.ElementAt(i).ElementAt(6) == m_filterarray.ElementAt(j))
- {
- dindandata1[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_moneyarray.ElementAt(i).ElementAt(0));
- dindandatacot2[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandatacot2[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1.0;
- break;
- }
- }
- }
- }
- else if (selpos > m_taoxipos)
- {
- for (i = 0; i < m_moneyarray.GetSize(); i++)
- {
- // if(m_moneyarray.ElementAt (i).ElementAt (7)!="选片二销")continue;
- BOOL bOK = 0;
- for ( j = 0; j < m_filterarray2.GetSize(); j++)
- {
- if (m_moneyarray.ElementAt(i).ElementAt(7) == m_filterarray2.ElementAt(j))
- {
- bOK = 1;
- break;
- }
- if ("全部(前期+二销)" == m_filterarray2.ElementAt(j))
- {
- bOK = 1;
- break;
- }
- if ("全部(前期)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) == "预约收款")
- {
- bOK = 1;
- break;
- }
- if ("全部(前期)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) == "预约补款")
- {
- bOK = 1;
- break;
- }
- if ("全部(二销)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) != "预约收款" && m_moneyarray.ElementAt(i).ElementAt(7) != "预约补款")
- {
- bOK = 1;
- break;
- }
- }
- if (bOK == 0)continue;
- if (m_moneyarray.ElementAt(i).ElementAt(9) != type)continue;
- dindandata[atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(m_moneyarray.ElementAt(i).ElementAt(0));
- dindandatacot[atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += 1.0;
- for (j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (m_moneyarray.ElementAt(i).ElementAt(6) == m_filterarray.ElementAt(j))
- {
- dindandata1[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_moneyarray.ElementAt(i).ElementAt(0));
- dindandatacot2[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandatacot2[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1.0;
- break;
- }
- }
- }
- }
- else
- {
- for (i = 0; i < m_moneyarray.GetSize(); i++)
- {
- // if(m_moneyarray.ElementAt (i).ElementAt (7)!="选片二销")continue;
- BOOL bOK = 0;
- for ( j = 0; j < m_filterarray2.GetSize(); j++)
- {
- if (m_moneyarray.ElementAt(i).ElementAt(7) == m_filterarray2.ElementAt(j))
- {
- bOK = 1;
- break;
- }
- if ("全部(前期+二销)" == m_filterarray2.ElementAt(j))
- {
- bOK = 1;
- break;
- }
- if ("全部(前期)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) == "预约收款")
- {
- bOK = 1;
- break;
- }
- if ("全部(前期)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) == "预约补款")
- {
- bOK = 1;
- break;
- }
- if ("全部(二销)" == m_filterarray2.ElementAt(j) && m_moneyarray.ElementAt(i).ElementAt(7) != "预约收款" && m_moneyarray.ElementAt(i).ElementAt(7) != "预约补款")
- {
- bOK = 1;
- break;
- }
- }
- if (bOK == 0)continue;
- if (m_moneyarray.ElementAt(i).ElementAt(8) != type)continue;
- dindandata[atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += atof(m_moneyarray.ElementAt(i).ElementAt(0));
- dindandatacot[atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] += 1.0;
- for (j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (m_moneyarray.ElementAt(i).ElementAt(6) == m_filterarray.ElementAt(j))
- {
- dindandata1[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + atof(m_moneyarray.ElementAt(i).ElementAt(0));
- dindandatacot2[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandatacot2[j][atoi(m_moneyarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1.0;
- break;
- }
- }
- }
- }
- /////////////
- int nRowCount = 12;// VARIANT var;
- m_Chart3.SetRowCount(nRowCount);
- float ftemp;
- for (int row = 1; row <= nRowCount; ++row)
- {
- m_Chart3.SetRow(row);
- m_Chart3.SetRowLabel(stryear[row - 1]);
- if (m_check1)//均值
- {
- if (m_radio2)
- {
- for ( j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (dindandatacot2[j][row - 1] < 1.0)
- m_Chart3.GetDataGrid().SetData(row, j + 1, 0, 0);
- else
- m_Chart3.GetDataGrid().SetData(row, j + 1, dindandata1[j][row - 1] / dindandatacot2[j][row - 1], 0);
- }
- }
- else
- {
- if (dindandatacot[row - 1] < 1.0)
- m_Chart3.GetDataGrid().SetData(row, 1, 0, 0);
- else
- m_Chart3.GetDataGrid().SetData(row, 1, dindandata[row - 1] / dindandatacot[row - 1], 0);
- }
- }
- else
- {
- if (m_radio2)
- {
- for (int j = 0; j < m_filterarray.GetSize(); j++)
- {
- m_Chart3.GetDataGrid().SetData(row, j + 1, dindandata1[j][row - 1], 0);
- }
- }
- else
- {
- m_Chart3.GetDataGrid().SetData(row, 1, dindandata[row - 1], 0);
- }
- }
- }
- m_Chart3.Refresh();
- }
- /*
- void DinDanForm::KindChange8()
- {
- int i;
- if(m_filterarray.GetSize ()==0)
- {
- CStringArray m_typearray;
- CArray<int,int>sortarray;
- for(int i=0; i<m_moneyarray.GetSize (); i++)
- {
- if(m_moneyarray.ElementAt (i).ElementAt (7)!="选片二销")continue;
- if(::FindArray (&m_typearray, m_moneyarray.ElementAt (i).ElementAt (6))==-1)
- {
- m_typearray.Add(m_moneyarray.ElementAt (i).ElementAt (6));
- sortarray.Add(0);
- }
- }
- for( i=0; i<m_moneyarray.GetSize (); i++)
- {
- if(m_moneyarray.ElementAt (i).ElementAt (7)!="选片二销")continue;
- for(int j=0; j<m_typearray.GetSize (); j++)
- {
- if(m_moneyarray.ElementAt (i).ElementAt (6)==m_typearray.ElementAt (j))
- {
- sortarray.SetAt(j, sortarray.ElementAt(j)+atoi(m_moneyarray.ElementAt (i).ElementAt (0)));
- }
- }
- }
- SortArray(1, m_typearray, sortarray);
- m_pchild->TypeChange(&m_typearray);
- return;
- }
- if(m_filterarray.GetSize ()==0)return;
- while(m_filterarray.GetSize ()>10)
- m_filterarray.RemoveAt (m_filterarray.GetSize ()-1);
- int typecount=m_filterarray.GetSize ();
- if(m_radio2)
- m_Chart3.SetColumnCount(typecount);
- else
- m_Chart3.SetColumnCount(1);
- VARIANT var;
- m_Chart3.GetPlot().GetAxis(1,var).GetValueScale().SetAuto(1);
- COLORREF col[10]={\
- RGB(255,0,0),\
- RGB(0,255,0),\
- RGB(0,0,255),\
- RGB(255,255,0),\
- RGB(0,255,255),\
- RGB(255,0,255),\
- RGB(127,0,0),\
- RGB(0,127,0),\
- RGB(0,0,127),\
- RGB(127,127,0)
- };
- if(m_radio2)
- {
- for( i=0; i<m_filterarray.GetSize (); i++)
- {
- m_Chart3.SetColumn(i+1);
- m_Chart3.SetColumnLabel((LPCTSTR)m_filterarray.ElementAt (i));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i+1).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(GetRValue(col[i]), GetGValue(col[i]), GetBValue(col[i]));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i+1).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i+1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- }
- }
- else
- {
- m_Chart3.SetColumn(1);
- m_Chart3.SetColumnLabel((LPCTSTR)"全部");
- }
- float dindandata[12]={0};
- float dindandatacot[12]={0};
- float dindandata1[10][12]={0};
- float dindandatacot2[10][12]={0};
- for(i=0; i<10; i++)
- {
- for(int j=0; j<12; j++)
- {
- dindandata1[i][j]=0;dindandatacot2[i][j]=0;
- }
- }
- CString stryear[12]={"1月",\
- "2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};
- ////////////
- CString type;
- int selpos=m_combo1.GetCurSel ();
- if(selpos!=-1)
- m_combo1.GetLBText (selpos, type);
- if(selpos==-1 || type.IsEmpty () || type=="---全部---" || type=="---按套系类别---" || type=="---按套系名称---")
- {
- for( i=0; i<m_moneyarray.GetSize (); i++)
- {
- if(m_moneyarray.ElementAt (i).ElementAt (7)!="选片二销")continue;
- dindandata[atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+=atof(m_moneyarray.ElementAt (i).ElementAt (0));
- dindandatacot[atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+=1.0;
- for(int j=0; j<m_filterarray.GetSize (); j++)
- {
- if(m_moneyarray.ElementAt (i).ElementAt (6)==m_filterarray.ElementAt (j))
- {
- dindandata1[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]=dindandata1[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+atof(m_moneyarray.ElementAt (i).ElementAt (0));
- dindandatacot2[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]=dindandatacot2[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+1.0;
- break;
- }
- }
- }
- }
- else if(selpos>m_taoxipos)
- {
- for( i=0; i<m_moneyarray.GetSize (); i++)
- {
- if(m_moneyarray.ElementAt (i).ElementAt (7)!="选片二销")continue;
- if(m_moneyarray.ElementAt (i).ElementAt (9)!=type)continue;
- dindandata[atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+=atof(m_moneyarray.ElementAt (i).ElementAt (0));
- dindandatacot[atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+=1.0;
- for(int j=0; j<m_filterarray.GetSize (); j++)
- {
- if(m_moneyarray.ElementAt (i).ElementAt (6)==m_filterarray.ElementAt (j))
- {
- dindandata1[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]=dindandata1[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+atof(m_moneyarray.ElementAt (i).ElementAt (0));
- dindandatacot2[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]=dindandatacot2[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+1.0;
- break;
- }
- }
- }
- }
- else
- {
- for( i=0; i<m_moneyarray.GetSize (); i++)
- {
- if(m_moneyarray.ElementAt (i).ElementAt (7)!="选片二销")continue;
- if(m_moneyarray.ElementAt (i).ElementAt (8)!=type)continue;
- dindandata[atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+=atof(m_moneyarray.ElementAt (i).ElementAt (0));
- dindandatacot[atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+=1.0;
- for(int j=0; j<m_filterarray.GetSize (); j++)
- {
- if(m_moneyarray.ElementAt (i).ElementAt (6)==m_filterarray.ElementAt (j))
- {
- dindandata1[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]=dindandata1[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+atof(m_moneyarray.ElementAt (i).ElementAt (0));
- dindandatacot2[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]=dindandatacot2[j][atoi(m_moneyarray.ElementAt (i).ElementAt (1).Mid (5, 2))-1]+1.0;
- break;
- }
- }
- }
- }
- /////////////
- int nRowCount=12;// VARIANT var;
- m_Chart3.SetRowCount(nRowCount);
- float ftemp;
- for(int row = 1; row <= nRowCount; ++row)
- {
- m_Chart3.SetRow(row);
- m_Chart3.SetRowLabel(stryear[row-1]);
- if(m_check1)//均值
- {
- if(m_radio2)
- {
- for(int j=0; j<m_filterarray.GetSize (); j++)
- {
- if(dindandatacot2[j][row-1]<1.0)
- m_Chart3.GetDataGrid().SetData(row, j+1, 0 , 0);
- else
- m_Chart3.GetDataGrid().SetData(row, j+1, dindandata1[j][row-1]/dindandatacot2[j][row-1] , 0);
- }
- }
- else
- {
- if(dindandatacot[row-1]<1.0)
- m_Chart3.GetDataGrid().SetData(row, 1, 0 , 0);
- else
- m_Chart3.GetDataGrid().SetData(row, 1, dindandata[row-1]/dindandatacot[row-1] , 0);
- }
- }
- else
- {
- if(m_radio2)
- {
- for(int j=0; j<m_filterarray.GetSize (); j++)
- {
- m_Chart3.GetDataGrid().SetData(row, j+1, dindandata1[j][row-1] , 0);
- }
- }
- else
- {
- m_Chart3.GetDataGrid().SetData(row, 1, dindandata[row-1] , 0);
- }
- }
- }
- m_Chart3.Refresh();
- }
- */
- void DinDanForm::KindChange9()
- {
- int i = 0;
- if (m_filterarray.GetSize() == 0)
- {
- CStringArray m_typearray;
- CArray<int, int>sortarray;
- for ( i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (::FindArray(&m_typearray, m_dindanarray.ElementAt(i).ElementAt(14)) == -1)
- {
- m_typearray.Add(m_dindanarray.ElementAt(i).ElementAt(14));
- sortarray.Add(0);
- }
- }
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- for (int j = 0; j < m_typearray.GetSize(); j++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(14) == m_typearray.ElementAt(j))
- {
- sortarray.SetAt(j, sortarray.ElementAt(j) + 1);
- }
- }
- }
- SortArray(1, m_typearray, sortarray);
- m_pchild->TypeChange(&m_typearray);
- return;
- }
- if (m_filterarray.GetSize() == 0)return;
- while (m_filterarray.GetSize()>10)
- m_filterarray.RemoveAt(m_filterarray.GetSize() - 1);
- int typecount = m_filterarray.GetSize();
- if (m_radio2)
- m_Chart3.SetColumnCount(typecount);
- else
- m_Chart3.SetColumnCount(1);
- VARIANT var;
- m_Chart3.GetPlot().GetAxis(1, var).GetValueScale().SetAuto(1);
- COLORREF col[10] = { \
- RGB(255, 0, 0), \
- RGB(0, 255, 0), \
- RGB(0, 0, 255), \
- RGB(255, 255, 0), \
- RGB(0, 255, 255), \
- RGB(255, 0, 255), \
- RGB(127, 0, 0), \
- RGB(0, 127, 0), \
- RGB(0, 0, 127), \
- RGB(127, 127, 0)
- };
- if (m_radio2)
- {
- for (i = 0; i < m_filterarray.GetSize(); i++)
- {
- m_Chart3.SetColumn(i + 1);
- m_Chart3.SetColumnLabel((LPCTSTR)m_filterarray.ElementAt(i));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetBrush().GetFillColor().Set(GetRValue(col[i]), GetGValue(col[i]), GetBValue(col[i]));
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetPen().SetWidth(30);
- m_Chart3.GetPlot().GetSeriesCollection().GetItem(i + 1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
- }
- }
- else
- {
- m_Chart3.SetColumn(1);
- m_Chart3.SetColumnLabel((LPCTSTR)"全部");
- }
- int dindandata[12] = { 0 };
- int dindandata1[10][12] = { 0 };
- for (i = 0; i < 10; i++)
- {
- for (int j = 0; j < 12; j++)
- {
- dindandata1[i][j] = 0;
- }
- }
- CString stryear[12] = { "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" };
- ////////////
- CString type;
- int selpos = m_combo1.GetCurSel();
- if (selpos != -1)
- m_combo1.GetLBText(selpos, type);
- if (selpos == -1 || type.IsEmpty() || type == "---全部---" || type == "---按套系类别---" || type == "---按套系名称---")
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- for (int j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(14) == m_filterarray.ElementAt(j))
- {
- dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1;
- break;
- }
- }
- }
- }
- else if (selpos > m_taoxipos)
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(7) != type)continue;
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- for (int j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(14) == m_filterarray.ElementAt(j))
- {
- dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1;
- break;
- }
- }
- }
- }
- else
- {
- for (i = 0; i < m_dindanarray.GetSize(); i++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(0) != type)continue;
- dindandata[atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1]++;
- for (int j = 0; j < m_filterarray.GetSize(); j++)
- {
- if (m_dindanarray.ElementAt(i).ElementAt(14) == m_filterarray.ElementAt(j))
- {
- dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] = dindandata1[j][atoi(m_dindanarray.ElementAt(i).ElementAt(1).Mid(5, 2)) - 1] + 1;
- break;
- }
- }
- }
- }
- /////////////
- int nRowCount = 12;// VARIANT var;
- m_Chart3.SetRowCount(nRowCount);
- float ftemp;
- for (int row = 1; row <= nRowCount; ++row)
- {
- m_Chart3.SetRow(row);
- m_Chart3.SetRowLabel(stryear[row - 1]);
- if (m_radio2)
- {
- for (int j = 0; j < m_filterarray.GetSize(); j++)
- {
- m_Chart3.GetDataGrid().SetData(row, j + 1, dindandata1[j][row - 1], 0);
- }
- }
- else
- {
- m_Chart3.GetDataGrid().SetData(row, 1, dindandata[row - 1], 0);
- }
- }
- m_Chart3.Refresh();
- }
- void DinDanForm::OnCheck1()
- {
- // TODO: Add your control notification handler code here
- m_filterarray.RemoveAll();
- KindChange();
- }
|