Esempio n. 1
0
        public Bill Get(int nID, int nUserID)
        {
            Connection.Open();
            Command.CommandText = BillDA.Get(nID, nUserID);

            SqlDataReader reader = Command.ExecuteReader();
            Bill          _oBill = new Bill();

            if (reader.HasRows)
            {
                _oBill = MakeObject(reader);
            }
            reader.Close();
            Connection.Close();
            return(_oBill);
        }
Esempio n. 2
0
        public string Delete(Bill oBill, int nUserID)
        {
            string sReturnMessage = "";

            Connection.Open();
            Command.CommandText = BillDA.IUD(oBill, EnumDBOperation.Delete, nUserID);
            try
            {
                Command.ExecuteNonQuery();
            }
            catch (Exception e)
            {
                sReturnMessage = e.Message.Split('~')[0];
            }
            Connection.Close();
            return(sReturnMessage);
        }
Esempio n. 3
0
        public List <Bill> Gets(string sSQL, int nBUID, int nBill)
        {
            Connection.Open();
            Command.CommandText = BillDA.Gets(sSQL, nBUID, nBill);

            SqlDataReader reader  = Command.ExecuteReader();
            Bill          _oBill  = new Bill();
            List <Bill>   _oBills = new List <Bill>();

            if (reader.HasRows)
            {
                _oBills = MakeObjects(reader);
            }
            reader.Close();
            Connection.Close();
            return(_oBills);
        }
Esempio n. 4
0
        public Bill IUD(Bill oBill, int nUserID)
        {
            Connection.Open();
            if (oBill.BillID == 0)
            {
                Command.CommandText = BillDA.IUD(oBill, EnumDBOperation.Insert, nUserID);
            }
            else
            {
                Command.CommandText = BillDA.IUD(oBill, EnumDBOperation.Update, nUserID);
            }
            SqlDataReader reader = Command.ExecuteReader();
            Bill          _oBill = new Bill();

            if (reader.HasRows)
            {
                _oBill = MakeObject(reader);
            }
            reader.Close();
            Connection.Close();
            return(_oBill);
        }
 public ReceptionistBL()
 {
     DL    = new ReceptionistDA();
     bilDL = new BillDA();
     patDL = new PatientDA();
 }
 public PatientBL()
 {
     DL    = new PatientDA();
     BilDL = new BillDA();
 }
 public BillBL()
 {
     DL = new BillDA();
 }