Ejemplo n.º 1
0
        //get all data in mst_Concern table using USP_MST_SELECTCONCERN-SP
        /// <summary>
        /// To Get Mode Of Payment
        /// </summary>
        /// <param name="TypeOfPayment"></param>
        /// <returns></returns>
        public PaymentList GetModeOfPayment(string TypeOfPayment)
        {
            OracleConnection cnn = new OracleConnection(con);
            OracleCommand    cmd;

            string proc = "USP_MST_GET_MODEOFPAYMENT";

            cmd             = new OracleCommand(proc, cnn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("TypeOfPayment_", TypeOfPayment);
            cmd.Parameters.Add("Sp_recordset", Oracle.DataAccess.Client.OracleDbType.RefCursor).Direction = ParameterDirection.Output;

            cmd.Connection.Open();
            OracleDataReader dr           = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            PaymentBO        objPaymentBO = null;
            PaymentList      oPaymentList = new PaymentList();

            while (dr.Read())
            {
                objPaymentBO = new PaymentBO();

                objPaymentBO = MapData(dr);

                oPaymentList.Add(objPaymentBO);
            }

            dr.Close();

            return(oPaymentList);
        }
Ejemplo n.º 2
0
 // addPayment METHOD
 public bool addPayment(Payment p)  // It calls verify() method first, and if verify is successful it adds the payment to the bill payments.
 {
     if (p.verify() == true)
     {
         PaymentList.Add(p);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 internal static PaymentList getPaymentsList(HttpResponseMessage responce)
 {
     var paymentList = new PaymentList();
     var jsonObj =
         JsonConvert.DeserializeObject<Dictionary<string, object>>(responce.Content.ReadAsStringAsync().Result);
     if (jsonObj.ContainsKey("payments"))
     {
         var paymentsArray = JsonConvert.DeserializeObject<List<object>>(jsonObj["payments"].ToString());
         foreach (var paymentObj in paymentsArray)
         {
             var payment = new Payment();
             payment = JsonConvert.DeserializeObject<Payment>(paymentObj.ToString());
             paymentList.Add(payment);
         }
     }
     return paymentList;
 }
Ejemplo n.º 4
0
        public void LoadPayments()
        {
            try
            {
                PaymentList.Clear();

                string task = "loadPayments";

                client = new TcpClient();
                client.Connect(ep);

                NetworkStream ns = client.GetStream();
                StreamWriter  sw = new StreamWriter(ns);
                sw.WriteLine(task);
                sw.Flush();

                byte[] data  = new byte[50000];
                int    bytes = ns.Read(data, 0, data.Length);
                ObservableCollection <ClassesLibaryBilling.Payment> pl = new ObservableCollection <ClassesLibaryBilling.Payment>();
                pl = FromByteArray <ObservableCollection <ClassesLibaryBilling.Payment> >(data);


                foreach (var item in pl)
                {
                    PaymentList.Add(item);
                }

                sw.Close();
                ns.Close();
                client.Close();
            }
            catch (Exception)
            {
                MessageBox.Show("Сервер выключен либо отсутствует соидинение с интеренетом");
            }
        }
Ejemplo n.º 5
0
 internal static PaymentList getPaymentList(HttpResponseMessage responce)
 {
     var paymentList = new PaymentList();
     var jsonObj = JsonConvert.DeserializeObject<Dictionary<string, object>>(responce.Content.ReadAsStringAsync().Result);
     if (jsonObj.ContainsKey("payments"))
     {
         var paymentsArray = JsonConvert.DeserializeObject<List<object>>(jsonObj["payments"].ToString());
         foreach(var paymentObj in paymentsArray)
         {
             var payment = new Payment();
             payment = JsonConvert.DeserializeObject<Payment>(paymentObj.ToString());
             paymentList.Add(payment);
         }
     }
     return paymentList;
 }
Ejemplo n.º 6
0
 public void AddPayment(Payment payment)
 {
     PaymentList.Add(payment);
 }