📄 posdb.h
字号:
#ifndef __DB_OPTION_H__
#define __DB_OPTION_H__
#include "linklist.h"
typedef struct staff
{
char id[7];
char name[16];
char passwd[17];
int type;
char remark[31];
}staff_info;
typedef struct product
{
char bar_code[9];
char name[31];
char unit[17];
char spec[17];
float sale_price;
float purchase_price;
int count;
float discount;
}product_info;
typedef struct sale
{
char sale_id[21];
char trans_id[5];
char staff_id[9];
char date[17];
float give_sum;
float real_sum;
float sale_money;
float change;
int sale_state;
}sale_record;
typedef struct product_info
{
char bar_code[9];
char name[31];
char unit[17];
char spec[17];
float sale_price;
int count;
float sum;
float discount;
int storage;
}for_sale;
int get_product_info_list(LINKLIST *linklist);
int sale_list_by_user(LINKLIST *linklist,char *str);
int sale_list_by_date(LINKLIST *linklist,char *first,char *last);
int get_sale(sale_record *str,char *sale_id);
int get_detail_id();
int get_trans_id();
int get_product(char *bar_code,product_info *temp);
int db_connect();
int user_confirm(char *user,struct staff *temp);
void getconf(const char *filename,char *user,char *passwd);
void update_product(char *bar_code,int count);
int update_sale(float sale_money,float change,int sale_state,char *str);
int insert_sale(struct sale *temp);
int insert_sale_detail(char *bar_code,int count,float sale_price,char *detail_id,sale_record *temp);
void insert_sale_temp(char *sale_id,char *staff_id);
int insert_new_staff(struct staff *temp);
int insert_new_product(product_info *temp);
int get_detail_bar_code(LINKLIST *linklist,char *str);
int get_staff_list(LINKLIST *linklist);
void del_sale_temp(char *sale_id);
int del_product(char *bar_code);
int del_staff(char *str);
int is_sale_id(char *str);
int is_staff_id(char *str);
int is_product_code(char *bar_code);
int update_staff(struct staff *temp);
int update_product_info(product_info *temp);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -