public WardSpeciality GetByID(int _wardSpeciality) { WardSpecialityDAC _wardSpecialityComponent = new WardSpecialityDAC(); IDataReader reader = _wardSpecialityComponent.GetByIDWardSpeciality(_wardSpeciality); WardSpeciality _wardSpecialitys = null; while (reader.Read()) { _wardSpecialitys = new WardSpeciality(); if (reader["WardSpeciality"] != DBNull.Value) { _wardSpecialitys.WardSpecialityId = Convert.ToInt32(reader["WardSpeciality"]); } if (reader["WardId"] != DBNull.Value) { _wardSpecialitys.WardId = Convert.ToInt32(reader["WardId"]); } if (reader["SpecialityId"] != DBNull.Value) { _wardSpecialitys.SpecialityId = Convert.ToInt32(reader["SpecialityId"]); } if (reader["IsMainSpeciality"] != DBNull.Value) { _wardSpecialitys.IsMainSpeciality = Convert.ToBoolean(reader["IsMainSpeciality"]); } if (reader["SpecialityOrder"] != DBNull.Value) { _wardSpecialitys.SpecialityOrder = Convert.ToInt32(reader["SpecialityOrder"]); } _wardSpecialitys.NewRecord = false; } reader.Close(); return(_wardSpecialitys); }
public bool Insert(int WardId, int SpecialityId, bool IsMainSpeciality, int SpecialityOrder) { WardSpecialityDAC wardspecialityComponent = new WardSpecialityDAC(); int WardSpeciality = 0; return(wardspecialityComponent.InsertNewWardSpeciality(ref WardSpeciality, WardId, SpecialityId, IsMainSpeciality, SpecialityOrder)); }
public List <WardSpeciality> GetAll() { WardSpecialityDAC _wardSpecialityComponent = new WardSpecialityDAC(); IDataReader reader = _wardSpecialityComponent.GetAllWardSpeciality().CreateDataReader(); List <WardSpeciality> _wardSpecialityList = new List <WardSpeciality>(); while (reader.Read()) { if (_wardSpecialityList == null) { _wardSpecialityList = new List <WardSpeciality>(); } WardSpeciality _wardSpeciality = new WardSpeciality(); if (reader["WardSpecialityId"] != DBNull.Value) { _wardSpeciality.WardSpecialityId = Convert.ToInt32(reader["WardSpecialityId"]); } if (reader["WardId"] != DBNull.Value) { _wardSpeciality.WardId = Convert.ToInt32(reader["WardId"]); } if (reader["SpecialityId"] != DBNull.Value) { _wardSpeciality.SpecialityId = Convert.ToInt32(reader["SpecialityId"]); } if (reader["IsMain"] != DBNull.Value) { _wardSpeciality.IsMain = Convert.ToBoolean(reader["IsMain"]); } _wardSpeciality.NewRecord = false; _wardSpecialityList.Add(_wardSpeciality); } reader.Close(); return(_wardSpecialityList); }
public bool Insert(WardSpeciality wardspeciality) { int autonumber = 0; WardSpecialityDAC wardspecialityComponent = new WardSpecialityDAC(); bool endedSuccessfuly = wardspecialityComponent.InsertNewWardSpeciality(ref autonumber, wardspeciality.WardId, wardspeciality.SpecialityId, wardspeciality.IsMainSpeciality, wardspeciality.SpecialityOrder); if (endedSuccessfuly) { wardspeciality.WardSpecialityId = autonumber; } return(endedSuccessfuly); }
public bool Update(int WardId, int SpecialityId, bool IsMainSpeciality, int SpecialityOrder, int Original_WardSpeciality) { WardSpecialityDAC wardspecialityComponent = new WardSpecialityDAC(); return(wardspecialityComponent.UpdateWardSpeciality(WardId, SpecialityId, IsMainSpeciality, SpecialityOrder, Original_WardSpeciality)); }
public bool Update(WardSpeciality wardspeciality, int old_wardSpeciality) { WardSpecialityDAC wardspecialityComponent = new WardSpecialityDAC(); return(wardspecialityComponent.UpdateWardSpeciality(wardspeciality.WardId, wardspeciality.SpecialityId, wardspeciality.IsMainSpeciality, wardspeciality.SpecialityOrder, old_wardSpeciality)); }
public int UpdateDataset(System.Data.DataSet dataset) { WardSpecialityDAC wardspecialitycomponent = new WardSpecialityDAC(); return(wardspecialitycomponent.UpdateDataset(dataset)); }
public void Delete(int Original_WardSpeciality) { WardSpecialityDAC wardspecialityComponent = new WardSpecialityDAC(); wardspecialityComponent.DeleteWardSpeciality(Original_WardSpeciality); }
public bool Insert(ref int WardSpecialityId, int WardId, int SpecialityId, bool IsMain) { WardSpecialityDAC wardspecialityComponent = new WardSpecialityDAC(); return(wardspecialityComponent.InsertNewWardSpeciality(ref WardSpecialityId, WardId, SpecialityId, IsMain)); }