リビジョン 197
請求まとめ(新規テータは行番号を振り直して登録)
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestSummaryList/FrmRequestSummaryList.cs | ||
---|---|---|
2422 | 2422 |
} |
2423 | 2423 |
} |
2424 | 2424 |
|
2425 |
#region ??????????f?[?^???s????? |
|
2425 | 2426 |
/// <summary> |
2427 |
/// ??????????f?[?^????s??????????? |
|
2428 |
/// </summary> |
|
2429 |
/// <param name="AddSQLString"></param> |
|
2430 |
/// <param name="bConnect"></param> |
|
2431 |
/// <returns></returns> |
|
2432 |
public int SelectMaxLineNo(IOBillingDataDetail IoBdD, string AddSQLString, bool bConnect = true) |
|
2433 |
{ |
|
2434 |
// ?C???^?[?t?F?[?X |
|
2435 |
StringBuilder strcmd = new StringBuilder(); |
|
2436 |
ArrayList arData = new ArrayList(); |
|
2437 |
int iRet = 0; |
|
2438 |
try |
|
2439 |
{ |
|
2440 |
// SQL?? |
|
2441 |
strcmd.AppendFormat("SELECT IFNULL(MAX(LineCount), 0) FROM BillingDataDetail {0}", AddSQLString); |
|
2442 |
|
|
2443 |
// SQL???s |
|
2444 |
if (!IoBdD.ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return iRet; |
|
2445 |
|
|
2446 |
// ?f?[?^?Z?b?g |
|
2447 |
foreach (object[] objwrk in arData) |
|
2448 |
{ |
|
2449 |
if (objwrk[0].ToString().Equals("null")) |
|
2450 |
iRet = 0; |
|
2451 |
else |
|
2452 |
iRet = int.Parse(objwrk[0].ToString()); |
|
2453 |
} |
|
2454 |
|
|
2455 |
} |
|
2456 |
catch (Exception ex) |
|
2457 |
{ |
|
2458 |
logger.ErrorFormat("?V?X?e???G???[?F{0}?F{1}?F{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString()); |
|
2459 |
} |
|
2460 |
return iRet; |
|
2461 |
} |
|
2462 |
#endregion |
|
2463 |
|
|
2464 |
/// <summary> |
|
2426 | 2465 |
/// ?f?[?^?o?^ |
2427 | 2466 |
/// </summary> |
2428 | 2467 |
private bool DataEntry() |
... | ... | |
2449 | 2488 |
PaymentApprovalInfo PaIWork; |
2450 | 2489 |
BillingPaymentSummary BpsWork = new BillingPaymentSummary(); |
2451 | 2490 |
|
2452 |
int iCompanyCode = 0, iSeqNo = 0, iLineCount = 0; |
|
2491 |
int iCompanyCode = 0, iSeqNo = 0, iLineCount = 0, iLineMax = 0;
|
|
2453 | 2492 |
int iTantoShoninCount = 0; |
2454 | 2493 |
bool bBdData = false; |
2455 | 2494 |
bool bDeleteData = false; |
... | ... | |
2636 | 2675 |
iCompanyCode = 0; |
2637 | 2676 |
iSeqNo = 0; |
2638 | 2677 |
iLineCount = 0; |
2678 |
iLineMax = 0; |
|
2639 | 2679 |
|
2640 | 2680 |
foreach (DataGridViewRow r in Rows) |
2641 | 2681 |
{ |
2642 | 2682 |
// ??????s?????????? |
2643 |
if (CommonMotions.cnvInt(r.Cells[m_Genba_Column].Value) == 0 &&
|
|
2644 |
CommonMotions.cnvInt(r.Cells[(int)DispColumn.SomuSeikyu].Value) == 0 &&
|
|
2683 |
//if (CommonMotions.cnvInt(r.Cells[m_Genba_Column].Value) == 0 && // ?H?????????f?[?^???????????H????????????????
|
|
2684 |
if (CommonMotions.cnvInt(r.Cells[(int)DispColumn.SomuSeikyu].Value) == 0 &&
|
|
2645 | 2685 |
CommonMotions.cnvInt(r.Cells[(int)DispColumn.SomuKosoku].Value) == 0 && |
2646 | 2686 |
CommonMotions.cnvInt(r.Cells[(int)DispColumn.SomuKanamono].Value) == 0 && |
2647 | 2687 |
CommonMotions.cnvInt(r.Cells[(int)DispColumn.SomuSannhaiZei].Value) == 0 && |
... | ... | |
2698 | 2738 |
// ?V?K?i????????f?[?^?j |
2699 | 2739 |
if (BdList.Count == 0) |
2700 | 2740 |
{ |
2741 |
iLineMax = 0; // ?V?K????0???? |
|
2701 | 2742 |
BdWork.CompanyCode = CommonMotions.cnvInt(r.Cells[m_Company_Column].Value); |
2702 | 2743 |
BdWork.TargetDate = TargetDate; |
2703 | 2744 |
BdWork.SeqNo = CommonMotions.cnvInt(r.Cells[(int)DispColumn.GroupSeqNo].Value); |
... | ... | |
2713 | 2754 |
} |
2714 | 2755 |
else |
2715 | 2756 |
{ |
2757 |
// ?s?????????? |
|
2758 |
StringBuilder MaxLineNoSql = new StringBuilder(); |
|
2759 |
MaxLineNoSql.AppendFormat(" where COMPANYCODE = {0}", CommonMotions.cnvInt(r.Cells[m_Company_Column].Value)); |
|
2760 |
MaxLineNoSql.AppendFormat(" and TARGETDATE = {0}", TargetDate); |
|
2761 |
iLineMax = SelectMaxLineNo(IoBdD, MaxLineNoSql.ToString(), false); |
|
2716 | 2762 |
bBdData = true; |
2717 | 2763 |
BdWork.BillPrice = BdList[0].BillPrice; |
2718 | 2764 |
} |
... | ... | |
2739 | 2785 |
|
2740 | 2786 |
// ??????????f?[?^-------------------------------------------------------------- |
2741 | 2787 |
iLineCount = CommonMotions.cnvInt(r.Cells[(int)DispColumn.LineCount].Value); |
2788 |
|
|
2789 |
// ?V?K?o?^???????????f?[?^??s?????0??????s????????? |
|
2790 |
if (iLineCount == 0) |
|
2791 |
{ |
|
2792 |
r.Cells[(int)DispColumn.LineCount].Value = ++iLineMax; |
|
2793 |
iLineCount = iLineMax; |
|
2794 |
} |
|
2795 |
|
|
2742 | 2796 |
strBdDWhere = IoBdD.CreatePrimarykeyString(CommonMotions.cnvInt(r.Cells[m_Company_Column].Value), TargetDate, CommonMotions.cnvInt(r.Cells[(int)DispColumn.GroupSeqNo].Value), iLineCount); |
2743 | 2797 |
BdDList = new List<BillingDataDetail>(); |
2744 | 2798 |
|
他の形式にエクスポート: Unified diff