SHARE
TWEET

Untitled

a guest Oct 22nd, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. protected override void DoProcessControlEvent(object sender, LibControlEventArgs e)
  2. {
  3.     base.DoProcessControlEvent(sender, e);
  4.     if (this.IsEditMode)
  5.     {
  6.         LibEventType eventType = e.EventType;
  7.         switch (eventType)
  8.         {
  9.             case LibEventType.BeforeAddNewRow:
  10.                 this.BeforeAddNewRow(e);
  11.                 return;
  12.             default:
  13.                 return;
  14.         }
  15.     }
  16. }
  17.  
  18. private void BeforeAddNewRow(LibControlEventArgs e)
  19. {
  20.     DataRow dataRowA = base.Tables[0].Rows[0];
  21.     if (string.IsNullOrEmpty(LibSysUtils.ToString(dataRowA["FIProjectId"])))
  22.     {
  23.         LibExceptionManager.ThrowError(420019, new object[]
  24.         {
  25.             base.DataSource.GetFieldDisplayName(0, "FIProjectId")
  26.         });
  27.     }
  28.     if (StringUtils.SafeCompareStrings(LibSysUtils.ToString(dataRowA["FIYear"]), "0", true) )
  29.     {
  30.         LibExceptionManager.ThrowError(420019, new object[]
  31.         {
  32.             base.DataSource.GetFieldDisplayName(0, "FIYear")
  33.         });
  34.     }            
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top