Example #1
0
        public Telephone viewtbill(Customer customer)
        {
            conString = ConfigurationManager.ConnectionStrings["paymatecontext"].ConnectionString;
            SqlConnection con = new SqlConnection(conString);


            SqlCommand cmd = new SqlCommand("select * from phonebill where dcusid='" + customer.CusId + "'", con);

            con.Open();
            SqlDataReader rdr       = cmd.ExecuteReader();
            Telephone     telephone = new Telephone();

            if (rdr.Read())
            {
                telephone.tnumber    = Convert.ToInt64(rdr[2]);
                telephone.billamount = Convert.ToInt64(rdr[3]);
            }

            con.Close();
            return(telephone);
        }
Example #2
0
        public Telephone pbill(Customer customer)
        {
            Telephone telephone = new Telephone();

            return(telephone.viewtbill(customer));
        }