Esempio n. 1
0
        public AjaxResult CheckStdCodeRemark([FromBody] dynamic Json)
        {
            AjaxResult result = new AjaxResult();

            Bll_TQB_REMARKPRINT tmd = new Bll_TQB_REMARKPRINT();
            DataSet             ds  = new DataSet();
            string str     = Json.stdcode;
            string flaNo   = Json.flaNo;
            string grd     = Json.stlgrd;  //钢种
            string stdCode = Json.stdcode; //执行标准
            string fyd     = Json.fyd;     //发运单号
            string spec    = Json.spec;    //规格

            if (!string.IsNullOrEmpty(str))
            {
                string stdgrd = str.Trim() + "+" + grd.Trim();
                ds = tmd.GetList(" and UPPER(REPLACE(C_KEY,' ','')) = '" + stdgrd.ToUpper() + "'");
            }


            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                string strWhere = " and t.C_TYPE=1 and t.C_SPEC='" + Json.spec + "' and t.C_STL_GRD='" + Json.stlgrd
                                  + "' and t.C_STD_CODE='" + Json.stdcode + "' and t.C_DISPATCH_ID='" + Json.fyd + "' and t.C_LIC_PLA_NO='" + Json.flaNo + "'";
                var dsPatch = tmd_dispatch.GetRePrintList(strWhere);
                if (dsPatch != null && dsPatch.Tables[0].Rows.Count > 0)
                {
                    result.Code   = DoResult.Success;
                    result.Result = JsonConvert.SerializeObject(2);
                }
                else
                {
                    result.Code   = DoResult.Success;
                    result.Result = JsonConvert.SerializeObject(1);
                }
            }
            else
            {
                result.Code   = DoResult.Success;
                result.Result = JsonConvert.SerializeObject(2);
            }
            return(result);
        }
Esempio n. 2
0
        public AjaxResult GetRemarkddl([FromBody] dynamic Json)
        {
            AjaxResult          result = new AjaxResult();
            Bll_TQB_REMARKPRINT tmd    = new Bll_TQB_REMARKPRINT();
            var    strWhere            = "";
            string type = Json.type;

            if (type != "")
            {
                strWhere += " and N_TYPE=" + type;
            }
            DataTable dt = tmd.GetList(strWhere).Tables[0];

            if (dt.Rows.Count > 0)
            {
                result.Code   = DoResult.Success;
                result.Result = JsonConvert.SerializeObject(dt);
            }
            else
            {
                result.Code = DoResult.Failed;
            }
            return(result);
        }