| | |
| | | |
| | | //更新个性分配客户集长度大于0时 |
| | | string key2 = "UPDATE GW_PRODUCT SET CLIENT_IDS=:CLIENT_ID || ',' || CLIENT_IDS WHERE (CLIENT_IDS IS NOT NULL AND LENGTH(CLIENT_IDS) > 0) AND ID=:PRODUCT_ID "; |
| | | |
| | | list = new List<KeyValuePair<string, OracleParameter[]>>(); |
| | | foreach (string str in productIdArray) |
| | | { |
| | | OracleParameter[] oracleParameterArray2 = new OracleParameter[2] |
| | |
| | | new OracleParameter(":PRODUCT_ID", (object) str) |
| | | }; |
| | | |
| | | list = new List<KeyValuePair<string, OracleParameter[]>>(); |
| | | list.Add(new KeyValuePair<string, OracleParameter[]>(key2, oracleParameterArray2)); |
| | | } |
| | | OracleHelper.ExecuteSqlTran(list, OracleHelper.Connection); |
| | |
| | | |
| | | //更新个性分配客户集长度为0时 |
| | | string key3 = "UPDATE GW_PRODUCT SET CLIENT_IDS=:CLIENT_ID WHERE (CLIENT_IDS IS NULL OR LENGTH(CLIENT_IDS) <= 0) AND ID=:PRODUCT_ID "; |
| | | |
| | | list = new List<KeyValuePair<string, OracleParameter[]>>(); |
| | | foreach (string str in productIdArray) |
| | | { |
| | | OracleParameter[] oracleParameterArray2 = new OracleParameter[2] |
| | |
| | | new OracleParameter(":CLIENT_ID", (object) clientId), |
| | | new OracleParameter(":PRODUCT_ID", (object) str) |
| | | }; |
| | | |
| | | list = new List<KeyValuePair<string, OracleParameter[]>>(); |
| | | |
| | | list.Add(new KeyValuePair<string, OracleParameter[]>(key3, oracleParameterArray2)); |
| | | } |
| | | OracleHelper.ExecuteSqlTran(list, OracleHelper.Connection); |
| | |
| | | //修改分配个性产品:修改确认 |
| | | $(document).on("click", ".action-updateProduct", function () { |
| | | var productIdArray = []; |
| | | mytek.confirm("是否需要修改客户分配个性产品?", "确认分配个性产品,请谨慎操作!", function (b) { |
| | | if (b) { |
| | | $("#updateProductDialog #_ProductId").each(function () { |
| | | if ($(this).is(":checked")) { |
| | | productIdArray.push($(this).val()); |
| | | } |
| | | }); |
| | | //mytek.confirm("是否需要修改客户分配个性产品?", "确认分配个性产品,请谨慎操作!", function (b) { |
| | | //if (b) { |
| | | if (confirm("是否需要修改客户分配个性产品?") == true) { |
| | | $("#updateProductDialog #_ProductId").each(function () { |
| | | if ($(this).is(":checked")) { |
| | | productIdArray.push($(this).val()); |
| | | } |
| | | }); |
| | | |
| | | //var clientId = $("#updateProductDialog").data("id"); |
| | | var clientId = $("#updateProductDialog input[name='clientID']").val(); |
| | | $.ajax({ |
| | | url: "GwClient.ashx", |
| | | type: "POST", |
| | | data: { action: "updateProduct", clientId: clientId, productIdArray: $.toJSON(productIdArray) }, |
| | | success: function (result) { |
| | | if (result.OK) { |
| | | $("#updateProductDialog").modal("hide"); |
| | | loadPageList(); |
| | | } else { |
| | | mytek.alert(result.Message, result.OK); |
| | | } |
| | | //var clientId = $("#updateProductDialog").data("id"); |
| | | var clientId = $("#updateProductDialog input[name='clientID']").val(); |
| | | $.ajax({ |
| | | url: "GwClient.ashx", |
| | | type: "POST", |
| | | data: { action: "updateProduct", clientId: clientId, productIdArray: $.toJSON(productIdArray) }, |
| | | success: function (result) { |
| | | if (result.OK) { |
| | | $("#updateProductDialog").modal("hide"); |
| | | loadPageList(); |
| | | } else { |
| | | mytek.alert(result.Message, result.OK); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | //swal.close(); |
| | | } |
| | | }); |
| | | //swal.close(); |
| | | //} |
| | | //}); |
| | | } |
| | | }); |
| | | |
| | | |
| | |
| | | gwClient = gwClientDao.Get(gwSp.ClientID); |
| | | this.GwOrder.Company = gwClient.Company; |
| | | this.GwOrder.Balance = long.Parse(gwClient.Balance.ToString()); //余额 |
| | | |
| | | /** |
| | | if (gwClient.Is_Enable==1) |
| | | { |
| | | backUrl = "GwClient.aspx?IsEnable=1"; |
| | |
| | | else |
| | | { |
| | | backUrl = "GwClient.aspx?IsEnable=0"; |
| | | } |
| | | }**/ |
| | | } |
| | | |
| | | this.GwOrder.SpId = gwSp.SpID; |
| | |
| | | </div> |
| | | <div class="input-group m-b"> |
| | | <input type="button" value="查询" class="btn btn-primary action-query" /> |
| | | <% if (!string.IsNullOrEmpty(backUrl)) |
| | | { %> |
| | | <a class="btn btn-default action-back" href="javascript:;" onclick="return window.location = '<%=backUrl %>'">返回</a> |
| | | <% } %> |
| | | </div> |
| | | </div> |
| | | <div class="table-responsive"> |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(this.AppContext.GetString("clientId"))) |
| | | { |
| | | backUrl = "GwClient.aspx"; |
| | | GwClient gwClient = new GwClient(); |
| | | using (GwClientDao gwClientDao = new GwClientDao()) |
| | | { |
| | | gwClient = gwClientDao.Get(this.AppContext.GetString("clientId") ); |
| | | |
| | | if (gwClient.Is_Enable == 1) |
| | | { |
| | | backUrl = "GwClient.aspx?IsEnable=1"; |
| | | } |
| | | else |
| | | { |
| | | backUrl = "GwClient.aspx?IsEnable=0"; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return this.AppContext.GetString("clientId"); |