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); }
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); }
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); }
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(); }