}//end linq server mode /// <summary> /// derive filter from selected row and apply to cargo update editor - find by selected order id /// rebuild session with selected filter /// redirect to orders search page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void dxgrdquerylog_RowCommand(object sender, ASPxGridViewRowCommandEventArgs e) { try { Int32 _idx = e.VisibleIndex; //string[] _fields = {"qry_text","qry_desc"}; string _orderid = this.dxgrdquerylog.GetRowValues(_idx, "orderid").ToString(); if (!string.IsNullOrEmpty(_orderid)) { SessionParameterPasser _sessionWrapper = new SessionParameterPasser("~/Ord_Edit_Cargo.aspx"); _sessionWrapper["query"] = "orderid==" + _orderid; _sessionWrapper["name"] = "query_order_id"; _sessionWrapper["mode"] = "0"; _sessionWrapper.PassParameters(); //force submit of query and set mode to 0 (history) //this does not work! //Page.ClientScript.RegisterStartupScript(GetType(), "QRY_MOD", "window.submit_query(0);", true); //Response.Redirect("~/Default.aspx",false); } } catch (Exception ex) { Response.Write(ex.Message.ToString()); } }
}//end linq server mode /// <summary> /// derive filter from selected row and apply to orders view /// rebuild session with selected filter /// redirect to orders search page /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void dxgrdquerylog_RowCommand(object sender, ASPxGridViewRowCommandEventArgs e) { try { Int32 _idx = e.VisibleIndex; //string[] _fields = {"qry_text","qry_desc"}; string _fex = this.dxgrdquerylog.GetRowValues(_idx, "qry_text").ToString(); string _fname = this.dxgrdquerylog.GetRowValues(_idx, "qry_desc").ToString(); string _fsource = this.dxgrdquerylog.GetRowValues(_idx, "qry_source").ToString(); string _default = "shipment";//default to shipment tracking string _url = "../tracking/{0}_tracking.aspx"; _url = _fsource != "" ? string.Format(_url, _fsource): string.Format(_url, _default); //old code we are using form names instead of codes in qry_source as of 20/03/15 //if (_fsource == "CNTR") { // _url = "../tracking/container_tracking.aspx"; //} //else if(_fsource == "DLVRY"){ // _url = "../tracking/delivery_tracking.aspx"; //} //else if(_fsource == "NSHIP"){ // _url = "../tracking/not_shipped_tracking.aspx"; //} if (!string.IsNullOrEmpty(_fex)) { SessionParameterPasser _sessionWrapper = new SessionParameterPasser(_url); _sessionWrapper["query"] = _fex; _sessionWrapper["name"] = _fname; _sessionWrapper["mode"] = "0"; _sessionWrapper["source"] = _fsource; _sessionWrapper.PassParameters(); //force submit of query and set mode to 0 (history) //this does not work! //Page.ClientScript.RegisterStartupScript(GetType(), "QRY_MOD", "window.submit_query(0);", true); //Response.Redirect("~/Default.aspx",false); } } catch (Exception ex) { Response.Write(ex.Message.ToString()); } }