コード例 #1
0
 internal string  SavePaymentInformation(Models.PaymentInfo aPaymentInfo)
 {
     if (aPaymentInfo.PaymentAmount == "")
     {
         throw new Exception("Need payment First then save....!!!!");
     }
     if (Convert.ToDouble(aPaymentInfo.PaymentAmount) > 0)
     {
         return(aPaymentGetaway.SavePaymentInformation(aPaymentInfo));
     }
     throw new Exception("Need payment First then save....!!!!");
 }
コード例 #2
0
        internal string SavePaymentInformation(Models.PaymentInfo aPaymentInfo)
        {
            string Query     = @"INSERT INTO [Payment]
           ([PatientID],[PayAmount])
     VALUES
           ('" + aPaymentInfo.ID + "','" + aPaymentInfo.PaymentAmount.Replace("'", "") + "')";
            int    rowEffect = DataTransfection.ExecuteNonQuery(Query);

            if (rowEffect > 0)
            {
                return("Record is/are Saved Sucessfully....!!");
            }
            else
            {
                throw new Exception("Record Save Failed....!!! ");
            }
        }