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

📄 posmain.c

📁 LINUX下POS收银系统,可以对货物及工作人员进行管理.近本实现增删改查的功能
💻 C
字号:
#include "control_db.h"
#include <ncurses.h>


int main()

{
/*
	connect_db();*/
	int rec=0;
	rec=read_config_file();
	if(rec)
	{
		system("imp pos/pos file=pos.dmp fromuser=pos touser=cj0804");
	}
	initscr();
	refresh();
	if(has_colors==FALSE)
	{
		endwin();
		exit(0);
	}
	start_color();
	init_pair(1,COLOR_BLACK,COLOR_WHITE);
	init_pair(2,COLOR_WHITE,COLOR_BLACK);
	init_pair(3,COLOR_BLACK,COLOR_RED);
	init_pair(4,COLOR_BLACK,COLOR_YELLOW);
	init_pair(5,COLOR_BLACK,COLOR_BLACK);
	init_pair(6,COLOR_RED,COLOR_BLUE);
	init_pair(7,COLOR_RED,COLOR_BLACK);
	init_pair(8,COLOR_BLACK,COLOR_RED);
	init_pair(9,COLOR_WHITE,COLOR_RED);
	init_pair(10,COLOR_WHITE,COLOR_CYAN);
	int result=0,sign=1; 
	EMP e={"\0","\0","\0",-1,-1,"\0"};
	do
	{
		result=land(&e);
		switch (result)
		{
		case 0:
			sign=0;
			break;
		case 3:/*退货用户登陆*/
			wbkgd(stdscr,COLOR_PAIR(2));
			refresh();
			tuihuo();
			break;
		case 4:/*后台管理员用户登陆*/
			manage(&e);
			break;
		case 5:/*普通用户登陆*/
			jiemian(&e);
			break;
		}

	}while(sign);
	attroff(COLOR_PAIR(1));
	attroff(COLOR_PAIR(2));
	attroff(COLOR_PAIR(3));
	attroff(COLOR_PAIR(4));
	attroff(COLOR_PAIR(5));
	attroff(COLOR_PAIR(6));
	attroff(COLOR_PAIR(7));
	attroff(COLOR_PAIR(8));
	attroff(COLOR_PAIR(9));
	attroff(COLOR_PAIR(10));
	endwin();
	quit_db();
	return 0;
}

⌨️ 快捷键说明

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