forum

Home / DeveloperSection / Forums / C # update And Delete

C # update And Delete

Sagar Ambre173625-Feb-2016
Hi,
Sir I want to know about Update and Delete sql table in c#.net with windows application..
  When i save my data in database in sale form like following fields.....0)date ,1)custid , 2)custnm ,3)itemid ,4)itemnm ,5)itemqty ,6)itemrate ,7)totalRs...
                                                                  i saved following data suppose :
    A]   i have 20 biscuit packs in my stock table.
    B]Date :24/02/2016 , custid :1 , custnm : Sagar , itemid : 101 , itemnm : biscuit ,  itemqty : 10 , itemrate : 5 , totalRs : 50.
    C]so my account balance is 50. bcoz it is my income..so in my Balance Table i have 50 rs.
    D]and my stock is  biscuit = 10 packs .
    E]now customer came and he replace the 5 biscuit pack .
    F]So i want to do like this on sales return form....
date : 25/02/2016 , custid : 1 , custnm : Sagar , itemid : 101 , itemnm : biscuit ,  itemqty : 5 , itemrate : 5 , totalRs : 25.
when i done this entry i want to update my stock and balance table like this ...
              |  1] Start Stock = 20 ;                                | 1]start balance = 0 ;
Stock  | 2]After Sale = 10 ;                     Balance| 2]After Sale = 50 ;
             |  3]After Sale Return = 15;                       | 3]After Sale Return = 25


                  So Please help me how to do it in my programs bcoz i m doing inventory software if i delete the transaction then
My balance want to = 0 ; and Stock Want to = 20  So please Help Me


Updated on 28-Feb-2016

Can you answer this question?


Answer

4 Answers

Liked By