private static void HistoryParameter(SqlCommand cmd, Guid HistoryGuid, string HistoryName, string HistoryDescription, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, History.Columns.HistoryGuid, SqlDbType.UniqueIdentifier, HistoryGuid); AppDatabase.AddInParameter(cmd, History.Columns.HistoryName, SqlDbType.NVarChar, AppShared.SafeString(HistoryName)); AppDatabase.AddInParameter(cmd, History.Columns.HistoryDescription, SqlDbType.NVarChar, AppShared.ToDbValueNullable(HistoryDescription)); AppDatabase.AddInParameter(cmd, History.Columns.HistoryModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void RoomParameters(SqlCommand cmd, Guid guid, string type, string description, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, Room.Columns.RoomGuid, SqlDbType.UniqueIdentifier, guid); AppDatabase.AddInParameter(cmd, Room.Columns.RoomType, SqlDbType.NVarChar, AppShared.SafeString(type)); AppDatabase.AddInParameter(cmd, Room.Columns.RoomDescription, SqlDbType.NVarChar, AppShared.SafeString(description)); AppDatabase.AddInParameter(cmd, Room.Columns.RoomModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void PatientBillParameter(SqlCommand cmd, Guid guid, Guid patientGuid, DateTime patientBillDate, string otherPatientName) { AppDatabase.AddInParameter(cmd, PatientBill.Columns.BillGuid, SqlDbType.UniqueIdentifier, guid); AppDatabase.AddInParameter(cmd, PatientBill.Columns.PatientGuid, SqlDbType.UniqueIdentifier, AppShared.ToDbValueNullable(patientGuid)); AppDatabase.AddInParameter(cmd, PatientBill.Columns.BillDate, SqlDbType.DateTime, patientBillDate); AppDatabase.AddInParameter(cmd, PatientBill.Columns.BillOther, SqlDbType.NVarChar, otherPatientName); }
private static void ProcedureParameters(SqlCommand cmd, Guid guid, string name, string description, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, Procedure.Columns.PrecedureGuid, SqlDbType.UniqueIdentifier, guid); AppDatabase.AddInParameter(cmd, Procedure.Columns.ProcedureName, SqlDbType.NVarChar, AppShared.SafeString(name)); AppDatabase.AddInParameter(cmd, Procedure.Columns.ProcedureDescription, SqlDbType.NVarChar, AppShared.SafeString(description)); AppDatabase.AddInParameter(cmd, Procedure.Columns.ProcedureModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void LabInvestigationParameter(SqlCommand cmd, Guid LabInvestigationGuid, string LabInvestigationName, string LabInvestigationDescription, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, LabInvestigation.Columns.LabInvestigationGuid, SqlDbType.UniqueIdentifier, LabInvestigationGuid); AppDatabase.AddInParameter(cmd, LabInvestigation.Columns.LabInvestigationName, SqlDbType.NVarChar, AppShared.SafeString(LabInvestigationName)); AppDatabase.AddInParameter(cmd, LabInvestigation.Columns.LabInvestigationDescription, SqlDbType.NVarChar, AppShared.ToDbValueNullable(LabInvestigationDescription)); AppDatabase.AddInParameter(cmd, LabInvestigation.Columns.LabInvestigationModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void IPDPatientTreatmentParameters(SqlCommand cmd, Guid guid, Guid patientGuid, Guid treatmentGuid, Guid modifiedBy) { //AppDatabase.AddInParameter(cmd, IPDPatientTreatment.Columns.IPDPatientTreatmentGuid, SqlDbType.UniqueIdentifier, guid); AppDatabase.AddInParameter(cmd, IPDPatientTreatment.Columns.IPDPatientTreatmentPatientGuid, SqlDbType.UniqueIdentifier, patientGuid); AppDatabase.AddInParameter(cmd, IPDPatientTreatment.Columns.IPDPatientTreatmentTreatmentGuid, SqlDbType.UniqueIdentifier, treatmentGuid); AppDatabase.AddInParameter(cmd, IPDPatientTreatment.Columns.IPDPatientTreatmentModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void WardParameters(SqlCommand cmd, Guid guid, string name, string description, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, Ward.Columns.WardGuid, SqlDbType.UniqueIdentifier, guid); AppDatabase.AddInParameter(cmd, Ward.Columns.WardName, SqlDbType.NVarChar, AppShared.SafeString(name)); AppDatabase.AddInParameter(cmd, Ward.Columns.WardDescription, SqlDbType.NVarChar, AppShared.SafeString(description)); AppDatabase.AddInParameter(cmd, Ward.Columns.WardModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void OPDTreatmentProcedureParameters(SqlCommand cmd, Guid OPDTreatmentProcedureGuid, Guid OPDTreatmentProcedurePatientGuid, DateTime OPDTreatmentDate, Guid ModifiedBy) { AppDatabase.AddInParameter(cmd, OPDTreatmentProcedure.Columns.OPDTreatmentProcedureGuid, SqlDbType.UniqueIdentifier, OPDTreatmentProcedureGuid); AppDatabase.AddInParameter(cmd, OPDTreatmentProcedure.Columns.OPDTreatmentProcedurePatientGuid, SqlDbType.UniqueIdentifier, OPDTreatmentProcedurePatientGuid); AppDatabase.AddInParameter(cmd, OPDTreatmentProcedure.Columns.OPDTreatmentDate, SqlDbType.DateTime, OPDTreatmentDate); AppDatabase.AddInParameter(cmd, OPDTreatmentProcedure.Columns.OPDTreatmentModifiedBy, SqlDbType.UniqueIdentifier, ModifiedBy); }
private static void ItemParameters(SqlCommand cmd, Guid ItemGuid, Guid CategoryGuid, Guid CompanyGuid, string ItemName) { AppDatabase.AddInParameter(cmd, Item.Columns.ItemGuid, SqlDbType.UniqueIdentifier, ItemGuid); AppDatabase.AddInParameter(cmd, Item.Columns.ItemCategoryGuid, SqlDbType.UniqueIdentifier, CategoryGuid); AppDatabase.AddInParameter(cmd, Item.Columns.ItemCompanyGuid, SqlDbType.UniqueIdentifier, CompanyGuid); AppDatabase.AddInParameter(cmd, Item.Columns.ItemName, SqlDbType.NVarChar, ItemName); }
private static void HistoryProcedureParameter(SqlCommand cmd, Guid HistoryProcedureGuid, Guid PatientGuid, string ProblemSince, string AssociateComplainDuration, string FamilyHistory, string FamilyHistoryDuration, DateTime Date, string BP, string HR, string RR, string Temp, string RBS, string ECG, string Wt, string Other, string MLCNo, DateTime FollowUpDate, string TimeHour, string TimeMinute, string TimeAMPM, Guid ModifiedBy) { AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.HistoryProcedureGuid, SqlDbType.UniqueIdentifier, HistoryProcedureGuid); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.HistoryProcedurePatientGuid, SqlDbType.UniqueIdentifier, PatientGuid); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.ProblemSince, SqlDbType.NVarChar, AppShared.ToDbValueNullable(ProblemSince)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.AssociateComplainDuration, SqlDbType.NVarChar, AppShared.ToDbValueNullable(AssociateComplainDuration)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.FamilyHistory, SqlDbType.NVarChar, AppShared.ToDbValueNullable(FamilyHistory)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.FamilyHistoryDuration, SqlDbType.NVarChar, AppShared.ToDbValueNullable(FamilyHistoryDuration)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.Date, SqlDbType.DateTime, AppShared.ToDbValueNullable(Date)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.BP, SqlDbType.NVarChar, AppShared.ToDbValueNullable(BP)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.HR, SqlDbType.NVarChar, AppShared.ToDbValueNullable(HR)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.RR, SqlDbType.NVarChar, AppShared.ToDbValueNullable(RR)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.Temp, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Temp)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.RBS, SqlDbType.NVarChar, AppShared.ToDbValueNullable(RBS)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.ECG, SqlDbType.NVarChar, AppShared.ToDbValueNullable(ECG)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.Wt, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Wt)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.Other, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Other)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.MLCNo, SqlDbType.NVarChar, AppShared.ToDbValueNullable(MLCNo)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.FollowUpDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(FollowUpDate)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.TimeHour, SqlDbType.NVarChar, AppShared.ToDbValueNullable(TimeHour)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.TimeMinute, SqlDbType.NVarChar, AppShared.ToDbValueNullable(TimeMinute)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.TimeAMPM, SqlDbType.NVarChar, AppShared.ToDbValueNullable(TimeAMPM)); AppDatabase.AddInParameter(cmd, HistoryProcedure.Columns.HistoryProcedureModifiedBy, SqlDbType.UniqueIdentifier, ModifiedBy); }
private static void TreatmentParameters(SqlCommand cmd, Guid guid, string name, string description, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, IPDTreatment.Columns.TreatmentGuid, SqlDbType.UniqueIdentifier, guid); AppDatabase.AddInParameter(cmd, IPDTreatment.Columns.TreatmentName, SqlDbType.NVarChar, AppShared.SafeString(name)); AppDatabase.AddInParameter(cmd, IPDTreatment.Columns.TreatmentDescription, SqlDbType.NVarChar, AppShared.SafeString(description)); AppDatabase.AddInParameter(cmd, IPDTreatment.Columns.TreatmentModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void MedicineParameters(SqlCommand cmd, Guid MedicineGuid, string MedicineName, string MedicineDescription, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, Medicine.Columns.MedicineGuid, SqlDbType.UniqueIdentifier, MedicineGuid); AppDatabase.AddInParameter(cmd, Medicine.Columns.MedicineName, SqlDbType.NVarChar, AppShared.SafeString(MedicineName)); AppDatabase.AddInParameter(cmd, Medicine.Columns.MedicineDescription, SqlDbType.NVarChar, AppShared.ToDbValueNullable(MedicineDescription)); AppDatabase.AddInParameter(cmd, Medicine.Columns.MedicineModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void AssociateComplainParameter(SqlCommand cmd, Guid AssociateComplainGuid, string AssociateComplainName, string AssociateComplainDescription, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, AssociateComplain.Columns.AssociateComplainGuid, SqlDbType.UniqueIdentifier, AssociateComplainGuid); AppDatabase.AddInParameter(cmd, AssociateComplain.Columns.AssociateComplainName, SqlDbType.NVarChar, AppShared.SafeString(AssociateComplainName)); AppDatabase.AddInParameter(cmd, AssociateComplain.Columns.AssociateComplainDescription, SqlDbType.NVarChar, AppShared.ToDbValueNullable(AssociateComplainDescription)); AppDatabase.AddInParameter(cmd, AssociateComplain.Columns.AssociateComplainModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void AppointmentParameters(SqlCommand cmd, Guid PatientGuid, Guid AppointmentGuid, DateTime AppointmentDate, string AppointmentDescription, Guid ModifiedBy) { AppDatabase.AddInParameter(cmd, Appointment.Columns.AppointmentDate, SqlDbType.DateTime, AppointmentDate); AppDatabase.AddInParameter(cmd, Appointment.Columns.AppointmentGuid, SqlDbType.UniqueIdentifier, AppointmentGuid); AppDatabase.AddInParameter(cmd, Appointment.Columns.PatientGuid, SqlDbType.UniqueIdentifier, PatientGuid); AppDatabase.AddInParameter(cmd, Appointment.Columns.AppointmentDescription, SqlDbType.NVarChar, AppointmentDescription); AppDatabase.AddInParameter(cmd, Appointment.Columns.AppointmentModifiedBy, SqlDbType.UniqueIdentifier, ModifiedBy); }
private static void MedicinesParameters(SqlCommand cmd, Guid MedicinesGuid, Guid CategoryGuid, Guid CompanyGuid, Guid ItemGuid, int ReOrderLevel) { AppDatabase.AddInParameter(cmd, Medicines.Columns.MedicineGuid, SqlDbType.UniqueIdentifier, MedicinesGuid); AppDatabase.AddInParameter(cmd, Medicines.Columns.MedicineCategoryGuid, SqlDbType.UniqueIdentifier, CategoryGuid); AppDatabase.AddInParameter(cmd, Medicines.Columns.MedicineCompanyGuid, SqlDbType.UniqueIdentifier, CompanyGuid); AppDatabase.AddInParameter(cmd, Medicines.Columns.MedicineItemGuid, SqlDbType.UniqueIdentifier, ItemGuid); AppDatabase.AddInParameter(cmd, Medicines.Columns.MedicineReOrderLevel, SqlDbType.Int, ReOrderLevel); }
private static void ReferenceDoctorParameters(SqlCommand cmd, Guid guid, string name, string description, decimal share, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, ReferenceDoctor.Columns.ReferenceDoctorGuid, SqlDbType.UniqueIdentifier, guid); AppDatabase.AddInParameter(cmd, ReferenceDoctor.Columns.ReferenceDoctorName, SqlDbType.NVarChar, AppShared.SafeString(name)); AppDatabase.AddInParameter(cmd, ReferenceDoctor.Columns.ReferenceDoctorDescription, SqlDbType.NVarChar, AppShared.SafeString(description)); AppDatabase.AddInParameter(cmd, ReferenceDoctor.Columns.ReferenceDoctorShare, SqlDbType.Float, AppShared.ToDbValueNullable(share)); AppDatabase.AddInParameter(cmd, ReferenceDoctor.Columns.ReferenceDoctorModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void OPDTreatmentParameters(SqlCommand cmd, Guid TreatmentGuid, Guid ChiefComplainGuid, string TreatmentName, string TreatmentDescription, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, OPDTreatment.Columns.TreatmentGuid, SqlDbType.UniqueIdentifier, TreatmentGuid); AppDatabase.AddInParameter(cmd, OPDTreatment.Columns.ChiefComplainGuid, SqlDbType.UniqueIdentifier, ChiefComplainGuid); AppDatabase.AddInParameter(cmd, OPDTreatment.Columns.TreatmentName, SqlDbType.NVarChar, AppShared.SafeString(TreatmentName)); AppDatabase.AddInParameter(cmd, OPDTreatment.Columns.TreatmentDescription, SqlDbType.NVarChar, AppShared.ToDbValueNullable(TreatmentDescription)); AppDatabase.AddInParameter(cmd, OPDTreatment.Columns.TreatmentModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void UserRoleParameters(SqlCommand cmd, Guid guid, string userRoleName, int userRoleLevel, string userRoleDesc, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, UserRole.Columns.UserRoleGuid, SqlDbType.UniqueIdentifier, guid); AppDatabase.AddInParameter(cmd, UserRole.Columns.UserRoleName, SqlDbType.NVarChar, userRoleName); AppDatabase.AddInParameter(cmd, UserRole.Columns.UserRoleLevel, SqlDbType.Int, userRoleLevel); AppDatabase.AddInParameter(cmd, UserRole.Columns.UserRoleDesc, SqlDbType.NVarChar, userRoleDesc); AppDatabase.AddInParameter(cmd, UserRole.Columns.UserRoleModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void OPDInvestigationProcedureParameters(SqlCommand cmd, Guid OPDInvestigationProcedureGuid, Guid PatientGuid, string RadiologyInvestigation, string SpecialInvestigation, DateTime OPDInvestigationProcedureDate, Guid ModifiedBy) { AppDatabase.AddInParameter(cmd, OPDInvestigationProcedure.Columns.OPDInvestigationProcedureGuid, SqlDbType.UniqueIdentifier, OPDInvestigationProcedureGuid); AppDatabase.AddInParameter(cmd, OPDInvestigationProcedure.Columns.OPDInvestigationProcedurePatientGuid, SqlDbType.UniqueIdentifier, PatientGuid); AppDatabase.AddInParameter(cmd, OPDInvestigationProcedure.Columns.RadiologyInvestigation, SqlDbType.VarChar, RadiologyInvestigation); AppDatabase.AddInParameter(cmd, OPDInvestigationProcedure.Columns.SpecialInvestigation, SqlDbType.VarChar, SpecialInvestigation); AppDatabase.AddInParameter(cmd, OPDInvestigationProcedure.Columns.OPDInvestigationProcedureDate, SqlDbType.DateTime, OPDInvestigationProcedureDate); AppDatabase.AddInParameter(cmd, OPDInvestigationProcedure.Columns.OPDInvestigationProcedureModifiedBy, SqlDbType.UniqueIdentifier, ModifiedBy); }
private static void PatientProcedureParameter(SqlCommand cmd, Guid patientProcedureGuid, Guid patientGuid, Guid procedureGuid, DateTime patientProcedureDate, decimal amount, string notes, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, PatientProcedure.Columns.PatientProcedureGuid, SqlDbType.UniqueIdentifier, patientProcedureGuid); AppDatabase.AddInParameter(cmd, PatientProcedure.Columns.PatietProcedurePatientGuid, SqlDbType.UniqueIdentifier, patientGuid); AppDatabase.AddInParameter(cmd, PatientProcedure.Columns.PatientProcedureProcedureGuid, SqlDbType.UniqueIdentifier, procedureGuid); AppDatabase.AddInParameter(cmd, PatientProcedure.Columns.PatientProcedureDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(patientProcedureDate)); AppDatabase.AddInParameter(cmd, PatientProcedure.Columns.PatientProcedureAmount, SqlDbType.Decimal, AppShared.ToDbValueNullable(amount)); AppDatabase.AddInParameter(cmd, PatientProcedure.Columns.PatientProcedureNotes, SqlDbType.NVarChar, AppShared.ToDbValueNullable(notes)); AppDatabase.AddInParameter(cmd, PatientProcedure.Columns.PatientProcedureModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void IPDPatientTreatmentParameter(SqlCommand cmd, Guid guid, Guid patientGuid, string diatAdvice, string sosDrug, string specialAdvice, DateTime treatmentDate) { AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheet.Columns.TreatmentSheetGuid, SqlDbType.UniqueIdentifier, guid); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheet.Columns.TreatmentSheetPatientGuid, SqlDbType.UniqueIdentifier, AppShared.ToDbValueNullable(patientGuid)); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheet.Columns.TreatmentSheetDiatAdvice, SqlDbType.NVarChar, AppShared.ToDbValueNullable(diatAdvice)); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheet.Columns.TreatmentSheetSOSDrug, SqlDbType.NVarChar, AppShared.ToDbValueNullable(sosDrug)); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheet.Columns.TreatmentSheetSpecialAdvice, SqlDbType.NVarChar, AppShared.ToDbValueNullable(specialAdvice)); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheet.Columns.TreatmentSheetDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(treatmentDate)); }
private static void InvestigationProcedureParameter(SqlCommand cmd, Guid InvestigationProcedureGuid, Guid MainInvestigationGUID, Guid LabInvestigationGUID, string RadiologyInvestigation, string SpecialInvestigation, DateTime InvestigationProcedureDate, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, InvestigationProcedure.Columns.InvestigationProcedureGuid, SqlDbType.UniqueIdentifier, InvestigationProcedureGuid); AppDatabase.AddInParameter(cmd, InvestigationProcedure.Columns.MainInvestigationGUID, SqlDbType.UniqueIdentifier, MainInvestigationGUID); AppDatabase.AddInParameter(cmd, InvestigationProcedure.Columns.LabInvestigationGUID, SqlDbType.UniqueIdentifier, LabInvestigationGUID); AppDatabase.AddInParameter(cmd, InvestigationProcedure.Columns.InvestigationProcedureRadiologyInvestigation, SqlDbType.NVarChar, AppShared.SafeString(RadiologyInvestigation)); AppDatabase.AddInParameter(cmd, InvestigationProcedure.Columns.InvestigationProcedureSpecialInvestigation, SqlDbType.NVarChar, AppShared.SafeString(SpecialInvestigation)); AppDatabase.AddInParameter(cmd, InvestigationProcedure.Columns.InvestigationProcedureDate, SqlDbType.DateTime, InvestigationProcedureDate); AppDatabase.AddInParameter(cmd, InvestigationProcedure.Columns.InvestigationProcedureModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void MedicineSaleParameters(SqlCommand cmd, Guid MedicineSaleGuid, string Haste, Guid CategoryGuid, Guid CompanyGuid, Guid ItemGuid, decimal Quantity, decimal Amount) { AppDatabase.AddInParameter(cmd, MedicineSale.Columns.MedicineSaleGuid, SqlDbType.UniqueIdentifier, MedicineSaleGuid); AppDatabase.AddInParameter(cmd, MedicineSale.Columns.MedicineSaleHaste, SqlDbType.NVarChar, Haste); AppDatabase.AddInParameter(cmd, MedicineSale.Columns.MedicineSaleCategoryGuid, SqlDbType.UniqueIdentifier, CategoryGuid); AppDatabase.AddInParameter(cmd, MedicineSale.Columns.MedicineSaleCompanyGuid, SqlDbType.UniqueIdentifier, CompanyGuid); AppDatabase.AddInParameter(cmd, MedicineSale.Columns.MedicineSaleItemGuid, SqlDbType.UniqueIdentifier, ItemGuid); AppDatabase.AddInParameter(cmd, MedicineSale.Columns.MedicineSaleQuantity, SqlDbType.Decimal, Quantity); AppDatabase.AddInParameter(cmd, MedicineSale.Columns.MedicineSaleAmount, SqlDbType.Decimal, Amount); }
private static void OPDPrescriptionParameters(SqlCommand cmd, Guid OPDPrescriptionProcedureGuid, Guid PatientGuid, string Doseage, string Timings, DateTime OPDPrescriptionDate, Guid ModifiedBy) { AppDatabase.AddInParameter(cmd, OPDPrescription.Columns.OPDPrescriptionProcedureGuid, SqlDbType.UniqueIdentifier, OPDPrescriptionProcedureGuid); AppDatabase.AddInParameter(cmd, OPDPrescription.Columns.OPDPrescriptionPatientGuid, SqlDbType.UniqueIdentifier, PatientGuid); AppDatabase.AddInParameter(cmd, OPDPrescription.Columns.Doseage, SqlDbType.VarChar, Doseage); AppDatabase.AddInParameter(cmd, OPDPrescription.Columns.Timings, SqlDbType.VarChar, Timings); AppDatabase.AddInParameter(cmd, OPDPrescription.Columns.OPDPrescriptionDate, SqlDbType.DateTime, OPDPrescriptionDate); AppDatabase.AddInParameter(cmd, OPDPrescription.Columns.OPDPrescriptionModifiedBy, SqlDbType.UniqueIdentifier, ModifiedBy); }
private static void OPDInvestigationParameter(SqlCommand cmd, Guid OPDInvestigationGuid, Guid MainInvestigationGUID, Guid LabInvestigationGUID, string OPDRadiologyInvestigation, string OPDSpecialInvestigation, DateTime OPDInvestigationDate, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, OPDInvestigation.Columns.OPDInvestigationGuid, SqlDbType.UniqueIdentifier, OPDInvestigationGuid); AppDatabase.AddInParameter(cmd, OPDInvestigation.Columns.MainInvestigationGUID, SqlDbType.UniqueIdentifier, MainInvestigationGUID); AppDatabase.AddInParameter(cmd, OPDInvestigation.Columns.LabInvestigationGUID, SqlDbType.UniqueIdentifier, LabInvestigationGUID); AppDatabase.AddInParameter(cmd, OPDInvestigation.Columns.OPDRadiologyInvestigation, SqlDbType.NVarChar, AppShared.ToDbValueNullable(OPDRadiologyInvestigation)); AppDatabase.AddInParameter(cmd, OPDInvestigation.Columns.OPDSpecialInvestigation, SqlDbType.NVarChar, AppShared.ToDbValueNullable(OPDSpecialInvestigation)); AppDatabase.AddInParameter(cmd, OPDInvestigation.Columns.OPDInvestigationDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(OPDInvestigationDate)); AppDatabase.AddInParameter(cmd, OPDInvestigation.Columns.OPDInvestigationModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static void PermissionParameters(SqlCommand cmd, Guid userGuid, Guid entityGuid, bool canView, bool canCreate, bool canEdit, bool canDelete, bool canSpecial, Guid modifiedBy) { AppDatabase.AddInParameter(cmd, Permission.Columns.PermissionUserRoleGuid, SqlDbType.UniqueIdentifier, userGuid); AppDatabase.AddInParameter(cmd, Permission.Columns.PermissionEntityGuid, SqlDbType.UniqueIdentifier, entityGuid); AppDatabase.AddInParameter(cmd, Permission.Columns.PermissionCanView, SqlDbType.Bit, canView); AppDatabase.AddInParameter(cmd, Permission.Columns.PermissionCanCreate, SqlDbType.Bit, canCreate); AppDatabase.AddInParameter(cmd, Permission.Columns.PermissionCanEdit, SqlDbType.Bit, canEdit); AppDatabase.AddInParameter(cmd, Permission.Columns.PermissionCanDelete, SqlDbType.Bit, canDelete); AppDatabase.AddInParameter(cmd, Permission.Columns.PermissionCanSpecial, SqlDbType.Bit, canSpecial); AppDatabase.AddInParameter(cmd, Permission.Columns.PermissionModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy); }
private static bool Execute(string storeProcName, string paramName, SqlDbType paramType, object paramValue) { bool r = false; using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(storeProcName)) { AppDatabase.AddInParameter(cmd, paramName, paramType, paramValue); AppDatabase db = OpenDatabase(); r = (db != null && db.ExecuteCommand(cmd)); } return(r); }
private static void IPDPatientTreatmentSheetDetailsParameters(SqlCommand cmd, Guid guid, Guid treatmentGuid, Guid patientGuid, string description, string morningTime, string noonTime, string eveningTime, string nightTime) { AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheetDetails.Columns.IPDPatientTreatmentSheetDetailsGuid, SqlDbType.UniqueIdentifier, guid); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheetDetails.Columns.IPDPatientTreatmentSheetDetailsTreatmentSheetGuid, SqlDbType.UniqueIdentifier, treatmentGuid); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheetDetails.Columns.IPDPatientTreatmentSheetDetailsPatientGuid, SqlDbType.UniqueIdentifier, patientGuid); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheetDetails.Columns.IPDPatientTreatmentSheetDetailsDescription, SqlDbType.NVarChar, AppShared.ToDbValueNullable(description)); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheetDetails.Columns.IPDPatientTreatmentSheetDetailsMorningTime, SqlDbType.NVarChar, AppShared.ToDbValueNullable(morningTime)); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheetDetails.Columns.IPDPatientTreatmentSheetDetailsNoonTime, SqlDbType.NVarChar, AppShared.ToDbValueNullable(noonTime)); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheetDetails.Columns.IPDPatientTreatmentSheetDetailsEveningTime, SqlDbType.NVarChar, AppShared.ToDbValueNullable(eveningTime)); AppDatabase.AddInParameter(cmd, IPDPatientTreatmentSheetDetails.Columns.IPDPatientTreatmentSheetDetailsNightTime, SqlDbType.NVarChar, AppShared.ToDbValueNullable(nightTime)); }
internal static bool PermissionDelete(Guid userGuid, Guid entityGuid) { bool r = false; using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(UserPermission_Delete)) { AppDatabase.AddInParameter(cmd, "@PermissionUserRoleGuid", SqlDbType.UniqueIdentifier, userGuid); AppDatabase.AddInParameter(cmd, "@PermissionEntityGuid", SqlDbType.UniqueIdentifier, entityGuid); AppDatabase db = OpenDatabase(); r = (db != null && db.ExecuteCommand(cmd)); } return(r); }
private static void MedicinePurchaseParameters(SqlCommand cmd, Guid MedicinePurchaseGuid, Guid CategoryGuid, Guid CompanyGuid, Guid ItemGuid, string BillType, int Quantity, decimal WholesaleRate, decimal Amount, DateTime ExpiryDate, decimal MRP) { AppDatabase.AddInParameter(cmd, MedicinePurchase.Columns.MedicinePurchaseGuid, SqlDbType.UniqueIdentifier, MedicinePurchaseGuid); AppDatabase.AddInParameter(cmd, MedicinePurchase.Columns.MedicinePurchaseCategoryGuid, SqlDbType.UniqueIdentifier, CategoryGuid); AppDatabase.AddInParameter(cmd, MedicinePurchase.Columns.MedicinePurchaseCompanyGuid, SqlDbType.UniqueIdentifier, CompanyGuid); AppDatabase.AddInParameter(cmd, MedicinePurchase.Columns.MedicinePurchaseItemGuid, SqlDbType.UniqueIdentifier, ItemGuid); AppDatabase.AddInParameter(cmd, MedicinePurchase.Columns.MedicinePurchaseBillType, SqlDbType.NVarChar, BillType); AppDatabase.AddInParameter(cmd, MedicinePurchase.Columns.MedicinePurchaseQuantity, SqlDbType.Int, Quantity); AppDatabase.AddInParameter(cmd, MedicinePurchase.Columns.MedicinePurchaseWholesaleRate, SqlDbType.Decimal, WholesaleRate); AppDatabase.AddInParameter(cmd, MedicinePurchase.Columns.MedicinePurchaseAmount, SqlDbType.Decimal, Amount); AppDatabase.AddInParameter(cmd, MedicinePurchase.Columns.MedicinePurchaseExpiryDate, SqlDbType.DateTime, ExpiryDate); AppDatabase.AddInParameter(cmd, MedicinePurchase.Columns.MedicinePurchaseMRP, SqlDbType.Decimal, MRP); }