| | |
| | | } |
| | | } |
| | | |
| | | [Route("Cg_POOrderBill/list3")] |
| | | [HttpGet] |
| | | public object list3(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<string> optionList = new List<string>(); |
| | | string sql = "select top 1 * from h_v_IF_POOrderBillList where 1 = 1 "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); |
| | | if (ds != null) |
| | | { |
| | | foreach (DataColumn item in ds.Tables[0].Columns) |
| | | { |
| | | optionList.Add(@"{ field: 'hmainid', title: '"+ item.ToString() + "', sort: true, hide: false }"); |
| | | } |
| | | string option = string.Join(",",optionList); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = optionList.ToArray(); |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "初始化表格失败!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | [Route("Cg_POOrderBill/list2")] |
| | | [HttpGet] |
| | | public object list2(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<OptionListModel> optionList = new List<OptionListModel>(); |
| | | string sql = "select top 1 * from h_v_IF_POOrderBillList where 1 = 1 "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_POOrderBillList"); |
| | | if (ds != null) |
| | | { |
| | | foreach (DataColumn item in ds.Tables[0].Columns) |
| | | { |
| | | optionList.Add(new OptionListModel |
| | | { |
| | | field = item.ToString(), |
| | | title = item.ToString(), |
| | | sort = true, |
| | | hide = false, |
| | | }); |
| | | } |
| | | string option = string.Join(",", optionList); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = optionList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "初始化表格失败!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 采购订单 分配 |
| | | ///参数:string sql。 |
| | |
| | | |
| | | // |
| | | } |
| | | |
| | | } |