private void BindList() { DataTable dt = tb_matrl_main.GetList(txtName.Value, txtCode.Value, txt_GRD.Value, txtSPEC.Value, ddl_mat.SelectedItem.Value, "").Tables[0]; if (dt.Rows.Count > 0) { rptList.DataSource = dt; rptList.DataBind(); } else { rptList.DataSource = null; rptList.DataBind(); } }
public AjaxResult Material([FromBody] dynamic Json) { Bll_TB_MATRL_MAIN tb_matrl_main = new Bll_TB_MATRL_MAIN(); AjaxResult result = new AjaxResult(); #region //参数 string MatCode = Json.MatCode; //物料编码 string MatName = Json.MatName; //物料名称 string StlGrd = Json.StlGrd; //钢种 string Spec = Json.Spec; //规格 string MatClass = Json.MatClass; //分类 #endregion result.Code = DoResult.Success; result.Result = SerializationHelper.Dtb2Json(tb_matrl_main.GetList(MatName, MatCode, StlGrd, Spec, MatClass, "").Tables[0]); return(result); }