Logo



仓库管理系统源码c(仓库管理系统源码)

本文目录一览:

C语言写一个仓库管理系统

#includestdio.h#includestdlib.h#includestring.h#includemalloc.h#define max 32int ifempty=0;//标志,判断链表是无否为空typedef struct dnode /* 定义双向链表结构体 */ {int number; /* 货物编号 */char name[max]; /* 货物名称 */ int counter; /* 货物数量 */struct dnode *prior, *next;/* 定义两指针,分别指向其前驱和后继 */}dlnode; dlnode *create(dlnode *L);dlnode *input(dlnode *L);dlnode *output(dlnode *L);dlnode * outnum(dlnode *L);dlnode * outname(dlnode *L);dlnode *current(dlnode *L);void search(dlnode *L);void print(dlnode *L);void searchnum(dlnode *L);void searchname(dlnode *L);void display(dlnode *L) ;void main(){int x;dlnode *L;if(!(L=(dlnode *)malloc(sizeof(dlnode)))) //分配空间{printf("\n");exit(1);}create(L);///调用函数,创建头节点while(1){////////////////////////主菜单///////////////////////////printf(" ============================\n");printf(" 1. 货物出库和入库\n");printf(" 2. 查找货物表\n"); printf(" 3. 显示仓库货物表\n");printf(" 4. 输出到文件\n");printf(" 0. 退出\n");printf(" =============================\n");printf(" 选择0--3:");scanf("%d",x);switch(x){case 2:search(L);break;//调用查找函数case 1:current(L);break;//调用入库出库函数case 3:display(L);break;//调用显示输出函数case 4:print(L);break;//调用打印函数case 0:printf("\n bye!see you!\n");getchar();getchar();exit(0);//退出程序default:printf("\n Enter erreor!please input 0--4!"); getchar();getchar();}}}dlnode *create(dlnode *L)//创建链表头节点{printf(" 欢迎使用我的仓库管理系统");getchar(); ifempty=0;///////初始化头节点的值////////L-next=NULL;L-prior=NULL;L-number=L-counter=0;strcpy(L-name," "); return L;}void search(dlnode *L) ///查找的主要菜单{int y;if(ifempty==0){printf("没有输入货物!\n");getchar();getchar();return;}else{while(1){printf("=====================\n");printf("1.按编号查询\n");printf("2.按货物名称查询\n");printf("0.返回上一层\n");printf("====================\n");printf("选择0--2:");scanf("%d",y);switch(y){case 1:searchnum(L);break;//调用按编号查找的函数case 2:searchname(L);break;//调用按名称查找的函数case 0:return;//返回default:printf("enter error!Please input 0--2!\n\n");getchar();getchar();printf("\n\n");}}}}void searchnum(dlnode *L)///按编号查找的函数{int num,flag=0;//flag为是否找到的标志dlnode *head=L;if(ifempty==0){printf("没有货物被输入\n");getchar();getchar();return;}printf("输入你要查找的货物编号:\n");scanf("%d",num);while((L=L-next)!=head){if(L-number==num){ flag=1;//flag为1时表示找到printf("找到指定编号货物 \n"); printf("\n编号:%d\n",L-number);printf("名称:%s\n",L-name) ;printf("数量:%d\n\n",L-counter); } }if(flag==0)//flag为0时表示没有找到printf("没有找到指定编号货物,请查看是否还有货物。\n");getchar();getchar();}void searchname(dlnode *L)//按名称查找的函数{int flag=0;//flag为是否找到的标志char na[32];dlnode *head=L;if(ifempty==0){printf("没有货物被输入\n");getchar();getchar();return;}printf("输入你要查找的货物名称\n");scanf("%s",na);while((L=L-next)!=head){if(strcmp(L-name,na)==0){ flag=1;//flag为1时表示找到printf("找到指定名称货物 \n"); printf("\n编号:%d\n",L-number);printf("名称:%s\n",L-name) ;printf("数量:%d\n\n",L-counter); } }if(flag==0)//flag为0时表示没有找到printf("没有找到指定编号货物,请查看是否还有货物。\n\n");getchar();getchar();}dlnode *current(dlnode *L)//货物出库入库函数{int y;while(1){printf("========================\n");printf(" 1.货物入库\n");printf(" 2.货物出库\n");printf(" 0.返回上一层\n");printf("========================\n");printf(" 选择0--2:");scanf("%d",y);switch(y){case 1:input(L);break;//调用入库函数case 2:output(L);break;//调用出库函数case 0:return(L);//返回上一层default:printf("enter error!Please input 0--2!");getchar();getchar();printf("\n\n");}}}dlnode *input(dlnode *L)//定义入库函数{dlnode *in,*head;head=in=(dlnode *)malloc(sizeof(dlnode));//分配空间head=L;printf("\n请输入货物数据:\n");printf("编号:");scanf("%d",in-number);printf("名称:");scanf("%s",in-name);printf("数量:");scanf("%d",in-counter);if(L-next==NULL) //如果只有头节点,{ //把刚输入的in节点L-next=in; //跟在头节点后面L-prior=in; //in-next=L; //in-prior=L; //ifempty++; //ifempty加1}else{//如果当前L的下一个节点不是头节点while((L=L-next)!=head){//如果输入的数大于L-number,则插到L的前面if(L-numberin-number){in-next=L;in-prior=L-prior; L-prior-next=in;L-prior=in;ifempty++; //ifempty加1return(head);} }//输入的编号比其它编号都小,则插到最后个节点,并首尾相连head-prior-next=in;in-prior=head-prior;head-prior=in;in-next=head;ifempty++; //ifempty加1} return head;}dlnode *output(dlnode *L)//出库的函数{int y;dlnode *head=L;if(ifempty==0)//检测是否有货物输入{printf("没有货物输入系统\n");getchar();getchar();return(head);} while(1){printf("=============\n");printf("1.按编号出库\n");printf("2.按名称出库\n");printf("0.返回上一层\n");printf("==============\n");printf("选择0--2:");scanf("%d",y);switch(y){case 1:outnum(L);break;//调用按编号出库函数case 2:outname(L);break;//调用按名称出库函数case 0:return(L);default:printf("enter error!Please input 0--2!");getchar();getchar();printf("\n\n");}}} dlnode *outnum(dlnode *L)//按编号出库函数{ int num;dlnode *head=L;printf("请输入出库货物的编号:");scanf("%d",num);while((L=L-next)!=head){//如果找到就删除节点if(L-number==num){L-prior-next=L-next;L-next-prior=L-prior;ifempty--; //ifempty减1 printf("编号为%d的货物成功出库",num); getchar();getchar();return head; } }printf("没有此编号的货物,请查看是否还有货物。\n\n");getchar();getchar();return (head);}dlnode *outname(dlnode *L)//按名称出库函数{char na[32];dlnode *head=L;printf("请输入出库货物的名称:");scanf("%s",na);while((L=L-next)!=head){//如果找到就删除节点if(strcmp(L-name,na)==0){L-prior-next=L-next;L-next-prior=L-prior;ifempty--; //ifempty减1 printf("名称为%s的货物成功出库",na);getchar();getchar();return (head);}}printf("没有此名称的货物,请查看是否还有货物。\n\n");getchar();getchar();return(head);} void display(dlnode *L)//显示货物清单{dlnode *head=L;if(ifempty==0){printf("没有货物可显示\n");getchar();getchar();return;}L=L-next;do{ printf("\n编号:%d\n",L-number);printf("名称:%s\n",L-name) ;printf("数量:%d\n\n",L-counter);}while((L=L-next)!=head);getchar();getchar(); }void print(dlnode *L){dlnode *head=L;L=L-next;char filename[max];FILE *out;if(ifempty==0){printf("没有货物可输出\n");getchar();getchar();return;}printf("请输入文件名称:");scanf("%s",filename);if((out=fopen(filename,"w"))==NULL){printf("打开文件失败!\n");getchar();getchar();return;}do{ fprintf(out,"编号:%d\n名称:%s\n数量:%d\n\n",L-number,L-name,L-counter);}while((L=L-next)!=head);printf("输出成功\n");getchar();getchar();fclose(out);}

c语言仓库管理系统源代码

学籍管理的程序,你自己改改吧

#includestdio.h

#includewindows.h

#includeconio.h

int add();

int amend();

int remove();

int show_student();

int show_class();

struct info //定义结构体info,用于存储学生信息

{

char name[20]; //姓名

char sex[20]; //性别

char idcard[20]; //身份证号码

char stuid[10]; //学号

char academe[20]; //学院

char specialty[20]; //专业

char classid[20]; //班级

char home[20]; //生源地

}stu[100];

int j=0;

int main(void) //主函数

{

/*登陆界面设计*/

char gongnengxuanzhe;

int flag=1;

system("cls");

printf("\n");

printf("\t\t\t\t 欢迎\n");

printf("\n\n\t尊敬的用户, 非常感谢您使用本系统 , 您的完美体验将是我们前进的方向 !\n\n\n");

printf("\t系统功能简介:\n\n\n");

printf("\t\t①:通过键盘输入某位学生的学生证信息。\n\n");

printf("\t\t②:给定学号,显示某位学生的学生证信息。\n\n");

printf("\t\t③:给定某个班级的班号,显示该班所有学生的学生证信息。\n\n");

printf("\t\t④:给定某位学生的学号,修改该学生的学生证信息。\n\n");

printf("\t\t⑤:给定某位学生的学号,删除该学生的学生证信息。\n\n");

printf("\t\t⑥:按出生日期对全班学生的信息进行排序。\n\n\n");

printf("\t按任意键进入系统......");

getch();

do

{

system("cls");

printf("\n\n\n");

printf(" 尊敬的用户 ,欢迎您使用本系统 !\n");

printf("\n\n\n");

printf(" 1.增加学生信息\n\n");

printf(" 2.修改学生信息\n\n");

printf(" 3.删除学生信息\n\n");

printf(" 4.显示单个学生信息\n\n");

printf(" 5.显示整个班级学生信息\n\n");

printf(" 0.退出系统\n\n\n\n");

printf(" 请选择您需要使用的功能:");

gongnengxuanzhe=getch();

switch(gongnengxuanzhe)

{

case '1':add();break;

case '2':amend();break;

case '3':remove();break;

case '4':show_student();break;

case '5':show_class();break;

case '0':flag=0;break;

default:

{

printf("\n\n 您的输入有误,请仔细阅读使用说明!");

printf("\n 任意键继续...");

getch();

}

}

}while(flag==1);

system("cls");

printf("\n\n\n\n\n\n\n\n\n\n\t尊敬的用户,非常感谢您的使用,您对于完美的追求是我们唯一的动力!");

printf("\n\n\t\t\t 按任意键退出系统......");

getch();

return 0;

}

int add() //增加学生信息函数

{

char flag='1';

do

{

system("cls");

printf("\n\t姓名:");

scanf("%s",stu[j].name);

printf("\n\n\t性别:");

scanf("%s",stu[j].sex);

printf("\n\n\t身份证号:");

scanf("%s",stu[j].idcard);

printf("\n\n\t学院:");

scanf("%s",stu[j].academe);

printf("\n\n\t专业:");

scanf("%s",stu[j].specialty);

printf("\n\n\t班级:");

scanf("%s",stu[j].classid);

printf("\n\n\t学号:");

scanf("%s",stu[j].stuid);

printf("\n\n\t生源地:");

scanf("%s",stu[j].home);

j++;

printf("\n\t继续增加请键入1,返回请键入其他任意键:");

getchar();

flag=getchar();

}while(flag=='1');

return 0;

}

int amend() //修改学生信息函数

{

if(j==0)

{

system("cls");

printf("\n\n\n\n\n\n\n\n\n\n\t\t 系统无任何可以修改的记录,请先行输入数据!");

printf("\n\n\t\t\t 按任意键返回......");

getch();

return 0;

}

char a[20];

int z;

int flag=0;

do

{

system("cls");

printf("\n\t需要修改的学生学号:");

scanf("%s",a);

for(z=0;zj;z++)

{

if(strcmp(stu[z].stuid,a)==0)

{

flag=1;

break; //break退出后,z++不会执行

}

}

if(flag==0)

{

printf("\t对不起,你请求学生信息不存在,请核实后重试!\n");

printf("\t按任意键继续......");

getch();

}

}while(flag==0);

system("cls");

printf("\n\t姓名:");

scanf("%s",stu[z].name);

printf("\n\n\t性别:");

scanf("%s",stu[z].sex);

printf("\n\n\t身份证号:");

scanf("%s",stu[z].idcard);

printf("\n\n\t学院:");

scanf("%s",stu[z].academe);

printf("\n\n\t专业:");

scanf("%s",stu[z].specialty);

printf("\n\n\t班级:");

scanf("%s",stu[z].classid);

printf("\n\n\t学号:");

scanf("%s",stu[z].stuid);

printf("\n\n\t生源地:");

scanf("%s",stu[z].home);

return 0;

}

int remove() //删除学生信息函数

{

if(j==0)

{

system("cls");

printf("\n\n\n\n\n\n\n\n\n\n\t\t 系统无任何可以删除的记录,请先行输入数据!");

printf("\n\n\t\t\t 按任意键返回......");

getch();

return 0;

}

char a[20];

int z;

int x;

int flag=0;

do

{

system("cls");

printf("\n\t需要删除的学生学号:");

scanf("%s",a);

for(z=0;zj;z++)

{

if(strcmp(stu[z].stuid,a)==0)

{

flag=1;

for(x=z;xj;x++)

{

strcpy(stu[x].name,stu[x+1].name);

strcpy(stu[x].sex,stu[x+1].sex);

strcpy(stu[x].idcard,stu[x+1].idcard);

strcpy(stu[x].academe,stu[x+1].academe);

strcpy(stu[x].specialty,stu[x+1].specialty);

strcpy(stu[x].classid,stu[x+1].classid);

strcpy(stu[x].stuid,stu[x+1].stuid);

strcpy(stu[x].stuid,stu[x+1].stuid);

}

j--;

printf("\n\t删除成功!");

printf("\n\t按任意键返回上级菜单......");

getch();

}

}

if(flag==0)

{

printf("\t对不起,你请求学生信息不存在,请核实后重试!\n");

printf("\t按任意键继续......");

getch();

}

}while(flag==0);

return 0;

}

int show_student() //单个显示学生信息函数

{

if(j==0)

{

system("cls");

printf("\n\n\n\n\n\n\n\n\n\n\t\t 系统无任何可以显示的记录,请先行输入数据!");

printf("\n\n\t\t\t 按任意键返回......");

getch();

return 0;

}

char a[20];

int z;

int flag=0;

do

{

system("cls");

printf("\n\t需要显示的学生学号:");

scanf("%s",a);

for(z=0;zj;z++)

{

if(strcmp(stu[z].stuid,a)==0)

{

flag=1;

system("cls");

printf("\n\t姓名:%s",stu[z].name);

printf("\n\n\t性别:%s",stu[z].sex);

printf("\n\n\t身份证号:%s",stu[z].idcard);

printf("\n\n\t学院:%s",stu[z].academe);

printf("\n\n\t专业:%s",stu[z].specialty);

printf("\n\n\t班级:%s",stu[z].classid);

printf("\n\n\t学号:%s",stu[z].stuid);

printf("\n\n\t生源地:%s",stu[z].home);

printf("\n\n\t按任意键返回上级菜单......");

getch();

}

}

if(flag==0)

{

printf("\t对不起,你请求显示的学生信息不存在,请核实后重试!\n");

printf("\t按任意键继续......");

getch();

}

}while(flag==0);

return 0;

}

int show_class() //显示整个班级学生信息函数

{

if(j==0)

{

system("cls");

printf("\n\n\n\n\n\n\n\n\n\n\t\t 系统无任何可以显示的记录,请先行输入数据!");

printf("\n\n\t\t\t 按任意键返回......");

getch();

return 0;

}

char a[20];

int z;

int x;

int flag=0;

do

{

system("cls");

printf("\n\t需要显示的班级号码:");

scanf("%s",a);

for(z=0;zj;z++)

{

if(strcmp(stu[z].classid,a)==0)

{

flag=1;

system("cls");

printf("\t%s %s 基本信息\n",stu[z].specialty,stu[z].classid);

for(x=0;xj;x++)

{

if(strcmp(stu[x].classid,a)==0)

{

printf("\n\n\t姓名:%s",stu[z].name);

printf("\n\t性别:%s",stu[z].sex);

printf("\n\t身份证号:%s",stu[z].idcard);

printf("\n\t学院:%s",stu[z].academe);

printf("\n\t专业:%s",stu[z].specialty);

printf("\n\t班级:%s",stu[z].classid);

printf("\n\t学号:%s",stu[z].stuid);

printf("\n\t生源地:%s",stu[z].home);

}

}

printf("\n\n\t按任意键返回上级菜单......");

getch();

}

}

if(flag==0)

{

printf("\t对不起,你请求显示的班级信息不存在,请核实后重试!\n");

printf("\t按任意键继续......");

getch();

}

}while(flag==0);

return 0;

}

有疑问联系我,975853545@qq.com

请采纳。

WMS--开源仓库管理系统

WMS--开源仓库管理系统

二、实现功能

三、技术选型

python

django

四、界面展示

五、源码地址

私信回复:wms

VB仓库管理系统源代码

晕,楼上的回答怎么没有一个写代码的啊,我代码写好了dim myConn as object

dim myRecord aS OBJECT

Dim mySQL As String

Dim strSQL As String

SET myConn CreateObject("ADODB.Connection") '创建对象

SET myConn CreateObject("ADODB.Connection") '创建对象

Private Sub Form_Load()

Dim mySQL As String

Dim strSQL As String

'设定连接字符串

mySQL = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;"

mySQL = mySQL + "Data Source=" App.Path "\Product.mdb"

myConn.ConnectionString = mySQL '设定连接字符串

'MsgBox mySQL

myConn.Open '打开连接

myRecord.ActiveConnection = myConn '设定RecordSeet的连接对象为Connection

strSQL = "select * from Products" '设定查询字符串

'打开myRecord

myRecord.Open strSQL, , adOpenDynamic, adLockOptimistic

'显示数据

ShowData

End Sub

Private Sub ShowData()

On Error Resume Next

'产品编号

Text1.Text = myRecord.Fields("ProductID").Value

'产品名称

Text2.Text = myRecord.Fields("ProductName").Value

'供应商编号

Text3.Text = myRecord.Fields("SupplierID").Value

'类别编号

Text4.Text = myRecord.Fields("CategoryID").Value

'单位数量

Text5.Text = myRecord.Fields("QuantityPerUnit").Value

'单价

Text6.Text = myRecord.Fields("UnitPrice").Value

'库存数量

Text7.Text = myRecord.Fields("UnitsInStock").Value

'订单数量

Text8.Text = myRecord.Fields("UnitsOnOrder").Value

'重订等级

Text9.Text = myRecord.Fields("ReorderLevel").Value

End Sub

'后一条按钮单击事件

Private Sub Command8_Click()

'移动记录到下一条的方法是MoveNext

'在调用MoveNext方法之前,首先需要判断,当前是不是已经超出尾纪录

'若超出尾记录,再执行MoveNext会出错

If Not myRecord.EOF Then

myRecord.MoveNext

Else

'超出尾记录,使用MoveLast恢复指向尾记录

myRecord.MoveLast

End If

'显示数据

ShowData

End Sub

'前一条按钮单击事件

Private Sub Command7_Click()

'判断是否超出头记录

'若超出头记录,再执行MovePrevious会出错

If Not myRecord.BOF Then

myRecord.MovePrevious

Else

'超出头记录

'使用MoveFirst恢复到指向第一条记录

myRecord.MoveFirst

End If

'显示数据

ShowData

End Sub

'尾记录按钮单击事件

Private Sub Command9_Click()

'调用MoveLast

myRecord.MoveLast

'显示记录

ShowData

End Sub

Private Sub Command5_Click()

'调用Recordset对象cancelUpdate方法取消数据保存

myRecord.CancelUpdate

myRecord.MoveFirst

'显示数据

ShowData

End Sub

'首记录按钮单击事件

Private Sub Command6_Click()

'调用MoveFirst移动

myRecord.MoveFirst

'显示记录

ShowData

End Sub

Private Sub Command4_Click()

On Error Resume Next

'保存数据,这里需要通过编程来实现

'产品编号

'产品编号不能为空

If Text1.Text = "" Then

MsgBox "产品编号不能为空!"

Text1.SetFocus

Exit Sub

End If

'其他文本框的判断类似,这里省略

'保存产品编号

myRecord.Fields("ProductID").Value = Val(Text1.Text)

'保存产品名称

myRecord.Fields("ProductName").Value = Text2.Text

'保存供应商编号

myRecord.Fields("SupplierID").Value = Val(Text3.Text)

'保存类别编号

myRecord.Fields("CategoryID").Value = Val(Text4.Text)

'保存单位数量

myRecord.Fields("QuantityPerUnit").Value = Text5.Text

'保存单价

myRecord.Fields("UnitPrice").Value = Val(Text6.Text)

'保存库存数量

myRecord.Fields("UnitsInStock").Value = Text7.Text

'保存订单数量

myRecord.Fields("UnitsOnOrder").Value = Val(Text8.Text)

'保存重订等级

myRecord.Fields("ReorderLevel").Value = Val(Text9.Text)

'调用Recordset对象Update方法保存数据

myRecord.Update

'显示数据

ShowData

End Sub

求仓库管理系统C语言代码

通用Excel,自主开发仓库管理系统、CRM、OA等,可以集成到一起,也可以分开。关键是个性化定制,操作简单,不需要编程,不需要C语言,Excel界面维护容易,成本低。

java web+mysql 仓库管理系统 源码

你好,这有一个

下载就可以了

希望你到那注册下,也支持下网站!!

  仓库管理系统源码c 

发布者  :  访客  2023/01/24  回复

存供应商编号myRecord.Fields("SupplierID").Value = Val(Text3.Text)'保存类别编号myRecord.Fields("Catego

发布者  :  访客  2023/01/24  回复

int(dlnode *L){dlnode *head=L;L=L-next;char filename[max];FILE *out;if(ifempty==0){printf("没有货物可输出\n");getchar();getchar();return;}printf("请输入文件名称:

发布者  :  访客  2023/01/24  回复

x+1].stuid); strcpy(stu[x].stuid,stu[x+1].stuid); } j--; pri

发布者  :  访客  2023/01/23  回复

n",L-counter); } }if(flag==0)//flag为0时表示没有找到printf("没有找到指定编号货物,请查看是否还有货物。\n\n");getchar();getchar();}dlnode *current(dlnode *L)//货物出库入库函数{int

发布者  :  访客  2023/01/23  回复

includewindows.h#includeconio.hint add();int amend();int remove();int show_student();int show_class();struct info //定义结构体info,


评论


最新评论