改進後的篩選函式

2021-04-13 13:21:39 字數 1477 閱讀 5936

private void queryindent_click(object sender, eventargs e)

if (gs != "")

if (!nullflag)

gs = "and company ='" + gs + "'";

else

if (khbh != "")

if (!nullflag)

khbh = "and khbh like '%" + khbh + "%'";

else

if (cpbh != "")

if (!nullflag)

cpbh = "and cx like '%" + cpbh + "%'";

else

if (state != "")

if (!nullflag)

state = "and state like '%" + state + "%'";

else

if (ggtzd != "")

if (!nullflag)

ggtzd = "and ggd like '%" + ggtzd + "%'";

else

if (jly != "")

if (!nullflag)

jly = "and zdy like '%" + jly + "%'";

else

if (stringkdrqfrom!="")

if (!nullflag)

stringkdrqfrom = "and zdrq >'" + stringkdrqfrom + "'";

else

if (stringkdrqto!="")

if (!nullflag)

stringkdrqto = "and zdrq < '" + stringkdrqto + "'";

else

if (stringjhrqfrom!="")

if (!nullflag)

stringjhrqfrom = "and chrq > '" + stringjhrqto + "'";

else

if (stringjhrqto!="")

if (!nullflag)

stringjhrqto = "and chrq < '" + stringjhrqto + "'";

else

string sql = "select ddbh,company,zdrq,khbh,dhdw,cx,sl,chrq,state,**,zdy,ggd from dhzzd where " + ddbh + gs + khbh + cpbh + state + ggtzd + jly + stringkdrqfrom + stringkdrqto + stringjhrqfrom + stringjhrqto;

bindsearchresult(sql);

setcolumns();}}

}

改進後的線條細化演算法

原來每次遍歷都是一整張圖,現在每次都記錄下需要操作的起始位置,下一次直接遍歷起始位置就可以了。原來的演算法執行100次的時間為3.901秒 改進後的時間為0.148秒 如下 1 四周細化演算法 2void refinenew mat image,int num 318 用於存放每一列需要處理影象的高...

SQLServer查詢篩選後的結果集

select row number over order by d.businessdate as 序號 接單日期 d.businessdate,合同號 d.docno,色號 d.proname,客戶 d.cusname,流水號 d.docno,料品 d.iteminfo itemname,工序 a...

傳統「鍋包肉」與改進後的「鍋包肉」。

鍋包肉是東北的溜肉段衍生出來的一道菜,只不過現在是肉片,外麵包著用土豆做的澱粉,放在油裡炸,所以又叫 鍋爆肉 外脆 酸甜,裡面的肉嫩。豬里脊肉300克 薑絲5克 蔥絲20克 香菜10克 精鹽 料酒 醬油 白糖 醋 味精 鮮湯 水澱粉 色拉油各適量。1.豬里脊肉改刀成7厘公尺長 5厘公尺寬 0.2厘公...