7
Answers

Substraction from 2 Fields, out of two .csv Files

Photo of s h

s h

12y
1.2k
1
Hello all,
i got help by Vulpes in this Thread-> 

http://www.c-sharpcorner.com/Forums/Thread/205494/string-split-how-to-calculate-slot.aspx  

I wanna rewrite the Code from Vulpes, but dont now how to do that with two files.

I have a FIRST File that looks like that: (crap Export i made)

"";"";0
"  09000";"Catalog 1";10148
"  09001";"Catalog 2";20
"  09002";"Catalog 3";166

I have a SECOND File that looks like that:
"  09000";476
"  09001";10
"  09005";5

What to do? the Output file must look like that:
09000~Catalog 1~9672
09001~Catalog 2~10
09002~Catalog 3~161

I need to substract Field 3 from the FIRST File, with Field 2 from the SECOND File and get a Output like above.



Answers (7)

0
Photo of Ranjit Powar
NA 8.1k 496.7k 11y
Try this    

  SqlDataAdapter da;
        DataSet ds;
         da = new SqlDataAdapter("Select name from Tablename ", con);
                da.SelectCommand.CommandType = CommandType.StoredProcedure;
                ds = new DataSet();
                da.Fill(ds);
               textbox1 . Text = ds.Tables[0].Rows[0]["Name"].ToString();
                textbox2 . Text = ds.Tables[0].Rows[1]["Name"].ToString();
Accepted
1
Photo of Ranjit Powar
NA 8.1k 496.7k 11y
Your problem solved or not?
0
Photo of sama rr
NA 12 3k 11y
Thanks for replay...

if sql table like below

sno  qunty  rate
1  5  6
2  4  3.5

multiply coloum2 and coloum3

read
first textbox,second text box  dispaly  like ( qunty * rate )5*6= 30

o/p

30
14