NasimBamdad
پنج شنبه 16 آذر 1391, 17:34 عصر
لطفا این عکس رو ببینید
لیــــــــــــنــــــــــ ـــــــک (http://www.pcmupload.com/di-P8PC.jpg)
یکسری CheckBox دارم که در هر سری کاربر یکی یا شاید 2 تا ، کلا معلوم نیست ، یا این CheckBox ها کار می کنه و گزارش می سازه
هر سری از این CheckBox ها هم یکسری کد خواهند داشت مثل زیر
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_bime_surgeon_surg ery.mrt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox1.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox4.SelectedValue);
stiReport1.Dictionary.Variables["V8"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Show();
حالا من باید پیش بینی کنم این 4 تا CheckBox که در هر سری باید و الزام هست که در هر انتخاب و ساخت گزارش ، حتما و حتما و حتما CheckBox3 چک خورده باشه ، چند حالت خواهند داشت .
بعد گزارش مربوط رو براش بسازم !
NasimBamdad
شنبه 18 آذر 1391, 10:56 صبح
if (checkBox1.Checked && checkBox3.Checked && !checkBox2.Checked && !checkBox4.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_bime_surgeon.mrt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox1.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Show();
}
else if (checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && !checkBox4.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_bime_surgeon_takm ili.mrt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox1.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox2.SelectedValue);
stiReport1.Dictionary.Variables["V8"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Show();
}
else if (checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_bime_surgeon_takm ili_surgery.mrt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox1.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox2.SelectedValue);
stiReport1.Dictionary.Variables["V8"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Dictionary.Variables["V9"].Value = Convert.ToString(comboBox4.SelectedValue);
stiReport1.Show();
}
else if (checkBox3.Checked && !checkBox1.Checked && !checkBox2.Checked && !checkBox4.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_surgeon.mrt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Show();
}
else if (checkBox3.Checked && checkBox4.Checked && !checkBox1.Checked && !checkBox2.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_surgeon_surgery.m rt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox4.SelectedValue);
stiReport1.Show();
}
else if (checkBox1.Checked && checkBox3.Checked && checkBox4.Checked && !checkBox2.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_bime_surgeon_surg ery.mrt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox1.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox4.SelectedValue);
stiReport1.Dictionary.Variables["V8"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Show();
}
//////////
else if (!checkBox1.Checked && !checkBox4.Checked && checkBox2.Checked && checkBox3.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_takmili_surgeon.m rt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox2.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox3.SelectedValue);
}
else if (checkBox2.Checked && checkBox3.Checked && checkBox4.Checked && !checkBox1.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_takmili_surgeon_s urgery.mrt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox2.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Dictionary.Variables["V8"].Value = Convert.ToString(comboBox4.SelectedValue);
}
من کد ها رو به این صورت تغییر دادم . همه IF ها اجرا می شوند به جز 2 Else if آخر . یعنی این 2 تا
else if (!checkBox1.Checked && !checkBox4.Checked && checkBox2.Checked && checkBox3.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_takmili_surgeon.m rt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox2.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox3.SelectedValue);
}
else if (checkBox2.Checked && checkBox3.Checked && checkBox4.Checked && !checkBox1.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc = new System.Globalization.PersianCalendar();
DateTime dtz = Convert.ToDateTime((pc.ToDateTime(year, mon, day, 0, 0, 0, 0).ToString().Substring(0, 10)));
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
System.Globalization.PersianCalendar pc2 = new System.Globalization.PersianCalendar();
DateTime dtz2 = Convert.ToDateTime((pc2.ToDateTime(year2, mon2, day2, 0, 0, 0, 0).ToString().Substring(0, 10)));
stiReport1.Load("Reports\\surgery_list_spec_daily_takmili_surgeon_s urgery.mrt");
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox2.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Dictionary.Variables["V8"].Value = Convert.ToString(comboBox4.SelectedValue);
}
چه باید کرد ؟
NasimBamdad
دوشنبه 20 آذر 1391, 11:12 صبح
چون شرط هات به چند چک باکس وابسته است نمیشه فقط با حلقه این کار رو انجام داد چون در حلقه در هر بار تکرار فقط یک چک باکس بررسی میشه.
کدهای تکراری رو از داخل if ها خارج کنید. متد show مربوط به گزارش را هم به آخر ببرید. و یک سوال اینکه چرا تاریخ را هم شمسی و هم میلادیش رو ذخیره میکنی؟!!
if (checkBox3.Checked)
{
int day = Convert.ToInt32(txtProNet1.VDate.Substring(8, 2));
int mon = Convert.ToInt32(txtProNet1.VDate.Substring(5, 2));
int year = Convert.ToInt32(txtProNet1.VDate.Substring(0, 4));
DateTime dtz = new DateTime(year, mon, day , new PersianCalendar());
int day2 = Convert.ToInt32(txtProNet2.VDate.Substring(8, 2));
int mon2 = Convert.ToInt32(txtProNet2.VDate.Substring(5, 2));
int year2 = Convert.ToInt32(txtProNet2.VDate.Substring(0, 4));
DateTime dtz2 = new DateTime(year2, mon2, day2,new PersianCalendar());
stiReport1.Dictionary.Variables["V1"].Value = Convert.ToString(dtz);
stiReport1.Dictionary.Variables["V2"].Value = Convert.ToString(dtz2);
stiReport1.Dictionary.Variables["V3"].Value = txtProNet1.VDate;
stiReport1.Dictionary.Variables["V4"].Value = txtProNet2.VDate;
stiReport1.Dictionary.Variables["V5"].Value = comboBox3.Text;
if (checkBox1.Checked && !checkBox2.Checked && !checkBox4.Checked)
{
stiReport1.Load("Reports\\surgery_list_spec_daily_bime_surgeon.mrt");
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox1.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox3.SelectedValue);
}
else if (checkBox1.Checked && checkBox2.Checked && !checkBox4.Checked)
{
stiReport1.Load("Reports\\surgery_list_spec_daily_bime_surgeon_takm ili.mrt");
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox1.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox2.SelectedValue);
stiReport1.Dictionary.Variables["V8"].Value = Convert.ToString(comboBox3.SelectedValue);
}
else if (checkBox1.Checked && checkBox2.Checked && checkBox4.Checked)
{
stiReport1.Load("Reports\\surgery_list_spec_daily_bime_surgeon_takm ili_surgery.mrt");
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox1.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox2.SelectedValue);
stiReport1.Dictionary.Variables["V8"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Dictionary.Variables["V9"].Value = Convert.ToString(comboBox4.SelectedValue);
}
else if (!checkBox1.Checked && !checkBox2.Checked && !checkBox4.Checked)
{
stiReport1.Load("Reports\\surgery_list_spec_daily_surgeon.mrt");
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox3.SelectedValue);
}
else if (!checkBox1.Checked && !checkBox2.Checked && checkBox4.Checked)
{
stiReport1.Load("Reports\\surgery_list_spec_daily_surgeon_surgery.m rt");
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox4.SelectedValue);
}
else if (checkBox1.Checked && !checkBox2.Checked && checkBox4.Checked)
{
stiReport1.Load("Reports\\surgery_list_spec_daily_bime_surgeon_surg ery.mrt");
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox1.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox4.SelectedValue);
stiReport1.Dictionary.Variables["V8"].Value = Convert.ToString(comboBox3.SelectedValue);
}
else if (!checkBox1.Checked && checkBox2.Checked && !checkBox4.Checked)
{
stiReport1.Load("Reports\\surgery_list_spec_daily_takmili_surgeon.m rt");
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox2.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox3.SelectedValue);
}
else if (!checkBox1.Checked && checkBox2.Checked && checkBox4.Checked)
{
stiReport1.Load("Reports\\surgery_list_spec_daily_takmili_surgeon_s urgery.mrt");
stiReport1.Dictionary.Variables["V6"].Value = Convert.ToString(comboBox2.SelectedValue);
stiReport1.Dictionary.Variables["V7"].Value = Convert.ToString(comboBox3.SelectedValue);
stiReport1.Dictionary.Variables["V8"].Value = Convert.ToString(comboBox4.SelectedValue);
}
stiReport1.Show();
مرسی دوست عزیز . میرم که چک کنم کد ها رو . ممنون که زمان گذاشتید .
تاریخ رو من به صورت شمسی و میلادی در دیتابیس دارم . برای نمایش به کاربر شمسی رو نشون میدم و برای کار کردن و گزارش گیری میلادی .
یادم میاد در ورژن های قدیمی StimulReport تاریخ شمسی رو نمی گرفت .
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.