mhemati
یک شنبه 01 تیر 1393, 20:28 عصر
با سلام
cmd.CommandText = "SELECT fish_joz.date_variz,fish_joz.code_pigiri,fish_joz. code_s_name,fish_joz.number_fish,fish_joz.number_h esab,fish_joz.mablagh," +
"(sabt_name.name_str+' '+sabt_name.family) as fullname,sabt_name.number_ghadir,sabt_name.bolok FROM (fish_joz INNER JOIN " +
" sabt_name ON fish_joz.code_s_name = sabt_name.code_s_name)" +
" where (sabt_name.family like '%" + txt_search.Text + "%') OR (sabt_name.name_str like '%" + txt_search.Text + "%') " +
"AND (fish_joz.date_variz Between '" + txt_date1.Date.ToString() + "' AND '" + txt_date2.Date.ToString() + "') " +
"AND (sabt_name.number_ghadir >'" + com_gh_az.Text + "' AND sabt_name.number_ghadir <'" + com_gh_ta.Text + "') " +
"AND (sabt_name.bolok >'" + com_b_az.Text + "' AND sabt_name.bolok <'" + com_g_ta.Text + "')" +
["AND (fish_joz.mablagh >'" + txt_mb1.Text + "' AND fish_joz.mablagh <'" + txt_mb2.Text + "')"
;
این کد درست عمل نمی کنه آیا استفاده از این روش کار اصولیه است ؟
cmd.CommandText = "SELECT fish_joz.date_variz,fish_joz.code_pigiri,fish_joz. code_s_name,fish_joz.number_fish,fish_joz.number_h esab,fish_joz.mablagh," +
"(sabt_name.name_str+' '+sabt_name.family) as fullname,sabt_name.number_ghadir,sabt_name.bolok FROM (fish_joz INNER JOIN " +
" sabt_name ON fish_joz.code_s_name = sabt_name.code_s_name)" +
" where (sabt_name.family like '%" + txt_search.Text + "%') OR (sabt_name.name_str like '%" + txt_search.Text + "%') " +
"AND (fish_joz.date_variz Between '" + txt_date1.Date.ToString() + "' AND '" + txt_date2.Date.ToString() + "') " +
"AND (sabt_name.number_ghadir >'" + com_gh_az.Text + "' AND sabt_name.number_ghadir <'" + com_gh_ta.Text + "') " +
"AND (sabt_name.bolok >'" + com_b_az.Text + "' AND sabt_name.bolok <'" + com_g_ta.Text + "')" +
["AND (fish_joz.mablagh >'" + txt_mb1.Text + "' AND fish_joz.mablagh <'" + txt_mb2.Text + "')"
;
این کد درست عمل نمی کنه آیا استفاده از این روش کار اصولیه است ؟