Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. #region C表
  2. if (StringUtils.SafeCompareStrings(sTableName, base.Tables[2].TableName, true))
  3. {
  4.     ILibGridControl gridControl = base.FormInstance.GetGridControl(this.Tables[1].TableName);
  5.     if (gridControl != null)
  6.     {
  7.         DataRow focusedRow = gridControl.FocusedRow;                
  8.         if (focusedRow != null)
  9.         {
  10.             Int64 parentRowCode = LibSysUtils.ToInt64(focusedRow["RowCode"]);
  11.             DataTable rowDetail = new DataView(base.Tables[2])
  12.             {
  13.                 RowFilter = string.Format("ParentRowCode={0}", parentRowCode)
  14.             }.ToTable();
  15.  
  16.             if (rowDetail.Rows.Count >= 1)
  17.             {
  18.                 AddMsg(LibMessageKind.Error, "分期資料僅允許登打一列!");
  19.             }
  20.         }
  21.     }
  22. }
  23. #endregion C表
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement