Пример #1
0
        public AjaxResult SalesEmp([FromBody] dynamic Json)
        {
            #region                  //参数
            string Name = Json.Name; //姓名
            string Code = Json.Code; //编码
            #endregion

            #region //数据操作
            AjaxResult result = new AjaxResult();
            result.Code   = DoResult.Success;
            result.Result = SerializationHelper.Dtb2Json(ts_user.GetSales(Name, Code).Tables[0]);
            #endregion

            return(result);
        }
Пример #2
0
        private void GetSales()
        {
            DataTable dt = ts_user.GetSales(txtName.Text, txtCode.Text).Tables[0];

            if (dt.Rows.Count > 0)
            {
                rptList.DataSource = dt;
                rptList.DataBind();
            }
            else
            {
                rptList.DataSource = null;
                rptList.DataBind();
            }
        }