/// <summary> /// On Double Click /// </summary> /// <param name="e">EventArgs</param> protected virtual void OnDoubleClick(MedicationEventArgs e) { if (this.DoubleClick != null) { this.DoubleClick(this, e); } }
/// <summary> /// Raises a postback event when the MedicationLine is clicked. /// </summary> /// <param name="eventArgument">The event arguments passed from the client. </param> public void RaisePostBackEvent(string eventArgument) { if (eventArgument != null) { MedicationEventArgs args = MedicationEventArgs.Unknown; string[] clientArg = eventArgument.Split(new char[] { ',' }, 2); if (clientArg.Length > 1) { Medication med = this.FindMedication(clientArg[1]); args = new MedicationEventArgs(med); } if (clientArg[0].Equals("1", StringComparison.Ordinal)) { this.OnDoubleClick(args); } if (clientArg[0].Equals("0", StringComparison.Ordinal)) { this.OnClick(args); } } }