Click here to Skip to main content
15,886,799 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionForm Disposal and Null Containers Pin
Tristan Rhodes26-May-09 0:14
Tristan Rhodes26-May-09 0:14 
AnswerRe: Form Disposal and Null Containers Pin
Henry Minute26-May-09 0:33
Henry Minute26-May-09 0:33 
GeneralRe: Form Disposal and Null Containers Pin
Tristan Rhodes26-May-09 1:29
Tristan Rhodes26-May-09 1:29 
GeneralRe: Form Disposal and Null Containers Pin
Henry Minute26-May-09 1:34
Henry Minute26-May-09 1:34 
GeneralRe: Form Disposal and Null Containers Pin
Tristan Rhodes26-May-09 3:31
Tristan Rhodes26-May-09 3:31 
GeneralRe: Form Disposal and Null Containers Pin
Pete O'Hanlon26-May-09 4:24
mvePete O'Hanlon26-May-09 4:24 
GeneralRe: Form Disposal and Null Containers Pin
Tristan Rhodes26-May-09 23:49
Tristan Rhodes26-May-09 23:49 
Questionmultiplication of columns Pin
manjusha s26-May-09 0:01
manjusha s26-May-09 0:01 
Actually multiplication of MemberCount and Commission Should be done and result should get displayed in MemberGrandTotal when we hit Show button....and as the registration forms get filled by the customer automatically the values in MemberCount should be increased and as per that result should get displayed...Also the values in MemberCount should remain same to values in Distributor..It should not exceed the count.



My code is as below...

String s = "Data Source=.\\sqlexpress;Initial Catalog=MLM;Integrated Security=True";

SqlConnection con = new SqlConnection(s);


con.Open();

DataSet ds = new DataSet();
int Level=1;

foreach (DataRow dr in ds.Tables[Level].Rows)
{

String s1="Select MemberCount,Commission,MemberCount*Commission from LevelCount ";


}

//DataSet ds = new DataSet();

SqlCommand com = new SqlCommand(s1, con);
SqlDataReader rs = com.ExecuteReader();

while (rs.Read())
{

Label10.Text = rs.GetInt32(0).ToString();

Label9.Text = rs.GetInt32(2).ToString();



Label11.Text = rs.GetInt32(0).ToString();

Label12.Text = rs.GetInt32(0).ToString();

Label13.Text = rs.GetInt32(0).ToString();

Label14.Text = rs.GetInt32(0).ToString();

Label15.Text = rs.GetInt32(0).ToString();

Label16.Text = rs.GetInt32(2).ToString();

Label17.Text = rs.GetInt32(2).ToString();

Label18.Text = rs.GetInt32(2).ToString();

Label19.Text = rs.GetInt32(2).ToString();

Label20.Text = rs.GetInt32(2).ToString();



}



//rs[5] = s;

com.ExecuteNonQuery();



//rs.Close();

con.Close();





and table is as follows....

Level Distributors MemberCount Commission GrandTotal MemberGrandTotal

1 5 5 25
2 25 10 250
3 125 10 1250
4 625 10 6250
5 3125 10 31250
6 15625 15 234375


Show




Thanks in advance......
AnswerRe: multiplication of columns Pin
Henry Minute26-May-09 0:20
Henry Minute26-May-09 0:20 
GeneralRe: multiplication of columns Pin
manjusha s26-May-09 0:35
manjusha s26-May-09 0:35 
QuestionSql Query Pin
srinisiv25-May-09 23:05
srinisiv25-May-09 23:05 
AnswerRe: Sql Query Pin
Pete O'Hanlon25-May-09 23:46
mvePete O'Hanlon25-May-09 23:46 
GeneralRe: Sql Query Pin
srinisiv26-May-09 0:14
srinisiv26-May-09 0:14 
GeneralRe: Sql Query Pin
Pete O'Hanlon26-May-09 0:31
mvePete O'Hanlon26-May-09 0:31 
GeneralRe: Sql Query Pin
srinisiv26-May-09 0:49
srinisiv26-May-09 0:49 
QuestionInsert query Pin
manjusha s25-May-09 21:24
manjusha s25-May-09 21:24 
AnswerRe: Insert query Pin
Pete O'Hanlon25-May-09 22:00
mvePete O'Hanlon25-May-09 22:00 
QuestionHOW TO DISTINGUISE POINTS OF LINES AND CURVES ??? Pin
TARAK NATH ROY25-May-09 1:45
TARAK NATH ROY25-May-09 1:45 
AnswerRe: HOW TO DISTINGUISE POINTS OF LINES AND CURVES ??? Pin
molesworth25-May-09 22:24
molesworth25-May-09 22:24 
GeneralRe: HOW TO DISTINGUISE POINTS OF LINES AND CURVES ??? Pin
TARAK NATH ROY25-May-09 23:08
TARAK NATH ROY25-May-09 23:08 
GeneralRe: HOW TO DISTINGUISE POINTS OF LINES AND CURVES ??? Pin
molesworth25-May-09 23:22
molesworth25-May-09 23:22 
GeneralRe: HOW TO DISTINGUISE POINTS OF LINES AND CURVES ??? Pin
TARAK NATH ROY26-May-09 0:01
TARAK NATH ROY26-May-09 0:01 
GeneralRe: HOW TO DISTINGUISE POINTS OF LINES AND CURVES ??? Pin
TARAK NATH ROY26-May-09 0:03
TARAK NATH ROY26-May-09 0:03 
GeneralRe: HOW TO DISTINGUISE POINTS OF LINES AND CURVES ??? Pin
molesworth26-May-09 1:23
molesworth26-May-09 1:23 
GeneralRe: HOW TO DISTINGUISE POINTS OF LINES AND CURVES ??? Pin
TARAK NATH ROY26-May-09 2:15
TARAK NATH ROY26-May-09 2:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.