29-05-17, 09:38 PM
(آخر تعديل لهذه المشاركة : 29-05-17, 09:41 PM {2} بواسطة Amir_Alzubidy.
تعديل السبب: تعديل العنوان
)
بسم الله الرحمن الرحيم
السلام عليكم ياشباب
رسالة الخطأ دى ظهرتلى
وده الكود الى فيه الخطأ
السلام عليكم ياشباب
رسالة الخطأ دى ظهرتلى
وده الكود الى فيه الخطأ
كود :
//=================================================================================
private void tooL_SAVE_Click(object sender, EventArgs e)
{
string typ_
= "BILL_1.TYP=100";
if (check_PURSHASE.Checked == true)
{
typ_ = typ_ + " " + "or BILL_1.TYP=11";
}
if (check_RETURN_PURSHASE.Checked == true)
{
typ_ = typ_ + " " + "or BILL_1.TYP=12";
}
if (check_SALE.Checked == true)
{
typ_ = typ_ + " " + "or BILL_1.TYP=13";
}
if (check_RETURNE_SALE.Checked == true)
{
typ_ = typ_ + " " + "or BILL_1.TYP=14";
}
if (check_POS1.Checked == true)
{
typ_ = typ_ + " " + "or BILL_1.typ=15";
}
if (check_BEGIN_ITEME.Checked == true)
{
typ_ = typ_ + " " + "or BILL_1.typ=16";
}
if (txt_.Text == "0")
{
if (TXT_NAME_ACCOUNT.Text == "")
{
MessageBox.Show("يجب ادخال اسم الحساب", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
}
//REP.REP_ACCOUNT.Frm_print_allbill allday = new REP.REP_ACCOUNT.Frm_rep_allday();
REP.REP_ITEME.Frm_print_allbill allday
= new REP.REP_ITEME.Frm_print_allbill();
DateTime d1
= Convert.ToDateTime(DTP1.Value.ToShortDateString());
DateTime d2
= Convert.ToDateTime(DTP2.Value.ToShortDateString());
string str;
DataTable dt = new DataTable();
dt.Clear();
if (TXT_NAME_ACCOUNT.Text == "")
{
str = "SELECT dbo.BILL_1.ID_BILL AS الرقم , dbo.BILL_1.DATE_BILL AS التاريخ, dbo.name_type.name AS النوع, dbo.currency.name_currency AS العملة, dbo.account.Name AS [الطرف الثاني], dbo.BILL_1.NOTE AS ملاحظات, dbo.BILL_1.TSDID AS التسديد, account_1.Name AS الصندوق, dbo.BILL_1.VAL_CASH AS [مبلغ الدفعة], dbo.BILL_1.HSM AS الحسم, dbo.BILL_1.TOTAL AS الاجمالي FROM dbo.BILL_1 INNER JOIN dbo.name_type ON dbo.BILL_1.TYP = dbo.name_type.id INNER JOIN dbo.account ON dbo.BILL_1.CUSTOMER = dbo.account.id INNER JOIN dbo.account AS account_1 ON dbo.BILL_1.CASH = account_1.id INNER JOIN dbo.currency ON dbo.BILL_1.CURRENCY_BILL = dbo.currency.id_currency WHERE (dbo.BILL_1.TRHILE = 1) and (" + typ_ + ") and (BILL_1.DATE_BILL BETWEEN ('" + d1.Month + "/" + d1.Day + "/" + d1.Year + "') AND ('" + d2.Month + "/" + d2.Day + "/" + d2.Year + "')) order by BILL_1.ID";
allday.TXT_NAME_ACCOUNT.Visible = false;
allday.LBL_ACCOUNT.Visible = false;
}
else
{
str = "SELECT dbo.BILL_1.ID_BILL AS الرقم ,dbo.BILL_1.DATE_BILL AS التاريخ, dbo.name_type.name AS النوع, dbo.currency.name_currency AS العملة, dbo.account.Name AS [الطرف الثاني], dbo.BILL_1.NOTE AS ملاحظات, dbo.BILL_1.TSDID AS التسدسد, account_1.Name AS الصندةق, dbo.BILL_1.VAL_CASH AS [مبلغ دفعة], dbo.BILL_1.HSM AS الحسم, dbo.BILL_1.TOTAL AS الاجمالي FROM dbo.BILL_1 INNER JOIN dbo.name_type ON dbo.BILL_1.TYP = dbo.name_type.id INNER JOIN dbo.account ON dbo.BILL_1.CUSTOMER = dbo.account.id INNER JOIN dbo.account AS account_1 ON dbo.BILL_1.CASH = account_1.id INNER JOIN dbo.currency ON dbo.BILL_1.CURRENCY_BILL = dbo.currency.id_currency WHERE (dbo.BILL_1.TRHILE = 1) and (" + typ_ + ") and (BILL_1.CUSTOMER =" + Convert.ToInt32(TXT_ID_ACCOUNT.Text) + ") AND (BILL_1.DATE_BILL BETWEEN ('" + d1.Month + "/" + d1.Day + "/" + d1.Year + "') AND ('" + d2.Month + "/" + d2.Day + "/" + d2.Year + "')) order by BILL_1.ID";
}
//textBox1.Text = str;
SqlDataAdapter adp = new SqlDataAdapter(str, con);
adp.Fill(dt);
if (dt.Rows.Count == 0)
{
MessageBox.Show("لايوجد حركة ضمن هذه الفترة", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
allday.DGV.DataSource = dt;
يارب اذا اعطيتني علما...اعطني معه حكمه...واذا اعطيتني مالا....اعطيني معها كرما...واذا اعطيتني قوه...اعطني معها رحمه...واذا اعطيتني سلطه...اعطني معها عدلا...واذا اعطيتني مسئوليه...اعطيني معها امانه...واذا اعطيتني نجاحا...اعطني معها تواضعا...اللهم امين