public string PostChangeStandardProcess(int?id) { string msg = ""; var res = new PRS_BD_StandardProcessService().PostChangeStandardProcess(id, out msg); return(msg); }
public dynamic Get(RequestWrapper query) { query.LoadSettingXmlString(@" <settings defaultOrderBy='ID'> <select>*</select> <from>PRS_BD_StandardProcess</from> <where defaultForAll='true' defaultCp='equal' defaultIgnoreEmpty='true'> <field name='ProcessCode' cp='like'></field> <field name='ProcessName' cp='like'></field> </where> </settings>"); var service = new PRS_BD_StandardProcessService(); var pQuery = query.ToParamQuery(); var result = service.GetDynamicListWithPaging(pQuery.AndWhere("IsEnable", 1)); return(result); }
public void Edit(dynamic data) { var listWrapper = RequestWrapper.Instance().LoadSettingXmlString(@" <settings> <table> PRS_BD_StandardProcess </table> <where> <field name='ID' cp='equal'></field> </where> </settings>"); var service = new PRS_BD_StandardProcessService(); if (data.list.inserted.ToString() != "[]") { string code = new PRS_BD_StandardProcessService().GetMaxCode(); //var fno = dno.Substring(0, 9); //var con = dno.Substring(9, 3); foreach (JToken row in data["list"]["inserted"].Children()) { row["ProcessCode"] = code; int intCon = Convert.ToInt32(code); intCon++; code = intCon < 10 ? "00" + intCon.ToString() : intCon < 100 ? "0" + intCon.ToString() : intCon.ToString(); } var result = service.Edit(null, listWrapper, data); } else { service.Edit(null, listWrapper, data); } //var result = service.Edit(null, listWrapper, data); }