Code Tips
8014 단어 code
(1).소수점 2 자리 소수점 보존
decimal.Parse(weight).ToString("F2")
(2).String.Format
string.Format("{0:000.000}", 12.2)
012.200
string.Format("{0:D3}", 2)
002
문자
설명
예제
출력
C
화폐.
string.Format("{0:C3}", 2)
$2.000
D
십진법
string.Format("{0:D3}", 2)
002
E
과학 계수법
string.Format("{0:E}", 250000);
2.500000E+005
F
Fixed-point
string.Format("{0:F2}", 25); string.Format("{0:F0}", 25);
25.00 25
G
일반
string.Format("{0:G}", 2.5);
2.5
N
세미콜론
string.Format("{0:N}", 2500000);
2,500,000.00
X
16진법
string.Format("{0:X}", 250);
FA
string.Format("{0:000.000}", 12.2)
012.200
2. RosettaNet에서 Partner 구성 정보 얻기
using Microsoft.Solutions.BTARN.Shared;
1: private string m_Classification = "";
2: private string m_ContactName = "";
3: private string m_EmailAddress = "";
4: private string m_FaxNumber = "";
5: private string m_GbiNumber = "";
6: private string m_SupplyChainCode = "";
7: private string m_TelephoneNumber = "";
8:
9: private Microsoft.Solutions.BTARN.Shared.PartyInfo m_partyInfo;
10: public PartnerInfo():this("Intel")
11: {
12: }
13:
14: public PartnerInfo(string partnerName)
15: {
16: m_partyInfo = new PartyInfo(partnerName);
17:
18: m_Classification=m_partyInfo.GetAliasValue(PartnerPropertyFields.Classification);
19: m_ContactName=m_partyInfo.GetAliasValue(PartnerPropertyFields.ContactName);
20: m_EmailAddress=m_partyInfo.GetAliasValue(PartnerPropertyFields.EmailAddress);
21: m_FaxNumber=m_partyInfo.GetAliasValue(PartnerPropertyFields.FaxNumber);
22: m_GbiNumber=m_partyInfo.GetAliasValue(PartnerPropertyFields.GbiNumber);
23: m_SupplyChainCode = m_partyInfo.GetAliasValue(PartnerPropertyFields.SupplyChainCode);
24: m_TelephoneNumber=m_partyInfo.GetAliasValue(PartnerPropertyFields.TelephoneNumber);
25: }
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
3. SQL 제거 탭
set @PlantCode=ltrim(rtrim(replace(@PlantCode,char(9),'')))
4. SQL XML 쿼리
with TmpTable
as
(
select convert(xml,a.ServiceContent) as ServiceContent,b.ExternOrderKey from PIPsOutHandling a,MessageOutHandling b where a.PIPInstanceID collate SQL_Latin1_General_CP1_CI_AS =b.PIPInstanceID and a.PIPInstanceID collate SQL_Latin1_General_CP1_CI_AS in (select PIPsInstancesID from EventLog where PIPCode='3B12' and datediff(d,CreateTime,getdate())=1 and Status<>100) --order by ExternOrderKey asc
)
select ExternOrderKey,ServiceContent.value(N'(/Pip3B12ShippingOrderConfirmation/ShippingOrder/OrderConfirmation/GlobalShippingOrderStatusCode/text())[1]','nvarchar(max)') as [Confirm],
ServiceContent.value(N'(/Pip3B12ShippingOrderConfirmation/ShippingOrder/OrderConfirmation/GlobalShippingOrderStatusReasonCode/text())[1]','nvarchar(max)') AS [ReasonCode]
FROM TmpTable order by ExternOrderKey asc
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
소스 코드가 포함된 Python 프로젝트텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.