|
|
@ -104,21 +104,21 @@ namespace ICS.CreateU9Customer |
|
|
|
// return result;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// string serialsql = @"select TOP 1 Code from CBO_Customer
|
|
|
|
// where Org='" + OrgID + "' and code < '999999' and code not like'%[a-z]%' order by Code DESC";
|
|
|
|
// serialsql = string.Format(serialsql, OrgID);
|
|
|
|
// //serialsql = string.Format(serialsql, CusList.CustomerCode, OrgID);
|
|
|
|
// DataTable serialdt = DBhlper.Query(serialsql, Appconfig.GetU9ConnStr());
|
|
|
|
// if (serialdt.Rows.Count == 0)
|
|
|
|
// {
|
|
|
|
// SerialNo = "0001";
|
|
|
|
// }
|
|
|
|
// else
|
|
|
|
// {
|
|
|
|
// //string BaseNo = serialdt.Rows[0]["Code"].ToString().Split('-')[1];
|
|
|
|
// string BaseNo = serialdt.Rows[0]["Code"].ToString();
|
|
|
|
// SerialNo = (Convert.ToInt32(BaseNo) + 1).ToString().PadLeft(4, '0');
|
|
|
|
// }
|
|
|
|
// string serialsql = @"select TOP 1 Code from CBO_Customer
|
|
|
|
// where Org='" + OrgID + "' and code < '999999' and code not like'%[a-z]%' order by Code DESC";
|
|
|
|
// serialsql = string.Format(serialsql, OrgID);
|
|
|
|
// //serialsql = string.Format(serialsql, CusList.CustomerCode, OrgID);
|
|
|
|
// DataTable serialdt = DBhlper.Query(serialsql, Appconfig.GetU9ConnStr());
|
|
|
|
// if (serialdt.Rows.Count == 0)
|
|
|
|
// {
|
|
|
|
// SerialNo = "0001";
|
|
|
|
// }
|
|
|
|
// else
|
|
|
|
// {
|
|
|
|
// //string BaseNo = serialdt.Rows[0]["Code"].ToString().Split('-')[1];
|
|
|
|
// string BaseNo = serialdt.Rows[0]["Code"].ToString();
|
|
|
|
// SerialNo = (Convert.ToInt32(BaseNo) + 1).ToString().PadLeft(4, '0');
|
|
|
|
// }
|
|
|
|
|
|
|
|
SerialNo = CusList.CustomerNo; |
|
|
|
|
|
|
@ -134,7 +134,6 @@ namespace ICS.CreateU9Customer |
|
|
|
(client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue; |
|
|
|
returnCustomers = client.Do(out returnMsg, context, customerDatas.ToArray(), custContext); |
|
|
|
|
|
|
|
|
|
|
|
StringBuilder str = new StringBuilder(); |
|
|
|
str.AppendLine("创建U9客户信息"); |
|
|
|
str.AppendLine("组织:" + CusList.OrgCode); |
|
|
@ -148,12 +147,19 @@ namespace ICS.CreateU9Customer |
|
|
|
str.AppendLine("结果:" + "True"); |
|
|
|
Appconfig.WriteLogFile(str.ToString(), "创建U9客户信息"); |
|
|
|
|
|
|
|
|
|
|
|
result.MESSAGE = "客户" + SerialNo + "创建成功"; |
|
|
|
result.IsSuccess = true; |
|
|
|
result.CustomerCode = returnCustomers[0].m_code; |
|
|
|
result.CustomerID = returnCustomers[0].m_iD; |
|
|
|
|
|
|
|
if (result.IsSuccess) |
|
|
|
{ |
|
|
|
|
|
|
|
string Updatesql = @"UPDATE CBO_Customer SET IsTaxPrice=1 WHERE Code='" + SerialNo + "' "; |
|
|
|
Updatesql = string.Format(Updatesql); |
|
|
|
DBhlper.Query(Updatesql, Appconfig.GetU9ConnStr()); |
|
|
|
} |
|
|
|
|
|
|
|
return result; |
|
|
|
} |
|
|
|
else |
|
|
@ -570,6 +576,7 @@ namespace ICS.CreateU9Customer |
|
|
|
customer.m_stateTaxNo = datas.StateTaxNo; |
|
|
|
#region 默认值
|
|
|
|
customer.m_saleType = 0; |
|
|
|
|
|
|
|
customer.m_priceListCode = datas.PriceListCode; |
|
|
|
//customer.m_priceListID = long.Parse(PriceListID);
|
|
|
|
customer.m_isPriceListModify = true; |
|
|
|