예제 #1
0
        public AddBook()
        {
            InitializeComponent();
            String judul, penulis, penerbit, terbit, PPN, DIS, POK;
            Double harga, ppn, diskon, pokok;

            judul    = Tjudul.Text;
            penulis  = Tpenulis.Text;
            penerbit = Tpenerbit.Text;
            terbit   = Tterbit.Text;
            PPN      = Tppn.Text;
            DIS      = Tdiskon.Text;
            POK      = Tpokok.Text;
            ppn      = 0;
            diskon   = 0;
            pokok    = 0;
            if (!PPN.Equals(""))
            {
                ppn = double.Parse(PPN);
            }
            if (!DIS.Equals(""))
            {
                diskon = double.Parse(DIS);
            }
            if (!POK.Equals(""))
            {
                pokok = double.Parse(POK);
            }
        }
예제 #2
0
        /// <summary>
        /// Returns a single repetition of Authentication Person, Time Stamp(TXA-22). throws HL7Exception
        /// if the repetition number is invalid.
        /// </summary>
        ///
        /// <exception cref="Exception">    Thrown when an exception error condition occurs. </exception>
        ///
        /// <param name="rep">  The repetition number (this is a repeating field) </param>
        ///
        /// <returns>   The authentication person time stamp. </returns>

        public PPN GetAuthenticationPersonTimeStamp(int rep)
        {
            PPN ret = null;

            try
            {
                IType t = this.GetField(22, rep);
                ret = (PPN)t;
            } catch (System.Exception ex) {
                HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value.  This is a bug.", ex);
                throw new System.Exception("An unexpected error ocurred", ex);
            }
            return(ret);
        }
예제 #3
0
        /// <summary> Returns a single repetition of Authentication Person, Time Stamp (TXA-22).</summary>
        /// <param name="rep">the repetition number (this is a repeating field)
        /// </param>
        /// <throws>  HL7Exception if the repetition number is invalid. </throws>
        public virtual PPN getAuthenticationPersonTimeStamp(int rep)
        {
            PPN ret = null;

            try
            {
                Type t = this.getField(22, rep);
                ret = (PPN)t;
            }
            catch (System.InvalidCastException)
            {
                throw new Exception();
            }
            return(ret);
        }
예제 #4
0
        /// <summary> Returns all repetitions of Authentication Person, Time Stamp (TXA-22). </summary>
        ///
        /// <exception cref="Exception">  Thrown when an exception error condition occurs. </exception>
        ///
        /// <returns> An array of ppn. </returns>

        public PPN[] GetAuthenticationPersonTimeStamp()
        {
            PPN[] ret = null;
            try {
                IType[] t = this.GetField(22);
                ret = new PPN[t.Length];
                for (int i = 0; i < ret.Length; i++)
                {
                    ret[i] = (PPN)t[i];
                }
            } catch (HL7Exception he) {
                HapiLogFactory.GetHapiLog(this.GetType()).Error("Unexpected problem obtaining field value.  This is a bug.", he);
                throw new System.Exception("An unexpected error ocurred", he);
            } catch (System.Exception cce) {
                HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value.  This is a bug.", cce);
                throw new System.Exception("An unexpected error ocurred", cce);
            }
            return(ret);
        }
예제 #5
0
 /// <summary> Returns all repetitions of Authentication Person, Time Stamp (TXA-22).</summary>
 public virtual PPN[] getAuthenticationPersonTimeStamp()
 {
     PPN[] ret = null;
     try
     {
         Type[] t = this.getField(22);
         ret = new PPN[t.Length];
         for (int i = 0; i < ret.Length; i++)
         {
             ret[i] = (PPN)t[i];
         }
     }
     catch (System.InvalidCastException)
     {
         throw new Exception();
     }
     catch (NuGenHL7Exception)
     {
         throw new Exception();
     }
     return(ret);
 }