⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sbckcxdlg.cpp

📁 这是一套学校设备管理系统的源码 里面有树形结构使用的很棒的方法
💻 CPP
📖 第 1 页 / 共 3 页
字号:
 // sbckcxdlg.cpp : implementation file
//

#include "stdafx.h"
#include "xxgl.h"
#include "sbckcxdlg.h"
#include "sdrkbhdlg.h"
#include "sdrkfsdlg.h"
#include "sdrksjdlg.h"
#include "sdwpsldlg.h"
#include "sdgdbhdlg1.h"
#include "sdjbrdlg.h"
#include "sdgdbhdlg.h"
#include "sbckxgdlg.h"
#include "yszmscqrdlg.h"
#include "math.h"
#include "process.h"
#include "strt.h"
#include "ext.h"
#include "func.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

static int s_qcksj_flag,s_jcksj_flag,s_sbs_flag,s_sbmc_flag;
static int s_qckbh_flag,s_jckbh_flag,s_ckfx_flag;
static int s_jbr_flag,s_ckfs_flag,s_qgdbh_flag,s_jgdbh_flag;
static int s_qwpdj_flag,s_jwpdj_flag;
static char s_qcksj[10],s_jcksj[10],s_sbs[50],s_sbmc[50];
static char s_qckbh[10],s_jckbh[10],s_ckfx[40];
static char s_jbr[10],s_ckfs1[40],s_qgdbh[10],s_jgdbh[10];
static char s_qwpdj[15],s_jwpdj[15];

Csbckcxdlg::Csbckcxdlg(CWnd* pParent /*=NULL*/)
	: CDialog(Csbckcxdlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(Csbckcxdlg)
	m_tjzje = _T("");
	m_tjzsl = _T("");
	m_sbmc = _T("");
	m_sbs = _T("");
	m_qgdbh = _T("");
	m_jgdbh = _T("");
	m_qckbh = _T("");
	m_jckbh = _T("");
	m_ckfx = _T("");
	m_qwpdj = _T("");
	m_jwpdj = _T("");
	//}}AFX_DATA_INIT
	out_flag = 0;
	cur_focus = 0;
}

Csbckcxdlg::~Csbckcxdlg()
{
	int year;

    time_t ltime;    
	struct tm *pti;
	char buf[10];

    time(&ltime);    
	pti = gmtime(&ltime);
	year = pti->tm_year + 1900;
	itoa(year,buf,10);
	strcpy(g_cur_year,buf);
	g_lishi_flag = 0;

}

void Csbckcxdlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Csbckcxdlg)
	DDX_Control(pDX, IDC_TREE1, m_tree);
	DDX_Control(pDX, IDC_jbr, m_jbr);
	DDX_Control(pDX, IDC_ckfs, m_ckfs);
	DDX_Control(pDX, IDC_jckr, m_jckr);
	DDX_Control(pDX, IDC_jcky, m_jcky);
	DDX_Control(pDX, IDC_qckr, m_qckr);
	DDX_Control(pDX, IDC_qcky, m_qcky);
	DDX_Control(pDX, IDC_ckn, m_ckn);
	DDX_Control(pDX, IDC_result, m_result);
	DDX_Text(pDX, IDC_tjzje, m_tjzje);
	DDX_Text(pDX, IDC_tjzsl, m_tjzsl);
	DDX_Text(pDX, IDC_sbmc, m_sbmc);
	DDX_Text(pDX, IDC_sbs, m_sbs);
	DDX_Text(pDX, IDC_qgdbh, m_qgdbh);
	DDX_Text(pDX, IDC_jgdbh, m_jgdbh);
	DDX_Text(pDX, IDC_qckbh, m_qckbh);
	DDX_Text(pDX, IDC_jckbh, m_jckbh);
	DDX_Text(pDX, IDC_ckfx, m_ckfx);
	DDX_Text(pDX, IDC_qwpdj, m_qwpdj);
	DDX_Text(pDX, IDC_jwpdj, m_jwpdj);
	//}}AFX_DATA_MAP

	CBitmap *bitmapadd;
    CBitmap *bitmapadd1;
    CBitmap *bitmapadd2;
    CBitmap *bitmapadd3;    
	CBitmap *bitmapadd4;
    CBitmap *bitmapadd5;

	HBITMAP hbitmapadd;
    HBITMAP hbitmapadd1;
	HBITMAP hbitmapadd2;
	HBITMAP hbitmapadd3;
	HBITMAP hbitmapadd4;
	HBITMAP hbitmapadd5;


    bitmapadd= new CBitmap();
    bitmapadd1= new CBitmap();
	bitmapadd2= new CBitmap();
	bitmapadd3= new CBitmap();
	bitmapadd4= new CBitmap();
	bitmapadd5= new CBitmap();


    bitmapadd->LoadBitmap(IDB_xg);
	bitmapadd1->LoadBitmap(IDB_sc);
	bitmapadd2->LoadBitmap(IDB_cx);
    bitmapadd3->LoadBitmap(IDB_dy);
	bitmapadd4->LoadBitmap(IDB_tj_qx);
    bitmapadd5->LoadBitmap(IDB_tc);

    hbitmapadd= (*bitmapadd).operator HBITMAP();
	hbitmapadd1= (*bitmapadd1).operator HBITMAP();
	hbitmapadd2= (*bitmapadd2).operator HBITMAP();
	hbitmapadd3= (*bitmapadd3).operator HBITMAP();
	hbitmapadd4= (*bitmapadd4).operator HBITMAP();
	hbitmapadd5= (*bitmapadd5).operator HBITMAP();
    
	
	
	CWnd *wnadd;
	CWnd *wnadd1;
	CWnd *wnadd2;
	CWnd *wnadd3;
	CWnd *wnadd4;
	CWnd *wnadd5;


    wnadd = GetDlgItem(ID_xiugai);
	wnadd1 = GetDlgItem(ID_shanchu);
	wnadd2 = GetDlgItem(ID_chaxun);
	wnadd3 = GetDlgItem(ID_dayin);
	wnadd4 = GetDlgItem(ID_qctj);
	wnadd5 = GetDlgItem(IDCANCEL);



    WPARAM wParam;
    LPARAM lParam;
    wParam =  (WPARAM) LOWORD(BS_LEFT | BS_BITMAP); // style 
    lParam =  MAKELPARAM(TRUE, 0);   // redraw flag 
    wnadd->SendMessage(BM_SETIMAGE, IMAGE_BITMAP,(long)hbitmapadd);
	wnadd1->SendMessage(BM_SETIMAGE, IMAGE_BITMAP,(long)hbitmapadd1);
	wnadd2->SendMessage(BM_SETIMAGE, IMAGE_BITMAP,(long)hbitmapadd2);
	wnadd3->SendMessage(BM_SETIMAGE, IMAGE_BITMAP,(long)hbitmapadd3);
	wnadd4->SendMessage(BM_SETIMAGE, IMAGE_BITMAP,(long)hbitmapadd4);
	wnadd5->SendMessage(BM_SETIMAGE, IMAGE_BITMAP,(long)hbitmapadd5);


	if (out_flag == 0){
	int year;

    time_t ltime;    
	struct tm *pti;
	char buf[10];

    time(&ltime);    
	pti = gmtime(&ltime);
	year = pti->tm_year + 1900;
	itoa(year,buf,10);
	g_lishi_flag = 0;
	m_result.SetColWidth(0L,1100L);
	m_result.SetColWidth(1L,1100L);
	m_result.SetColWidth(2L,3600L);
	m_result.SetColWidth(3L,1100L);
	m_result.SetColWidth(4L,2000L);
	m_result.SetColWidth(5L,1200L);
	m_result.SetColWidth(6L,1200L);
	m_result.SetColWidth(7L,1100L);
	m_result.SetColWidth(8L,1100L);
	m_result.SetColWidth(9L,800L);
	m_result.SetColWidth(10L,1100L);
    m_result.SetRow(0L);
	m_result.SetCol(0L);
	m_result.SetText("出库编号");
	m_result.SetCol(1L);
	m_result.SetText("物品单价");
	m_result.SetCol(2L);
	m_result.SetText("设备名称");
	m_result.SetCol(3L);
	m_result.SetText("出库数量");
	m_result.SetCol(4L);
	m_result.SetText("出库方式");
	m_result.SetCol(5L);
	m_result.SetText("总金额");
	m_result.SetCol(6L);
	m_result.SetText("出库时间");
	m_result.SetCol(7L);
	m_result.SetText("经办人");
	m_result.SetCol(8L);
	m_result.SetText("仪器代码");
	m_result.SetCol(9L);
	m_result.SetText("所属部门");
	m_result.SetCol(10L);
	m_result.SetText("固定编号");
	m_result.SetCol(11L);
	m_result.SetText("名称缩写");
	m_result.SetCol(12L);
	m_result.SetText("出库方向");
	m_result.SetCol(13L);
	m_result.SetText("入库编号");
	load_sbtree(m_tree);
	CWnd *wd;
	wd = GetDlgItem(ID_shanchu);
    wd->ShowWindow(FALSE);
	
	FILE *fpe;
	int ret,i;

	  fpe = fopen("c:\\xxsbgl\\jbr.txt","rb");
      g_end_jbr = 0;
	  if (fpe != NULL){
	    ret = fscanf(fpe,"%s\n",buf);
	    while (ret > 0){
		  if (strlen(buf) != 0){
            strcpy(g_jbr_name[g_end_jbr],buf);
            g_end_jbr ++;
		  }
	      ret = fscanf(fpe,"%s\n",buf);
		}
	    fclose(fpe);
	  }
	  m_jbr.InitStorage(1000,10);
	  for (i=0;i<g_end_jbr;i++){
		m_jbr.AddString(g_jbr_name[i]);
	  }
	}

}


BEGIN_MESSAGE_MAP(Csbckcxdlg, CDialog)
	//{{AFX_MSG_MAP(Csbckcxdlg)
	ON_BN_CLICKED(ID_shanchu, Onshanchu)
	ON_BN_CLICKED(ID_xiugai, Onxiugai)
	ON_BN_CLICKED(ID_dayin, Ondayin)
	ON_BN_CLICKED(ID_chaxun, Onchaxun)
	ON_CBN_SETFOCUS(IDC_ckn, OnSetfocusckn)
	ON_CBN_SETFOCUS(IDC_qcky, OnSetfocusqcky)
	ON_CBN_SETFOCUS(IDC_qckr, OnSetfocusqckr)
	ON_CBN_SETFOCUS(IDC_jcky, OnSetfocusjcky)
	ON_CBN_SETFOCUS(IDC_jckr, OnSetfocusjckr)
	ON_EN_SETFOCUS(IDC_sbmc, OnSetfocussbmc)
	ON_EN_SETFOCUS(IDC_sbs, OnSetfocussbs)
	ON_EN_SETFOCUS(IDC_qgdbh, OnSetfocusqgdbh)
	ON_EN_SETFOCUS(IDC_jgdbh, OnSetfocusjgdbh)
	ON_EN_SETFOCUS(IDC_qckbh, OnSetfocusqckbh)
	ON_EN_SETFOCUS(IDC_jckbh, OnSetfocusjckbh)
	ON_CBN_SETFOCUS(IDC_ckfs, OnSetfocusckfs)
	ON_CBN_SETFOCUS(IDC_jbr, OnSetfocusjbr)
	ON_EN_SETFOCUS(IDC_ckfx, OnSetfocusckfx)
	ON_CBN_EDITCHANGE(IDC_ckn, OnEditchangeckn)
	ON_CBN_EDITCHANGE(IDC_qcky, OnEditchangeqcky)
	ON_CBN_EDITCHANGE(IDC_qckr, OnEditchangeqckr)
	ON_CBN_EDITCHANGE(IDC_jcky, OnEditchangejcky)
	ON_CBN_EDITCHANGE(IDC_jckr, OnEditchangejckr)
	ON_EN_CHANGE(IDC_sbmc, OnChangesbmc)
	ON_EN_CHANGE(IDC_sbs, OnChangesbs)
	ON_EN_CHANGE(IDC_qgdbh, OnChangeqgdbh)
	ON_EN_CHANGE(IDC_jgdbh, OnChangejgdbh)
	ON_EN_CHANGE(IDC_qckbh, OnChangeqckbh)
	ON_EN_CHANGE(IDC_jckbh, OnChangejckbh)
	ON_CBN_EDITCHANGE(IDC_ckfs, OnEditchangeckfs)
	ON_CBN_EDITCHANGE(IDC_jbr, OnEditchangejbr)
	ON_EN_CHANGE(IDC_ckfx, OnChangeckfx)
	ON_NOTIFY(TVN_SELCHANGED, IDC_TREE1, OnSelchangedTree1)
	ON_BN_CLICKED(ID_qctj, Onqctj)
	ON_EN_CHANGE(IDC_qwpdj, OnChangeqwpdj)
	ON_EN_SETFOCUS(IDC_qwpdj, OnSetfocusqwpdj)
	ON_EN_CHANGE(IDC_jwpdj, OnChangejwpdj)
	ON_EN_SETFOCUS(IDC_jwpdj, OnSetfocusjwpdj)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Csbckcxdlg message handlers

BEGIN_EVENTSINK_MAP(Csbckcxdlg, CDialog)
    //{{AFX_EVENTSINK_MAP(Csbckcxdlg)
	ON_EVENT(Csbckcxdlg, IDC_result, -601 /* DblClick */, OnDblClickresult, VTS_NONE)
	//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()

void Csbckcxdlg::Onxiugai() 
{
	// TODO: Add your control notification handler code here
	long rowl;
	FILE *fpe;
	long l;
	int num,i,ret;
	char bu[500],buf[100];
	CString str;

	rowl = m_result.GetRow();
	if (rowl > 0L){
		if (rowl < end_result_recs+1){
          g_yszm_mod_rec = rowl - 1;
		  m_result.SetRow(rowl);
		  m_result.SetCol(10L);
		  str = m_result.GetText();
		  strcpy(buf,str.GetBuffer(10));
		  if (strlen(buf) != 6)
			  return ;
		  Csbckxgdlg dlg;
		  dlg.DoModal();

	      fpe = fopen("c:\\xxsbgl\\sbckzm.dat","rb");
	      if (fpe != NULL){
		    fseek(fpe,0L,SEEK_END);
		    l = ftell(fpe);
		    num = l/280;
		    l = order_of_result_recs[g_yszm_mod_rec] * 280L;
		    fseek(fpe,l,SEEK_SET);
		  fread(&(sbckunit.reserve[0]),sizeof(sbckstrt),1,fpe);
		  strcpy(ckbh,sbckunit.ckbh);
		  strcpy(wpdj,sbckunit.wpdj);
		  strcpy(sbmc,sbckunit.sbmc);
		  strcpy(cksl,sbckunit.cksl);
		  strcpy(ckfs,sbckunit.ckfs);
		  strcpy(zje,sbckunit.zje);
		  strcpy(ckn,sbckunit.ckn);
		  strcpy(cky,sbckunit.cky);
		  strcpy(ckr,sbckunit.ckr);
		  strcpy(jbr,sbckunit.jbr);
		  strcpy(yqdm,sbckunit.yqdm);
		  strcpy(ssbm,sbckunit.ssbm);
		  strcpy(gdbh,sbckunit.gdbh);
		  strcpy(pyjx,sbckunit.pyjx);
		  strcpy(ckfx,sbckunit.ckfx);
		  strcpy(rkbh,sbckunit.rkbh);
			m_result.SetRow(rowl);
			m_result.SetCol(0L);
			m_result.SetText(ckbh);
			m_result.SetCol(1L);
			m_result.SetText(wpdj);
			m_result.SetCol(2L);
			m_result.SetText(sbmc);
			m_result.SetCol(3L);
			m_result.SetText(cksl);
			m_result.SetCol(4L);
			m_result.SetText(ckfs);
			m_result.SetCol(5L);
			m_result.SetText(zje);
			m_result.SetCol(6L);
			strcpy(buf,ckn);
			strcat(buf,"年");
			strcat(buf,cky);
			strcat(buf,"月");
			strcat(buf,ckr);
			strcat(buf,"日");
			m_result.SetText(buf);
			m_result.SetCol(7L);
			m_result.SetText(jbr);
			m_result.SetCol(8L);
			m_result.SetText(yqdm);
			m_result.SetCol(9L);
			m_result.SetText(ssbm);
			m_result.SetCol(10L);
			m_result.SetText(gdbh);
			m_result.SetCol(11L);
			m_result.SetText(pyjx);
			m_result.SetCol(12L);
			m_result.SetText(ckfx);
			m_result.SetCol(13L);
			m_result.SetText(rkbh);
            fclose(fpe);
          }
		}
    }
	
}

void Csbckcxdlg::Onshanchu() 
{
	// TODO: Add your control notification handler code here
	long rowl;
    int i,num,n;
	long l;
	char buf[12],buf1[12];
	char bu[500];
	CString str;
	
	num = 0;
	l = m_result.GetRowSel();
	if ((l  > end_result_recs)||(l < 1)){
		MessageBox("您没有选择要删除的纪录.","",MB_OK);
		return ;
    }
	str = m_result.GetClip();
	int flag;
	flag = 0;
    for (i=0;i<str.GetLength();i++){
		if (str[i] == 9){
			flag = 1;
		    break;
		}
    }
	if (flag == 0){
		MessageBox("您没有选择要删除的纪录.","",MB_OK);
		return ;
    }
    for (i=0;i<str.GetLength();i++){
		if (str[i] == 13)
			num ++;
    }
	if (num > 999){
		MessageBox("对不起,不能一次删除一千条以上的纪录,请少选一些.","",MB_OK);
		return ;
    }
    
	int j = 0;
	while (str[j] != 9){
		buf[j] = str[j];
		j ++;
    }
    buf[j] = 0;
    
    Cyszmscqrdlg dlg;

	if (dlg.DoModal() == IDOK){
	for (i=1;i<end_result_recs+1;i++){
	  l = i;
	  str = m_result.GetTextMatrix(l,0L);;
      strcpy(buf1,str.GetBuffer(12));
	  if (strcmp(buf1,buf) == 0){
		  n = i;
		  break;
      }
    }
    
    FILE *fpe,*tofpe;
	long b_pos;
	int num_of_recs;

	fpe = fopen("c:\\xxsbgl\\sbckzm.dat","rb");
    tofpe = fopen("c:\\xxsbgl\\temp.dat","wb");
	fseek(fpe,0L,SEEK_END);
	l = ftell(fpe);
	fseek(fpe,0L,SEEK_SET);
	num_of_recs = l / 280;
    n --;
	n = order_of_result_recs[n];
    b_pos = n * 280L;
    for (i=0;i<n;i++){
		fread(bu,1,280,fpe);
		fwrite(bu,1,280,tofpe);
    }
	l = (n+num+1)*280;
	fseek(fpe,l,SEEK_SET);
	for (i=n+num+1;i<num_of_recs;i++){
		fread(bu,1,280,fpe);
		fwrite(bu,1,280,tofpe);
    }
    fclose(fpe);
	fclose(tofpe);

    fpe = fopen("c:\\xxsbgl\\temp.dat","rb");
	tofpe = fopen("c:\\xxsbgl\\sbckzm.dat","wb");
	fseek(fpe,0L,SEEK_END);
	l = ftell(fpe);
	fseek(fpe,0L,SEEK_SET);
	num_of_recs = l / 280;
	for (i=0;i<num_of_recs;i++){
		fread(bu,1,280,fpe);
		fwrite(bu,1,280,tofpe);
    }
    fclose(fpe);
	fclose(tofpe);
	Onchaxun();
	}
	
}

void Csbckcxdlg::OnDblClickresult() 
{
	// TODO: Add your control notification handler code here
//    Onxiugai();		
}

void Csbckcxdlg::Onchaxun() 
{
	// TODO: Add your control notification handler code here
	FILE *fpe;
	long l;
	int num,i,j,k;
	char bu[500];
	char buf[100];
	float tjzje,tjzsl,f;
	int t_ckn,t_cur_year;

	char buf11[100];

	GetDlgItemText(IDC_sbs,buf11,100);
	strcpy(s_sbs,buf11);

   get_status();
   if ((s_qcksj_flag == 1)||(s_jcksj_flag == 1)){
	  GetDlgItemText(IDC_ckn,buf,10);
      t_ckn = atoi(buf);
      t_cur_year = atoi(g_cur_year);
	  if (t_ckn != t_cur_year){
		  g_lishi_flag = 1;
		  strcpy(g_cur_year,buf);
      }
    }
	else
		g_lishi_flag = 0;

	tjzje = tjzsl = 0;
	end_result_recs = 0;
	m_result.SetRows(2L);
	m_result.SetRow(1L);
	for (l=0;l<=13;l++){
	  m_result.SetCol(l);
	  m_result.SetText("");
    }
	if (g_lishi_flag == 1){
        strcpy(buf,"c:\\xxsbgl\\");
		strcat(buf,g_cur_year);
		strcat(buf,"sbckzm.dat");
        fpe = fopen(buf,"rb");
    }
	else
	  fpe = fopen("c:\\xxsbgl\\sbckzm.dat","rb");
	if (fpe != NULL){
		fseek(fpe,0L,SEEK_END);
		l = ftell(fpe);
		num = l/280;
		fseek(fpe,0L,SEEK_SET);
		l = num + 2;
        m_result.SetRows(l);
        for (i=0;i<num;i++){
		  fread(&(sbckunit.reserve[0]),sizeof(sbckstrt),1,fpe);
		  strcpy(ckbh,sbckunit.ckbh);
		  strcpy(wpdj,sbckunit.wpdj);
		  strcpy(sbmc,sbckunit.sbmc);
		  strcpy(cksl,sbckunit.cksl);
		  strcpy(ckfs,sbckunit.ckfs);
		  strcpy(zje,sbckunit.zje);
		  strcpy(ckn,sbckunit.ckn);
		  strcpy(cky,sbckunit.cky);
		  strcpy(ckr,sbckunit.ckr);
		  strcpy(jbr,sbckunit.jbr);
		  strcpy(yqdm,sbckunit.yqdm);
		  strcpy(ssbm,sbckunit.ssbm);
		  strcpy(gdbh,sbckunit.gdbh);
		  strcpy(pyjx,sbckunit.pyjx);
		  strcpy(ckfx,sbckunit.ckfx);
		  strcpy(rkbh,sbckunit.rkbh);
		  if (sbckcx_if_valid(this)){
		    f = atof(cksl);
		    tjzsl += f; 
		    f = atof(zje);
		    tjzje += f; 
            order_of_result_recs[end_result_recs] = i;
			l = end_result_recs + 2;
//            m_result.SetRows(l);
			m_result.SetRow(l-1L);
			m_result.SetCol(0L);
			m_result.SetText(ckbh);
			m_result.SetCol(1L);
			m_result.SetText(wpdj);
			m_result.SetCol(2L);
			m_result.SetText(sbmc);
			m_result.SetCol(3L);
			m_result.SetText(cksl);
			m_result.SetCol(4L);
			m_result.SetText(ckfs);
			m_result.SetCol(5L);
			m_result.SetText(zje);
			m_result.SetCol(6L);
			strcpy(buf,ckn);
			strcat(buf,"年");
			strcat(buf,cky);
			strcat(buf,"月");
			strcat(buf,ckr);
			strcat(buf,"日");
			m_result.SetText(buf);
			m_result.SetCol(7L);
			m_result.SetText(jbr);
			m_result.SetCol(8L);
			m_result.SetText(yqdm);
			m_result.SetCol(9L);
			m_result.SetText(ssbm);
			m_result.SetCol(10L);
			m_result.SetText(gdbh);
			m_result.SetCol(11L);
			m_result.SetText(pyjx);
			m_result.SetCol(12L);
			m_result.SetText(ckfx);
			m_result.SetCol(13L);
			m_result.SetText(rkbh);
            end_result_recs ++;
          }
        } 
		sprintf(buf,"%10.2f",tjzsl);
		SetDlgItemText(IDC_tjzsl,buf);
		sprintf(buf,"%10.2f",tjzje);
		SetDlgItemText(IDC_tjzje,buf);
		fclose(fpe);
	}
	
	free_sbtree(m_tree);
	load_sbtree(m_tree);

	SetDlgItemText(IDC_sbs,buf11);
}

void sbckcx_yield_cond()
{

}

BOOL sbckcx_if_valid(Csbckcxdlg *dlg)
{
  int num,i,j;
  long bl,el,l;
  float bf,ef,f;
  int t_ckn,t_cky,t_ckr,t_qsckn,t_qscky,t_qsckr,t_jsckn,t_jscky,t_jsckr;
  char buf[100],buf1[100];
  char *pstr,*pstr1,buf11[50];
  int flag,b_flag;
  
  num = 0;
  if (s_qcksj_flag == 1)
	  num ++;
  if (s_jcksj_flag == 1)
	  num ++;
  if (s_sbs_flag == 1)
	  num ++;
  if (s_sbmc_flag == 1)
	  num ++;
  if (s_qckbh_flag == 1)
	  num ++;
  if (s_jckbh_flag == 1)
	  num ++;
  if (s_ckfx_flag == 1)
	  num ++;
  if (s_jbr_flag == 1)
	  num ++;
  if (s_ckfs_flag == 1)
	  num ++;
  if (s_qgdbh_flag == 1)
	  num ++;
  if (s_jgdbh_flag == 1)
	  num ++;
  if (s_qwpdj_flag == 1)
	  num ++;
  if (s_jwpdj_flag == 1)
	  num ++;
  if (num == 0)
    return TRUE;
  if (s_qcksj_flag == 1){
      t_ckn = atoi(ckn);
	  t_cky = atoi(cky);
	  t_ckr = atoi(ckr);
      t_qsckn = atoi(g_ckcx_qscksjn);
	  t_qscky = atoi(g_ckcx_qscksjy);
	  t_qsckr = atoi(g_ckcx_qscksjr);
      l = t_ckn*10000L + t_cky*100L + t_ckr;
	  bl = t_qsckn*10000L + t_qscky*100L + t_qsckr;
	  if (bl != 0L){
		  if (l < bl)
			  return FALSE;
      }
  }
  if (s_jcksj_flag == 1){
      t_ckn = atoi(ckn);
	  t_cky = atoi(cky);
	  t_ckr = atoi(ckr);
      t_jsckn = atoi(g_ckcx_jscksjn);
	  t_jscky = atoi(g_ckcx_jscksjy);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -