リビジョン 188
入金確認(入金登録で掲示板に登録)
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/FrmEntryDeposit.cs | ||
---|---|---|
783 | 783 |
else |
784 | 784 |
{ |
785 | 785 |
// 掲示板登録 |
786 |
MessageBoardEntry(); |
|
786 |
MessageBoardEntry(depositData);
|
|
787 | 787 |
} |
788 | 788 |
} |
789 | 789 |
// 更新処理 |
... | ... | |
838 | 838 |
/// 入金情報掲示板データ登録 |
839 | 839 |
/// </summary> |
840 | 840 |
/// <returns></returns> |
841 |
private bool MessageBoardEntry() |
|
841 |
private bool MessageBoardEntry(DepositData deposit)
|
|
842 | 842 |
{ |
843 | 843 |
IOMessageBoardData mbdDB = new IOMessageBoardData(); |
844 | 844 |
IOMessageBoardTerget mbtDB = new IOMessageBoardTerget(); |
... | ... | |
895 | 895 |
|
896 | 896 |
string strMBT = mbtDB.CreatePrimarykeyString(data.RecordNumber, data.BranchNumber); |
897 | 897 |
mbtDB.DeleteAction(strMBT, false); |
898 |
// 対象者書込み |
|
899 |
int icnt = 0; |
|
900 | 898 |
|
901 | 899 |
List<MessageBoardTerget> terList = new List<MessageBoardTerget>(); |
902 |
MessageBoardTerget wrkTer = new MessageBoardTerget(); |
|
903 | 900 |
|
904 |
// キーコードセット |
|
905 |
wrkTer.RecordNumber = data.RecordNumber; |
|
906 |
wrkTer.BranchNumber = data.BranchNumber; |
|
907 |
wrkTer.SeqNum = ++icnt; |
|
908 |
wrkTer.ToCode = 99999999; |
|
909 |
wrkTer.ToName = "全 員"; |
|
901 |
// 工事番号・営業担当者・工事担当者取得 |
|
902 |
IOConstructionBaseInfoDetail cbiDDB = new IOConstructionBaseInfoDetail(); |
|
903 |
try |
|
904 |
{ |
|
905 |
cbiDDB.connect();; |
|
910 | 906 |
|
911 |
terList.Add(wrkTer); |
|
907 |
string strSQL = "SELECT A.ConstructionCode, B.PERSONCODE SCODE, B.PERSONNAME SNAME, C.PERSONCODE CCODE, C.PERSONNAME CNAME"; |
|
908 |
strSQL += " FROM CONSTRUCTIONBASEINFO P"; |
|
909 |
strSQL += " INNER JOIN REQUESTHEAD H ON H.REQCONSTRUCTIONCODE = P.CONSTRUCTIONCODE"; |
|
910 |
strSQL += string.Format(" AND H.ORDERERSDIVISION = {0}", deposit.OrderersDivision); |
|
911 |
strSQL += string.Format(" AND H.ORDERERSCODE = {0}", deposit.OrderersCode); |
|
912 |
strSQL += string.Format(" AND H.REQUESTMONTH = {0}", deposit.TargetDate); |
|
913 |
strSQL += " LEFT JOIN PERSONINCHARGEMASTER B ON B.PERSONCODE = P.SALESPERSONCODE"; |
|
914 |
strSQL += " LEFT JOIN PERSONINCHARGEMASTER C ON C.PERSONCODE = P.CONSTRUCTIONPERSONCODE"; |
|
915 |
strSQL += " , CONSTRUCTIONBASEINFODETAIL A"; |
|
916 |
strSQL += " WHERE P.CONSTRUCTIONCODE = H.REQCONSTRUCTIONCODE"; |
|
917 |
strSQL += string.Format(" AND A.CONSTRUCTIONCODE = P.CONSTRUCTIONCODE AND A.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName); |
|
918 |
ArrayList arList = new ArrayList(); |
|
919 |
if (!cbiDDB.ExecuteReader(strSQL, ref arList)) return false; |
|
912 | 920 |
|
921 |
string ConstructionCode = string.Empty; |
|
922 |
int SalesPersonCode = 0; |
|
923 |
string SalesPersonName = string.Empty; |
|
924 |
int ConstructionPersonCode = 0; |
|
925 |
string ConstructionPersonName = string.Empty; |
|
926 |
int icnt = 0; // 対象者書込み |
|
927 |
MessageBoardTerget wrkTer = null; |
|
928 |
foreach (object[] onjwrk in arList) |
|
929 |
{ |
|
930 |
ConstructionCode = CommonMotions.cnvString(onjwrk[0]); |
|
931 |
SalesPersonCode = CommonMotions.cnvInt(onjwrk[1]); |
|
932 |
SalesPersonName = CommonMotions.cnvString(onjwrk[2]); |
|
933 |
ConstructionPersonCode = CommonMotions.cnvInt(onjwrk[3]); |
|
934 |
ConstructionPersonName = CommonMotions.cnvString(onjwrk[4]); |
|
935 |
|
|
936 |
// 営業担当は掲示板データを作成しない |
|
937 |
// キーコードセット |
|
938 |
//wrkTer = new MessageBoardTerget(); |
|
939 |
//wrkTer.RecordNumber = data.RecordNumber; |
|
940 |
//wrkTer.BranchNumber = data.BranchNumber; |
|
941 |
//wrkTer.SeqNum = ++icnt; |
|
942 |
//wrkTer.ToCode = SalesPersonCode; |
|
943 |
//wrkTer.ToName = SalesPersonName; |
|
944 |
//terList.Add(wrkTer); |
|
945 |
|
|
946 |
// 工事担当 |
|
947 |
// キーコードセット |
|
948 |
wrkTer = new MessageBoardTerget(); |
|
949 |
wrkTer.RecordNumber = data.RecordNumber; |
|
950 |
wrkTer.BranchNumber = data.BranchNumber; |
|
951 |
wrkTer.SeqNum = ++icnt; |
|
952 |
wrkTer.ToCode = ConstructionPersonCode; |
|
953 |
wrkTer.ToName = ConstructionPersonName; |
|
954 |
terList.Add(wrkTer); |
|
955 |
} |
|
956 |
} |
|
957 |
finally |
|
958 |
{ |
|
959 |
cbiDDB.close(); cbiDDB = null; |
|
960 |
} |
|
961 |
|
|
913 | 962 |
// データ登録 |
914 | 963 |
if (!mbtDB.InsertAction(terList, false)) |
915 | 964 |
{ |
他の形式にエクスポート: Unified diff