Example #1
0
        public void Edit(dynamic data)
        {
            //dynamic insert_list = data.list.inserted;
            //if (data.list.inserted.ToString() != "[]")
            //{
            //    var mate_list = new PRS_Process_BOMService().GetModelList();
            //    foreach (dynamic item in data.list.inserted)
            //    {
            //        string PartCode = item["PartCode"];
            //        var mate_where_list = mate_list.Where(p => p.PartCode == PartCode && !string.IsNullOrWhiteSpace(p.MaterialCode) && (p.MaterialCode.StartsWith("锻") || p.MaterialCode.StartsWith("Z") || p.MaterialCode.StartsWith("z")));
            //        if (mate_where_list.Count() > 0)
            //        {
            //            item["Type"] = "012401";
            //            item["TypeName"] = "铸件配套";
            //        }
            //    }
            //}

            var listWrapper = RequestWrapper.Instance().LoadSettingXmlString(@"
    <settings>
        <table>
            MES_BN_MatchingTableDetail
        </table>
        <where>
            <field name='ID' cp='equal'></field>
        </where>
    </settings>");
            var service     = new MES_BN_MatchingTableDetailService();
            var result      = service.Edit(null, listWrapper, data);
        }
Example #2
0
        public string PostSetType(dynamic data)
        {
            string msg = "";
            string ids = data["ids"].ToString();

            ids = ids.Remove(ids.Length - 2, 1);
            var result = new MES_BN_MatchingTableDetailService().SetType(ids, data["type"].ToString(), data["typeName"].ToString(), out msg);

            return(msg);
        }
Example #3
0
        public dynamic Get(RequestWrapper query)
        {
            query.LoadSettingXmlString(@"
    <settings defaultOrderBy='ID'>
        <select>*</select>
        <from>V_MES_BN_MatchingTableDetail</from>
        <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true'>
<field name='ContractCode'       cp='equal'></field>
<field name='ProjectDetailID'        cp='equal'></field>
<field name='Type'       cp='equal'></field>
<field name='ProductType'        cp='equal'></field>
        </where>
    </settings>");
            var service = new MES_BN_MatchingTableDetailService();
            var pQuery  = query.ToParamQuery();
            var result  = service.GetDynamicListWithPaging(pQuery);

            return(result);
        }