SqlConnection sqlcon = new SqlConnection(global::Sandoghe.Properties.Settings .Default.sandogh_isarConnectionString);
SqlCommand command = new SqlCommand("select_sandogheBank")
{
Connection = sqlcon,
CommandType = CommandType.StoredProcedure
};
SqlCommand command2 = new SqlCommand("select_TraconesheBank")
{
Connection = sqlcon,
CommandType = CommandType.StoredProcedure
};
command2.Parameters.AddWithValue("@datevariz1", saiedTime.saiedConvert.ToGeorgianDate(mskAzTarikh. Text.Trim()));
command2.Parameters.AddWithValue("@datevariz2", saiedTime.saiedConvert.ToGeorgianDate(mskTaTarikh. Text.Trim()));
SqlDataAdapter da = new SqlDataAdapter(command);
SqlDataAdapter da2 = new SqlDataAdapter(command2);
DataSet dds = new DataSet();
dds.Tables.Add("sandogheBank");
dds.Tables.Add("TraconesheBank");
try
{
da.Fill(dds.Tables["sandogheBank"]);
da2.Fill(dds.Tables["TraconesheBank"]);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
frmReport fr = new frmReport();
fr.BanKtraconesh1.DataSourceConnections.Clear();
fr.BanKtraconesh1.DataSourceConnections[0].SetConnection(global::Sandoghe.Properties.Setting s.Default.sandogh_isarConnectionString, "", false);
fr.BanKtraconesh1.SetDataSource(dds);
fr.crystalReportViewer1.ReportSource = fr.BanKtraconesh1;
fr.ShowDialog();