protected void DdlReceiptDeptBind() { DdlReceiptDept.DataSource = Lib.DBHelper.createDDLView("select dept_id,company||' '||dept_desc dept_desc from jp_receipt_dept t where state='1' order by NLSSORT(dept_desc,'NLS_SORT = SCHINESE_PINYIN_M')"); DdlReceiptDept.DataTextField = "dept_desc"; DdlReceiptDept.DataValueField = "dept_id"; DdlReceiptDept.DataBind(); }
protected void DdlReceiptDeptBind() { DdlReceiptDept.DataSource = DBHelper.createDDLView("select dept_id,company||' '||dept_desc dept_desc from jp_receipt_dept t where state='1'"); DdlReceiptDept.DataTextField = "dept_desc"; DdlReceiptDept.DataValueField = "dept_id"; DdlReceiptDept.DataBind(); }
private void DdlReceiptDeptDataBind(Boolean _date, Boolean _place, Boolean _person) { StringBuilder sql = new StringBuilder(); sql.Append("select distinct receipt_dept,jp_receipt_dept_api.get_name(receipt_dept) dept_name from jp_requisition where rowstate='released'and nvl(jjd_qty,0)<release_qty"); if (_date) { sql.Append(string.Format(" and receive_date = to_date('{0}','yyyy-mm-dd')", TxtRecieveDate.Text)); } if (_place) { sql.Append(string.Format(" and place='{0}'", DdlReceiptPlace.SelectedValue)); } if (_person) { sql.Append(string.Format(" and receiver='{0}'", DdlReceiptPerson.SelectedValue)); } DdlReceiptDept.DataSource = DBHelper.createDDLView(sql.ToString()); DdlReceiptDept.DataTextField = "dept_name"; DdlReceiptDept.DataValueField = "receipt_dept"; DdlReceiptDept.DataBind(); }