📄 feeview.cpp
字号:
linequerycondition_outLayoutLine=linequeryDlg.m_stroutLayoutLine;
linequerycondition_outLayoutColumn=linequeryDlg.m_stroutLayoutColumn;
linequerycondition_inLayoutLine=linequeryDlg.m_strinLayoutLine;
linequerycondition_inLayoutColumn=linequeryDlg.m_strinLayoutColumn;
linequerycondition_lineroom=linequeryDlg.m_strlineRoom;
linequerycondition_lineroomKind=linequeryDlg.m_strlineRoomKind;
linequerycondition_lineteleNum=linequeryDlg.m_strlineTeleNum;
lineQueryList(TRUE,linequerycondition_outLayoutLine,\
linequerycondition_outLayoutColumn,\
linequerycondition_inLayoutLine,\
linequerycondition_inLayoutColumn,\
linequerycondition_lineroom,\
linequerycondition_lineroomKind,\
linequerycondition_lineteleNum);
}
void CFeeView::OnLinemanageAdd()
{
// TODO: Add your command handler code here
RemovePreTimer();
ClineManageAddDlg lineAddDlg;
int nResponse;
nResponse=lineAddDlg.DoModal();
if (nResponse!=IDOK)
{
return;
}
CString strtemp1,strtemp2,strtemp3,strtemp4,strtemp5,strtemp6,strtemp7;
strtemp1=lineAddDlg.m_stroutlayoutlineadd;
if (strtemp1=="")
strtemp1="NULL";
strtemp2=lineAddDlg.m_stroutlayoutcolumnadd;
if (strtemp2=="")
strtemp2="NULL";
strtemp3=lineAddDlg.m_strinlayoutlineadd;
if (strtemp3=="")
strtemp3="NULL";
strtemp4=lineAddDlg.m_strinlayoutcolumnadd;
if (strtemp4=="")
strtemp4="NULL";
strtemp5=lineAddDlg.m_strlineroomadd;
if (strtemp5=="")
strtemp5="NULL";
strtemp6=lineAddDlg.m_strlineroomkindadd;
if (strtemp6=="")
strtemp6="NULL";
strtemp7=lineAddDlg.m_strlinetelenumadd;
if (strtemp7=="")
strtemp7="NULL";
lineQueryList(TRUE,strtemp1,strtemp2,strtemp3,strtemp4,\
strtemp5,strtemp6,strtemp7);
CFeeView::OnLinemanageAdd();
}
void CFeeView::OnLinemanagemenuDandM(void)
{
CListCtrl *ctl;
CString strSql,strTemp;
ctl=&GetListCtrl();
POSITION pos=ctl->GetFirstSelectedItemPosition();
if (pos==NULL)
{
AfxMessageBox("Please select one record");
return;
}
int m_CurUser=ctl->GetNextSelectedItem(pos);
ClineListDlg linelistDlg;
linelistDlg.m_strlinelistlineroom=ctl->GetItemText(m_CurUser,0);
linelistDlg.m_strlinelistlineroomkind=ctl->GetItemText(m_CurUser,1);
linelistDlg.m_strlinelistoutlayoutline=ctl->GetItemText(m_CurUser,2);
linelistDlg.m_strlinelistoutlayoutcolumn=ctl->GetItemText(m_CurUser,3);
linelistDlg.m_strlinelistinlayoutline=ctl->GetItemText(m_CurUser,4);
linelistDlg.m_strlinelistinlayoutcolumn=ctl->GetItemText(m_CurUser,5);
linelistDlg.m_strlinelistlinetelephone=ctl->GetItemText(m_CurUser,6);
int nResponse;
telelistcmd=0;
nResponse=linelistDlg.DoModal();
if (nResponse!=IDOK)
{
lineQueryList(TRUE,linequerycondition_outLayoutLine,\
linequerycondition_outLayoutColumn,\
linequerycondition_inLayoutLine,\
linequerycondition_inLayoutColumn,\
linequerycondition_lineroom,\
linequerycondition_lineroomKind,\
linequerycondition_lineteleNum);
return;
}
}
void CFeeView::OnLinemanageModify()
{
// TODO: Add your command handler code here
OnLinemanagemenuDandM();
}
void CFeeView::OnLinemanageDelete()
{
// TODO: Add your command handler code here
OnLinemanagemenuDandM();
}
void CFeeView::OnBlackrisingAll()
{
// TODO: Add your command handler code here
RemovePreTimer();
int nResponse;
CblackAllRisingDlg blackallrisingdlg;
nResponse=blackallrisingdlg.DoModal();
if (nResponse==IDOK)
{
actViewWindow=VIEWBLACKSUBQUERY;
}
}
void CFeeView::OnBlackrisingCondition()
{
// TODO: Add your command handler code here
RemovePreTimer();
int nResponse;
CblackConditionRisingDlg blackconditionrisingdlg;
nResponse=blackconditionrisingdlg.DoModal();
if (nResponse==IDOK)
{
actViewWindow=VIEWBLACKSUBQUERY;
}
}
void CFeeView::OnBlackqueryAll()
{
// TODO: Add your command handler code here
RemovePreTimer();
actViewWindow=VIEWBLACKSUBQUERY;
blacksubquerycondition_telenum="all";
blacksubquerycondition_starttime="all";
blacksubquerycondition_endtime="all";
blacksubquerycondition_talktime="all";
blacksubquerycondition_endtalktime="all";
blacksubquerycondition_talkfee="all";
blacksubquerycondition_endtalkfee="all";
blacksubQueryList(TRUE,blacksubquerycondition_telenum,blacksubquerycondition_starttime,\
blacksubquerycondition_endtime,blacksubquerycondition_talktime,\
blacksubquerycondition_endtalktime,blacksubquerycondition_talkfee,blacksubquerycondition_endtalkfee);
}
void CFeeView::OnBlackqueryCondition()
{
// TODO: Add your command handler code here
CString strtemp;
CblackQueryConditionDlg blackqueryconditionDlg;
RemovePreTimer();
int nResponse;
nResponse=blackqueryconditionDlg.DoModal();
if (nResponse!=IDOK)
{
return;
}
actViewWindow=VIEWBLACKSUBQUERY;
blacksubquerycondition_telenum=blackqueryconditionDlg.m_strblackquerytelenum;
strtemp="";
if ((blackqueryconditionDlg.m_strblackqueryyear!="")&&\
(blackqueryconditionDlg.m_strblackquerymonth!="")&&\
(blackqueryconditionDlg.m_strblackqueryday!=""))
{
strtemp=blackqueryconditionDlg.m_strblackqueryyear+"-"+\
blackqueryconditionDlg.m_strblackquerymonth+"-"+\
blackqueryconditionDlg.m_strblackqueryday;
}
blacksubquerycondition_starttime=strtemp;
strtemp="";
if ((blackqueryconditionDlg.m_strblackqueryendyear!="")&&\
(blackqueryconditionDlg.m_strblackqueryendmonth!="")&&\
(blackqueryconditionDlg.m_strblackqueryendday!=""))
{
strtemp=blackqueryconditionDlg.m_strblackqueryendyear+"-"+\
blackqueryconditionDlg.m_strblackqueryendmonth+"-"+\
blackqueryconditionDlg.m_strblackqueryendday;
}
blacksubquerycondition_endtime=strtemp;
blacksubquerycondition_talktime=blackqueryconditionDlg.m_strblackquerytalktime;
blacksubquerycondition_endtalktime=blackqueryconditionDlg.m_strblackqueryendtalktime;
blacksubquerycondition_talkfee="all";
blacksubquerycondition_endtalkfee="all";
blacksubQueryList(TRUE,blacksubquerycondition_telenum,blacksubquerycondition_starttime,\
blacksubquerycondition_endtime,blacksubquerycondition_talktime,\
blacksubquerycondition_endtalktime,blacksubquerycondition_talkfee,blacksubquerycondition_endtalkfee);
}
void CFeeView::OnBlackcleanAll()
{
// TODO: Add your command handler code here
int nResponse;
RemovePreTimer();
CblackretrivalDlg blackretrivaldlg;
nResponse=blackretrivaldlg.DoModal();
if (nResponse==IDOK)
{
}
}
void CFeeView::OnBlackcleanCondition()
{
// TODO: Add your command handler code here
int nResponse;
RemovePreTimer();
CblackretriveconditionDlg blackretrivaldlg;
nResponse=blackretrivaldlg.DoModal();
if (nResponse==IDOK)
{
}
}
void CFeeView::OnFeeScan()
{
// TODO: Add your command handler code here
RemovePreTimer();
feedirectionQueryList(TRUE);
}
void CFeeView::feedirectionlist(CPoint point)
{
CListCtrl *ctl;
ctl=&GetListCtrl();
int nHitItem=ctl->HitTest(point,NULL);
if (nHitItem<0)
{
return;
}
CfeedirectionListDlg feedirectionlistDlg;
feedirectionlistDlg.m_strfeelistdirection=ctl->GetItemText(nHitItem,0);
feedirectionlistDlg.m_strfeelistdirectionkind=ctl->GetItemText(nHitItem,1);
feedirectionlistDlg.m_uintfeeliststarttime=atol(ctl->GetItemText(nHitItem,2));
feedirectionlistDlg.m_flofeeliststartfee=atof(ctl->GetItemText(nHitItem,3));
feedirectionlistDlg.m_uintfeeliststeptime=atol(ctl->GetItemText(nHitItem,4));
feedirectionlistDlg.m_flofeeliststepfee=atof(ctl->GetItemText(nHitItem,5));
feedirectionlistDlg.m_flofeelistaddfee=atof(ctl->GetItemText(nHitItem,6));
int nResponse;
telelistcmd=0;
nResponse=feedirectionlistDlg.DoModal();
if (nResponse!=IDOK)
{
return;
}
feedirectionQueryList(TRUE);
}
void CFeeView::OnFeeAdd()
{
// TODO: Add your command handler code here
int nResponse;
RemovePreTimer();
CfeedirectionAddDlg feedirectionDlg;
nResponse=feedirectionDlg.DoModal();
if (nResponse!=IDOK)
{
return;
}
feedirectionQueryList(TRUE);
CFeeView::OnFeeAdd();
}
void CFeeView::OnFeeDirectionmenuDandM(void)
{
CListCtrl *ctl;
CString strSql,strTemp;
ctl=&GetListCtrl();
POSITION pos=ctl->GetFirstSelectedItemPosition();
if (pos==NULL)
{
AfxMessageBox("Please select one record");
return;
}
RemovePreTimer();
int nHitItem=ctl->GetNextSelectedItem(pos);
CfeedirectionListDlg feedirectionlistDlg;
feedirectionlistDlg.m_strfeelistdirection=ctl->GetItemText(nHitItem,0);
feedirectionlistDlg.m_strfeelistdirectionkind=ctl->GetItemText(nHitItem,1);
feedirectionlistDlg.m_uintfeeliststarttime=atol(ctl->GetItemText(nHitItem,2));
feedirectionlistDlg.m_flofeeliststartfee=atof(ctl->GetItemText(nHitItem,3));
feedirectionlistDlg.m_uintfeeliststeptime=atol(ctl->GetItemText(nHitItem,4));
feedirectionlistDlg.m_flofeeliststepfee=atof(ctl->GetItemText(nHitItem,5));
int nResponse;
telelistcmd=0;
nResponse=feedirectionlistDlg.DoModal();
if (nResponse!=IDOK)
{
feedirectionQueryList(TRUE);
return;
}
}
void CFeeView::OnFeeModify()
{
// TODO: Add your command handler code here
OnFeeDirectionmenuDandM();
}
void CFeeView::OnFeeDelete()
{
// TODO: Add your command handler code here
OnFeeDirectionmenuDandM();
}
void CFeeView::OnAddfeeScan()
{
// TODO: Add your command handler code here
RemovePreTimer();
feetimechangeQueryList(TRUE);
}
void CFeeView::OnFeeTimemenuDandM(void)
{
RemovePreTimer();
CString strSql,strTemp;
RemovePreTimer();
CListCtrl *ctl;
ctl=&GetListCtrl();
POSITION pos=ctl->GetFirstSelectedItemPosition();
if (pos==NULL)
{
AfxMessageBox("Please select one record");
return;
}
RemovePreTimer();
int nHitItem=ctl->GetNextSelectedItem(pos);
CfeeTimechangemodifyDlg feetimelistDlg;
CString strdate,strtime,strtemp;
COleDateTime tdate,ttime;
long lyear,lmonth,lday,lhour,lminute,lsecond;
feetimelistDlg.m_uintfeedecper=atol(ctl->GetItemText(nHitItem,0));
strdate=ctl->GetItemText(nHitItem,1);
//if (strdate!="1970-1-1")
{
tdate.ParseDateTime(strdate,VAR_DATEVALUEONLY);
lyear=tdate.GetYear();
lmonth=tdate.GetMonth();
lday=tdate.GetDay();
strtemp.Format("%d",lyear);
feetimelistDlg.m_strstartyear=strtemp;
strtemp.Format("%d",lmonth);
feetimelistDlg.m_strstartmonth=strtemp;
strtemp.Format("%d",lday);
feetimelistDlg.m_strstartday=strtemp;
}
strdate=ctl->GetItemText(nHitItem,2);
//if (strdate!="1970-1-1")
{
tdate.ParseDateTime(strdate,VAR_DATEVALUEONLY);
lyear=tdate.GetYear();
lmonth=tdate.GetMonth();
lday=tdate.GetDay();
strtemp.Format("%d",lyear);
feetimelistDlg.m_strendyear=strtemp;
strtemp.Format("%d",lmonth);
feetimelistDlg.m_strendmonth=strtemp;
strtemp.Format("%d",lday);
feetimelistDlg.m_strendday=strtemp;
}
strtime=ctl->GetItemText(nHitItem,3);
//if (strtime!="1:02:03")
{
ttime.ParseDateTime(strtime,VAR_TIMEVALUEONLY);
lhour=ttime.GetHour();
lminute=ttime.GetMinute();
lsecond=ttime.GetSecond();
strtemp.Format("%d",lhour);
feetimelistDlg.m_strstarthour=strtemp;
strtemp.Format("%d",lminute);
feetimelistDlg.m_strstartminute=strtemp;
strtemp.Format("%d",lsecond);
feetimelistDlg.m_strstartsecond=strtemp;
}
strtime=ctl->GetItemText(nHitItem,4);
//if (strtime!="1:02:03")
{
ttime.ParseDateTime(strtime,VAR_TIMEVALUEONLY);
lhour=ttime.GetHour();
lminute=ttime.GetMinute();
lsecond=ttime.GetSecond();
strtemp.Format("%d",lhour);
feetimelistDlg.m_strendhour=strtemp;
strtemp.Format("%d",lminute);
feetimelistDlg.m_strendminute=strtemp;
strtemp.Format("%d",lsecond);
feetimelistDlg.m_strendsecond=strtemp;
}
strtemp=ctl->GetItemText(nHitItem,5);
if (strtemp!="YES")
feetimelistDlg.m_bfeeincountry=FALSE;
else
feetimelistDlg.m_bfeeincountry=TRUE;
strtemp=ctl->GetItemText(nHitItem,6);
if (strtemp!="YES")
feetimelistDlg.m_bfeeincity=FALSE;
else
feetimelistDlg.m_bfeeincity=TRUE;
strtemp=ctl->GetItemText(nHitItem,7);
if (strtemp!="YES")
feetimelistDlg.m_bfeeoutcountry=FALSE;
else
feetimelistDlg.m_bfeeoutcountry=TRUE;
strtemp=ctl->GetItemText(nHitItem,8);
if (strtemp!="YES")
feetimelistDlg.m_bfeeoutcity=FALSE;
else
feetimelistDlg.m_bfeeoutcity=TRUE;
strtemp=ctl->GetItemText(nHitItem,9);
if (strtemp!="YES")
feetimelistDlg.m_bfeeinlong=FALSE;
else
feetimelistDlg.m_bfeeinlong=TRUE;
strtemp=ctl->GetItemText(nHitItem,10);
if (strtemp!="YES")
feetimelistDlg.m_bfeeoutlong=FALSE;
else
feetimelistDlg.m_bfeeoutlong=TRUE;
strtemp=ctl->GetItemText(nHitItem,11);
if (strtemp!="YES")
feetimelistDlg.m_bfeespec=FALSE;
else
feetimelistDlg.m_bfeespec=TRUE;
int nResponse;
telelistcmd=0;
nResponse=feetimelistDlg.DoModal();
if (nResponse!=IDOK)
{
//
return;
}
feetimechangeQueryList(TRUE);
}
void CFeeView::OnAddfeeModify()
{
// TODO: Add your command handler code here
OnFeeTimemenuDandM();
}
void CFeeView::OnAddfeeDelete()
{
// TODO: Add your command handler code here
OnFeeTimemenuDandM();
}
void CFeeView::OnAddfeeAdd()
{
// TODO: Add your command handler code here
int nResponse;
RemovePreTimer();
CfeetimechangeaddDlg feetimechangeaddDlg;
nResponse=feetimechangeaddDlg.DoModal();
if (nResponse!=IDOK)
{
return;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -