//--------------------------------------------------------------------------- void __fastcall TAskPurchaseListForm::FormShow(TObject *Sender) { int nYear,nMonth,nDay; char strDate0[80],strDate1[80]; CString szSQL; edtID ->Text=""; edtReqDate0 ->Text=""; edtNeedDate ->Text=""; edtMncode ->Text=""; m_lstStockDepID.Add(""); lstStockDep->Items->Add("全部"); szSQL="select * from StockDepart order by sd_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockDepID.Add(dm1->Query1->FieldByName("sd_code")->AsString.c_str()); lstStockDep->Items->Add(dm1->Query1->FieldByName("sd_name")->AsString); dm1->Query1->Next(); } lstType ->ItemIndex=0; lstReqType ->ItemIndex=0; // lstBuyType ->ItemIndex=0; lstNeedType ->ItemIndex=0; lstStockDep ->ItemIndex=0; lstStockType->ItemIndex=0; lstReqCorp->Items->Add("全部"); m_lstCorpID.Add(""); szSQL="select * from DepartCorp order by dc_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstCorpID.Add(dm1->Query1->FieldByName("dc_code")->AsString.c_str()); lstReqCorp->Items->Add(dm1->Query1->FieldByName("dc_name")->AsString); dm1->Query1->Next(); } lstReqCorp->ItemIndex=0; ResetReqDepart(); lstAfm->ItemIndex=0; lstEndFlag->ItemIndex=0; lstStockman->Items->Add("全部"); m_lstStockmanID.Add(""); szSQL="select * from StockHandleman order by sh_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockmanID.Add(dm1->Query1->FieldByName("sh_code")->AsString.c_str()); lstStockman->Items->Add(dm1->Query1->FieldByName("sh_name")->AsString); dm1->Query1->Next(); } lstStockman->ItemIndex=0; FormResize(Sender); ResetCtrl(); }
void __fastcall TLifeForm::Button2Click(TObject *Sender) { if(!FLifeEngine->Running) { FLifeEngine->Clear(); FLifeBoard = FLifeEngine->LifeBoard; FormResize(Sender); PaintBox1->InvalidateRect(PaintBox1->BoundsRect); } }
//--------------------------------------------------------------------------- void __fastcall TFileViewDlg::UpdateSize(int sw) { SetThumbnailSize(m_RectS, m_SSize); if( sw ){ for( int i = 0; i < m_MaxPage; i++ ){ CFILEV *cp = pFileV[i]; if( cp->m_Thumb.IsOpen() ){ cp->m_Thumb.SetSize(m_RectS.Right, m_RectS.Bottom); } delete cp->pBitmapS; cp->pBitmapS = NULL; } FormResize(NULL); } }
//--------------------------------------------------------------------------- void __fastcall TMainForm::FormShow(TObject *Sender){ // 读取本地的一些设置,或是上次的配置参数 TIniFile *ini = new TIniFile(GetCurrentDir() + "\\app.ini"); int userId = ini->ReadInteger("Center", "UserId", 0); AnsiString st = ini->ReadString("Center", "ST", ""); DateTimePicker->Time = ini->ReadTime("Center", "ShutdownTime", StrToTime("23:45:00")); //是否跳过登录界面 if (userId ==0 || st ==""){ LoginForm->ShowModal(); }else{ controller->centerId =userId; controller->centerSt =st; } TimerTask->Enabled =true; // 创建一个ActionList用于动态保存各个标签页的Action actionList = new TActionList(MainForm); // 读取本地的一些设置,或是上次的配置参数 MainForm->Width = ini->ReadInteger("FormSize", "Width", 1024); MainForm->Height = ini->ReadInteger("FormSize", "Height", 768); delete ini; // FrameMonitor =new TFrameMonitor(this); //用这个Frame,主要是用来加竖滚动条的,并且支持鼠标滑轮滚动 FrameMonitor->Parent =PanelMonitorGroup; //文件打印内容明细 StringGridTxt->Cells[0][0] ="行数"; StringGridTxt->Cells[1][0] ="游戏ID"; StringGridTxt->Cells[2][0] ="玩法类型"; StringGridTxt->Cells[3][0] ="投注方式"; StringGridTxt->Cells[4][0] ="彩票号码"; StringGridTxt->Cells[5][0] ="倍"; StringGridTxt->Cells[6][0] ="金额分"; for (int i =0; i <StringGridTxt->RowCount; i++) StringGridTxt->Cells[0][i+1] =IntToStr(i +1); //后台管理浏览器加载,防止Document设置Cookie时为空 WideString HomePage =LOGIN_URL; WebBrowser->Navigate(HomePage.c_bstr()); //显示登录页并且最大化窗口 PageControl->ActivePageIndex =1; //总控制器初始化 controller->Init(); //调整位置 FormResize(this); ShowErrMessage(); }
void __fastcall TTestRigMain::WmMove( TMessage &/*Msg*/ ) { FormResize( this ); }
void __fastcall TKeyControlForm::WmMove( TMessage &/*Msg*/ ) { FormResize( this ); }
//--------------------------------------------------------------------------- void __fastcall TQRigSyncMain::WmMove( TMessage &/*Msg*/ ) { FormResize( this ); }
void __fastcall TMinosChatForm::WmMove( TMessage &/*Msg*/ ) { FormResize( this ); }
void __fastcall TMambaNetForm::FormActivate(TObject *Sender) { FormResize(this); }
//--------------------------------------------------------------------------- void __fastcall TAPAffirmAndNotBookForm::FormShow(TObject *Sender) { int nYear,nMonth,nDay; char strDate0[80],strDate1[80]; CString szSQL; edtID ->Text=""; edtMncode ->Text=""; //------------------------------------------------------------------------------ if(g_theOperator.op_cpcode[0]=='A') { //若用户为行政中心,自动寻找行政中心的采购部门与采购经办 szSQL="select * from StockDepart where sd_code='X' or sd_code='11' order by sd_code DESC"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockDepID.Add(dm1->Query1->FieldByName("sd_code")->AsString.c_str()); lstStockDep->Items->Add(dm1->Query1->FieldByName("sd_name")->AsString); dm1->Query1->Next(); } lstStockDep->ItemIndex=0; //采购经办 m_lstStockmanID.Add(""); lstStockman->Items->Add("全部采购经办"); szSQL="select * from StockHandleman where sh_sdcode='X' or sh_sdcode='11'order by sh_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockmanID.Add(dm1->Query1->FieldByName("sh_code")->AsString.c_str()); lstStockman->Items->Add(dm1->Query1->FieldByName("sh_name")->AsString); dm1->Query1->Next(); } lstStockman->ItemIndex=0; } if(g_theOperator.op_cpcode[0]=='D') { //若用户为宏铭公司,自动寻找宏铭的采购部门与采购经办 szSQL="select * from StockDepart where sd_code='Y' or sd_code='1' order by sd_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockDepID.Add(dm1->Query1->FieldByName("sd_code")->AsString.c_str()); lstStockDep->Items->Add(dm1->Query1->FieldByName("sd_name")->AsString); dm1->Query1->Next(); } lstStockDep->ItemIndex=0; //采购经办 m_lstStockmanID.Add(""); lstStockman->Items->Add("全部采购经办"); szSQL="select * from StockHandleman where sh_sdcode='Y' or sh_sdcode='1' order by sh_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockmanID.Add(dm1->Query1->FieldByName("sh_code")->AsString.c_str()); lstStockman->Items->Add(dm1->Query1->FieldByName("sh_name")->AsString); dm1->Query1->Next(); } lstStockman->ItemIndex=0; } if(g_theOperator.op_cpcode[0]=='B') { //若用户为宏仁公司,自动寻找宏仁的采购部门 szSQL="select * from StockDepart where sd_code='9' order by sd_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockDepID.Add(dm1->Query1->FieldByName("sd_code")->AsString.c_str()); lstStockDep->Items->Add(dm1->Query1->FieldByName("sd_name")->AsString); dm1->Query1->Next(); } lstStockDep->ItemIndex=0; //采购经办 m_lstStockmanID.Add(""); lstStockman->Items->Add("全部采购经办"); szSQL="select * from StockHandleman where sh_sdcode='9' order by sh_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockmanID.Add(dm1->Query1->FieldByName("sh_code")->AsString.c_str()); lstStockman->Items->Add(dm1->Query1->FieldByName("sh_name")->AsString); dm1->Query1->Next(); } lstStockman->ItemIndex=0; } if(g_theOperator.op_cpcode[0]=='C') { //若用户为宏育公司,自动寻找宏育的采购部门 szSQL="select * from StockDepart where sd_code='4' or sd_code='5' order by sd_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockDepID.Add(dm1->Query1->FieldByName("sd_code")->AsString.c_str()); lstStockDep->Items->Add(dm1->Query1->FieldByName("sd_name")->AsString); dm1->Query1->Next(); } lstStockDep->ItemIndex=0; //采购经办 m_lstStockmanID.Add(""); lstStockman->Items->Add("全部采购经办"); szSQL="select * from StockHandleman where sh_sdcode='4' or sh_sdcode='5' order by sh_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockmanID.Add(dm1->Query1->FieldByName("sh_code")->AsString.c_str()); lstStockman->Items->Add(dm1->Query1->FieldByName("sh_name")->AsString); dm1->Query1->Next(); } lstStockman->ItemIndex=0; } if(g_theOperator.op_cpcode[0]=='E') { //若用户为宏信公司,自动寻找宏信的采购部门 szSQL="select * from StockDepart where sd_code='2' or sd_code='3' order by sd_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockDepID.Add(dm1->Query1->FieldByName("sd_code")->AsString.c_str()); lstStockDep->Items->Add(dm1->Query1->FieldByName("sd_name")->AsString); dm1->Query1->Next(); } lstStockDep->ItemIndex=0; //采购经办 m_lstStockmanID.Add(""); lstStockman->Items->Add("全部采购经办"); szSQL="select * from StockHandleman where sh_sdcode='2' or sh_sdcode='3' order by sh_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockmanID.Add(dm1->Query1->FieldByName("sh_code")->AsString.c_str()); lstStockman->Items->Add(dm1->Query1->FieldByName("sh_name")->AsString); dm1->Query1->Next(); } lstStockman->ItemIndex=0; } if(g_theOperator.op_cpcode[0]=='F') { //若用户为宏焕公司,自动寻找宏焕的采购部门 szSQL="select * from StockDepart where sd_code='6' or sd_code='7' or sd_code='8' order by sd_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockDepID.Add(dm1->Query1->FieldByName("sd_code")->AsString.c_str()); lstStockDep->Items->Add(dm1->Query1->FieldByName("sd_name")->AsString); dm1->Query1->Next(); } lstStockDep->ItemIndex=0; //采购经办 m_lstStockmanID.Add(""); lstStockman->Items->Add("全部采购经办"); szSQL="select * from StockHandleman where sh_sdcode='6' or sh_sdcode='7' order by sh_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockmanID.Add(dm1->Query1->FieldByName("sh_code")->AsString.c_str()); lstStockman->Items->Add(dm1->Query1->FieldByName("sh_name")->AsString); dm1->Query1->Next(); } lstStockman->ItemIndex=0; } if(g_theOperator.op_cpcode[0]=='G') { //若用户为宏昌公司,自动寻找宏昌的采购部门 szSQL="select * from StockDepart where sd_code='10' order by sd_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockDepID.Add(dm1->Query1->FieldByName("sd_code")->AsString.c_str()); lstStockDep->Items->Add(dm1->Query1->FieldByName("sd_name")->AsString); dm1->Query1->Next(); } lstStockDep->ItemIndex=0; //采购经办 m_lstStockmanID.Add(""); lstStockman->Items->Add("全部采购经办"); szSQL="select * from StockHandleman where sh_sdcode='10' order by sh_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockmanID.Add(dm1->Query1->FieldByName("sh_code")->AsString.c_str()); lstStockman->Items->Add(dm1->Query1->FieldByName("sh_name")->AsString); dm1->Query1->Next(); } lstStockman->ItemIndex=0; } /* m_lstStockDepID.Add(""); lstStockDep->Items->Add("全部"); szSQL="select * from StockDepart order by sd_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockDepID.Add(dm1->Query1->FieldByName("sd_code")->AsString.c_str()); lstStockDep->Items->Add(dm1->Query1->FieldByName("sd_name")->AsString); dm1->Query1->Next(); } lstType ->ItemIndex=0; lstStockDep ->ItemIndex=0; */ //------------------------------------------------------------------------------ lstReqCorp->Items->Add("全部"); m_lstCorpID.Add(""); szSQL="select * from DepartCorp order by dc_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstCorpID.Add(dm1->Query1->FieldByName("dc_code")->AsString.c_str()); lstReqCorp->Items->Add(dm1->Query1->FieldByName("dc_name")->AsString); dm1->Query1->Next(); } lstReqCorp->ItemIndex=0; ResetReqDepart(); lstType ->ItemIndex=0; //------------------------------------------------------------------------------ /* lstStockman->Items->Add("全部"); m_lstStockmanID.Add(""); szSQL="select * from StockHandleman order by sh_code"; RunSQL(dm1->Query1,szSQL,true); while(!dm1->Query1->Eof) { m_lstStockmanID.Add(dm1->Query1->FieldByName("sh_code")->AsString.c_str()); lstStockman->Items->Add(dm1->Query1->FieldByName("sh_name")->AsString); dm1->Query1->Next(); } lstStockman->ItemIndex=0; */ //------------------------------------------------------------------------------ edtAfmDay->Text="7"; FormResize(Sender); ResetCtrl(); }