Code of My Project
Code of My Project
Code of My Project
----- Users
create table users(
user_id int not null identity primary key,
user_name varchar(100) not null,
user_username varchar(100) not null,
user_password nvarchar(100) not null,
user_phone varchar (100) not null,
user_email varchar(100) not null,
user_status tinyint not null default 1
)
--------------------- Categories
create table Categories (
cat_id int not null primary key identity,
cat_name varchar(50),
cat_inactive tinyint not null
)
---- Products
create table products (
pro_id int not null primary key identity,
pro_name varchar(50) not null,
pro_barcode nvarchar(100),
pro_expiry date,
pro_cat_id int not null foreign key references Categories(cat_id)
)
select * from products
------------ getuserdataforlogin
--- supplier
----getsupplier
create procedure insertsupplier
@suppliername varchar(100),
@contactperson varchar(100),
@phone1 varchar(15),
@phone2 varchar(15),
@addresss varchar(100),
@ntn varchar(100),
@status tinyint
AS
insert into supplier
(supplierName,conatctPerson,phone1,phone2,AddressS,NTN,Supplier_status)
values(@suppliername,@contactperson,@phone1,@phone2,@addresss,@ntn,@status)
--purchase invoice