SqlConnection conn = new SqlConnection(ConnectionString); SqlCommand command = new SqlCommand(); String S4 = " select Period.Per,Account.Acc,GL.Deb,GL.Cre from Period,Account,GL where GL.Period=Period.Per and Account.AccLink=GL.AccLink and Month(Per) = '" + combo_Month.SelectedItem.ToString().Trim() + "' and Year(PerDate) ='" + combo_Year.SelectedItem.ToString().Trim() + "'"; SqlDataAdapter da4 = new SqlDataAdapter(S4, ConnectionString); da4.Fill(a, "Dt_Tb_2"); String S6 = "select Period.Per from Period where Month(Date) = '" + combo_Month.SelectedItem.ToString().Trim() + "' and Year(Date) ='" + combo_Year.SelectedItem.ToString().Trim() + "'"; SqlDataAdapter da6 = new SqlDataAdapter(S6, ConnectionString); DataTable dt = new DataTable(); da6.Fill(dt); String S5 = "select Period.Date,Account.Acc,SUM(GL.Deb),SUM(GL.Cred) from Period,Account,GL where GL.Period=Period.Per and Account.AccLink=PostGL.AccLink and Per<='" + dt.Rows[0].ItemArray[0] + "' group by Period.Date,Account.Account"; SqlDataAdapter da5 = new SqlDataAdapter(S5, ConnectionString); da5.Fill(a, "Dt_Tb_3"); frmTBViwer tb = new frmTBViwer(this); tb.Show();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)