Exemplo n.º 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);
        }
Exemplo n.º 2
0
        private void GetStlGrd()
        {
            DataTable dt = new DataTable();

            if (dropType.SelectedItem.Value == "0")//线材
            {
                dt = tb_matrl_main.GetCust_StlGrd(ltlprockind.Text, ltlprocname.Text, ltlCustNo.Text, txtmatcode.Text, txtstlgrd.Text, tstspec.Text).Tables[0];
            }
            else//钢坯
            {
                dt = tb_matrl_main.GetCustStlGrd_GP(ltlprockind.Text, ltlprocname.Text, ltlCustNo.Text, txtmatcode.Text, txtstlgrd.Text, tstspec.Text).Tables[0];
            }
            if (dt.Rows.Count > 0)
            {
                rptList.DataSource = dt;
                rptList.DataBind();
            }
            else
            {
                this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "", "<script language='javascript'> _closemsg('暂无相关记录,请联系销售员维护客户协议!');</script>", false);
                //ScriptManager.RegisterStartupScript(UpdatePanel1, this.Page.GetType(), "", "alert('暂无相关记录,请联系销售员维护客户协议!')", true);
                rptList.DataSource = null;
                rptList.DataBind();
            }
        }