Esempio n. 1
0
        public static void SearchPrescList(SearchPresc presc)
        {
            string pQuery = string.Format(@"SELECT PRE_ID AS NO,
(select name from PET where id=PRESCRIPTION_LIST.PET_ID) as PET,
ORDER_DATE AS ISSUEDATE
FROM PRESCRIPTION_LIST
WHERE PET_ID IN (select PET.ID  from PET join customer on PET.OWNER_ID=customer.ID where
owner_id in (select id from customer where lower(first_name||last_name) LIKE lower('%{0}%')))", presc.CusName);

            cmdString = new OracleCommand(pQuery, cntString);

            try
            {
                cntString.Open();
                OracleDataAdapter da = new OracleDataAdapter(cmdString);
                DataTable         dt = new DataTable();

                DataSet ds = new DataSet();
                da.Fill(dt);
                ds.Tables.Add(dt);
                presc.PrescTable = ds.Tables[0];
            }

            finally
            {
                cntString.Close();
            }
        }
Esempio n. 2
0
        public void PrescListView()
        {
            cname = cusNameInput.Text;
            SearchPresc presc = new SearchPresc(cname, plisttable);

            try
            {
                ConnectionClass.SearchPrescList(presc);
                PrescListTable.DataSource = presc.PrescTable;
                PrescListTable.DataBind();
            }

            catch
            {
                ClientScript.RegisterStartupScript(GetType(), "message", "<script>alert(' Error! ');</script>");
            }

            finally
            {
            }
        }