public YellowstonePathology.Business.ApplicationVersion GetApplicationVersion(object writer) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "Select * from tblApplicationVersion"; cmd.CommandType = CommandType.Text; GenericDocumentBuilder builder = new GenericDocumentBuilder(cmd, typeof(YellowstonePathology.Business.ApplicationVersion)); YellowstonePathology.Business.ApplicationVersion result = (YellowstonePathology.Business.ApplicationVersion)builder.BuildNew(); return(result); }
public void PullPhysician(YellowstonePathology.Business.Domain.Physician physician, object writer) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select * From tblPhysician where PhysicianId = @PhysicianId"; cmd.CommandType = CommandType.Text; cmd.Parameters.Add("@PhysicianId", SqlDbType.Int).Value = physician.PhysicianId; GenericDocumentBuilder builder = new GenericDocumentBuilder(cmd, typeof(YellowstonePathology.Business.Domain.Physician)); DocumentId documentId = new DocumentId(physician, writer); Document document = this.m_Stack.Pull(documentId, builder); }
public void PullTypingShortcut(YellowstonePathology.Business.Typing.TypingShortcut typingShortcut, object writer) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select * From tblTypingShortcut where ObjectId = @ObjectId"; cmd.CommandType = CommandType.Text; cmd.Parameters.Add("@ObjectId", SqlDbType.VarChar).Value = typingShortcut.ObjectId; GenericDocumentBuilder builder = new GenericDocumentBuilder(cmd, typeof(YellowstonePathology.Business.Typing.TypingShortcut)); DocumentId documentId = new DocumentId(typingShortcut, writer); Document document = this.m_Stack.Pull(documentId, builder); }
public void PullMaterialTrackingBatch(YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingBatch materialTrackingBatch, object writer) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "Select * from tblMaterialTrackingBatch where MaterialTrackingBatchId = @MaterialTrackingBatchId"; cmd.CommandType = CommandType.Text; cmd.Parameters.Add("@MaterialTrackingBatchId", SqlDbType.VarChar).Value = materialTrackingBatch.MaterialTrackingBatchId; GenericDocumentBuilder builder = new GenericDocumentBuilder(cmd, typeof(YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingBatch)); DocumentId documentId = new DocumentId(materialTrackingBatch, writer); Document document = this.m_Stack.Pull(documentId, builder); }
public YellowstonePathology.Business.Domain.OrderCommentLog PullOrderCommentLog(string orderCommentLogId, object writer) { lock (locker) { MySqlCommand cmd = new MySqlCommand(); cmd.CommandText = "SELECT * from tblOrderCommentLog where OrderCommentLogId = @OrderCommentLogId;"; cmd.CommandType = CommandType.Text; cmd.Parameters.AddWithValue("@OrderCommentLogId", orderCommentLogId); GenericDocumentBuilder builder = new GenericDocumentBuilder(cmd, typeof(YellowstonePathology.Business.Domain.OrderCommentLog)); DocumentId documentId = new DocumentId(typeof(YellowstonePathology.Business.Domain.OrderCommentLog), writer, orderCommentLogId); Document document = this.m_Stack.Pull(documentId, builder); return((YellowstonePathology.Business.Domain.OrderCommentLog)document.Value); } }
public YellowstonePathology.Business.Facility.Model.Facility PullFacility(string facilityId, object writer) { lock (locker) { MySqlCommand cmd = new MySqlCommand(); cmd.CommandText = "Select * from tblFacility f where f.FacilityId = @FacilityId;"; cmd.CommandType = CommandType.Text; cmd.Parameters.AddWithValue("@FacilityId", facilityId); GenericDocumentBuilder builder = new GenericDocumentBuilder(cmd, typeof(YellowstonePathology.Business.Facility.Model.Facility)); DocumentId documentId = new DocumentId(typeof(YellowstonePathology.Business.Facility.Model.Facility), writer, facilityId); Document document = this.m_Stack.Pull(documentId, builder); return((YellowstonePathology.Business.Facility.Model.Facility)document.Value); } }
public YellowstonePathology.Business.User.UserPreference PullUserPreference(object writer) { string hostName = Environment.MachineName; SqlCommand cmd = new SqlCommand("Select * from tblUserPreference where HostName = @HostName"); cmd.CommandType = System.Data.CommandType.Text; cmd.Parameters.Add("@HostName", System.Data.SqlDbType.VarChar).Value = hostName; GenericDocumentBuilder builder = new GenericDocumentBuilder(cmd, typeof(YellowstonePathology.Business.User.UserPreference)); DocumentId documentId = new DocumentId(typeof(YellowstonePathology.Business.User.UserPreference), writer, hostName); documentId.IsGlobal = true; Document document = this.m_Stack.Pull(documentId, builder); return((YellowstonePathology.Business.User.UserPreference)document.Value); }
public YellowstonePathology.Business.User.UserPreference PullUserPreference(string hostName, object writer) { lock (locker) { MySqlCommand cmd = new MySqlCommand("Select * from tblUserPreference where tblUserPreference.HostName = @HostName;"); cmd.CommandType = System.Data.CommandType.Text; cmd.Parameters.AddWithValue("@HostName", hostName); GenericDocumentBuilder builder = new GenericDocumentBuilder(cmd, typeof(YellowstonePathology.Business.User.UserPreference)); DocumentId documentId = new DocumentId(typeof(YellowstonePathology.Business.User.UserPreference), writer, hostName); documentId.IsGlobal = true; Document document = this.m_Stack.Pull(documentId, builder); return((YellowstonePathology.Business.User.UserPreference)document.Value); } }
public YellowstonePathology.Business.User.UserPreference PullUserPreference(object writer) { lock (locker) { string hostName = Environment.MachineName; SqlCommand cmd = new SqlCommand("Select * from tblUserPreference where HostName = @HostName"); cmd.CommandType = System.Data.CommandType.Text; cmd.Parameters.Add("@HostName", System.Data.SqlDbType.VarChar).Value = hostName; GenericDocumentBuilder builder = new GenericDocumentBuilder(cmd, typeof(YellowstonePathology.Business.User.UserPreference)); DocumentId documentId = new DocumentId(typeof(YellowstonePathology.Business.User.UserPreference), writer, hostName); documentId.IsGlobal = true; Document document = this.m_Stack.Pull(documentId, builder); return (YellowstonePathology.Business.User.UserPreference)document.Value; } }
public YellowstonePathology.Business.ApplicationVersion GetApplicationVersion(object writer) { lock (locker) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "Select * from tblApplicationVersion"; cmd.CommandType = CommandType.Text; GenericDocumentBuilder builder = new GenericDocumentBuilder(cmd, typeof(YellowstonePathology.Business.ApplicationVersion)); YellowstonePathology.Business.ApplicationVersion result = (YellowstonePathology.Business.ApplicationVersion)builder.BuildNew(); return result; } }