コード例 #1
0
        public AjaxResult Material2([FromBody] dynamic Json)
        {
            Bll_TB_MATRL_MAIN tb_matrl_main = new Bll_TB_MATRL_MAIN();

            Mod_TS_USER     modUser     = GetUserID();
            Mod_TS_CUSTFILE modCustfile = ts_custfile.GetModel(modUser.C_CUST_ID);

            AjaxResult result = new AjaxResult();

            #region                          //参数
            string MatCode  = Json.MatCode;  //物料编码
            string MatName  = Json.MatName;  //物料名称
            string Stl_Grd  = Json.Stl_Grd;  //钢种
            string Spec     = Json.Spec;     //规格
            string prodKind = Json.prodKind; //大类
            string prodName = Json.prodName; //小类
            #endregion

            DataTable dt = new DataTable();
            if (prodKind.Contains("商品坯"))
            {
                dt = tb_matrl_main.GetCustStlGrd_GP(prodKind, prodName, modCustfile.C_NO, MatCode, Stl_Grd, Spec).Tables[0];
            }
            else
            {
                dt = tb_matrl_main.GetCust_StlGrd(prodKind, prodName, modCustfile.C_NO, MatCode, Stl_Grd, Spec).Tables[0];
            }
            result.Code   = DoResult.Success;
            result.Result = JsonConvert.SerializeObject(dt);
            return(result);
        }
コード例 #2
0
        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);
        }