2
Answers

logic for stock management in c# with MSAccess as backend

o k

o k

11y
2k
1
hi guys 
i am trying to do a simple  shop management system 
i need to buy , sell few items and to show total stock after every transaction .
i have used 2 list views . 1st for showing each transaction and 2nd for showing available stock 
 I am stuck up with the selling scenario . 
how to get total quantity of each item from database ?
suppose i have added  CAR 10 , trucks 20 and then if i have to add CAR's again how to do that ? i want to show it as a separate transaction but want to add that quantity to total stock . I can show that as a separate transaction but unable to update the total quantity :(

can you help me with the logic  or code snippets ?

 
Answers (2)
0
o k

o k

NA 3 2k 11y
code  to insert data  into table .program ask user to enter item name , id , price ,quantity .


public static void save(EntityPurchase epr)
        {
            OleDbDataAdapter da=new OleDbDataAdapter("Insert into shop values ('"+epr.Itemid+"','"+epr.Iname+"','"+epr.Quantity+"','"+epr.Price+"','"+epr.Curdate+"')",con);
            ds=new DataSet();
            da.Fill(ds,"temp");
        
        }


i have no idea about using sum clause n group by clause can you just explain it here ? any related links will be helpful
0
Veena Sarda

Veena Sarda

NA 18.3k 1.5m 11y
Could you show your code for adding 10 Car and trucks. Have you tried using sum clause and group by statement.