Exemple #1
0
 private static void EntityParameters(SqlCommand cmd, Guid guid, string name, string caption, string typeName, string listCaption, string listTypeName, byte[] iconSmall, byte[] iconLarge, string groupName, string desc, Guid modifiedBy)
 {
     AppDatabase.AddInParameter(cmd, Entity.Columns.Guid, SqlDbType.UniqueIdentifier, guid);
     AppDatabase.AddInParameter(cmd, Entity.Columns.Name, SqlDbType.NVarChar, AppShared.SafeString(name));
     AppDatabase.AddInParameter(cmd, Entity.Columns.Desc, SqlDbType.NVarChar, AppShared.ToDbValueNullable(desc));
     AppDatabase.AddInParameter(cmd, Entity.Columns.GroupName, SqlDbType.NVarChar, AppShared.ToDbValueNullable(groupName));
     AppDatabase.AddInParameter(cmd, Entity.Columns.Caption, SqlDbType.NVarChar, AppShared.SafeString(caption));
     AppDatabase.AddInParameter(cmd, Entity.Columns.TypeName, SqlDbType.NVarChar, AppShared.SafeString(typeName));
     AppDatabase.AddInParameter(cmd, Entity.Columns.ListCaption, SqlDbType.NVarChar, AppShared.SafeString(listCaption));
     AppDatabase.AddInParameter(cmd, Entity.Columns.ListTypeName, SqlDbType.NVarChar, AppShared.SafeString(listTypeName));
     AppDatabase.AddInParameter(cmd, Entity.Columns.IconSmall, SqlDbType.VarBinary, AppShared.ToDbValueNullable(iconSmall));
     AppDatabase.AddInParameter(cmd, Entity.Columns.IconLarge, SqlDbType.VarBinary, AppShared.ToDbValueNullable(iconLarge));
     AppDatabase.AddInParameter(cmd, Entity.Columns.ModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy);
 }
        internal static DataTable OPDTreatmentData(DateTime dt)
        {
            DataTable r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(OPDTreatment_Report))
            {
                AppDatabase.AddInParameter(cmd, "@Date", SqlDbType.DateTime, AppShared.ToDbValueNullable(dt));

                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetDataTable(cmd);
                }
            }
            return(r);
        }
        internal static SqlDataReader IPDPatientTreatmentSheetSearch(string searchText, DateTime dateFrom, DateTime dateTo)
        {
            SqlDataReader r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(IPDPatientTreatmentSheet_Search))
            {
                AppDatabase.AddInParameter(cmd, "@SearchText", SqlDbType.NVarChar, AppShared.ToDbLikeText(searchText));
                AppDatabase.AddInParameter(cmd, "@DateFrom", SqlDbType.DateTime, AppShared.ToDbValueNullable(dateFrom));
                AppDatabase.AddInParameter(cmd, "@DateTo", SqlDbType.DateTime, AppShared.ToDbValueNullable(dateTo));
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetSqlDataReader(cmd);
                }
            }
            return(r);
        }
Exemple #4
0
        //internal static SqlDataReader PatientSelectAll()
        //{
        //    return GetReader(Patient_SelectAll);
        //}

        internal static SqlDataReader PatientSearch(string searchText, bool IsIpd, bool IsOPD, int isDischarge, DateTime dateFrom, DateTime dateTo)
        {
            SqlDataReader r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(Patient_Search))
            {
                AppDatabase.AddInParameter(cmd, "@SearchText", SqlDbType.NVarChar, AppShared.ToDbLikeText(searchText));
                AppDatabase.AddInParameter(cmd, "@IsIpd", SqlDbType.Bit, IsIpd);
                AppDatabase.AddInParameter(cmd, "@IsOpd", SqlDbType.Bit, IsOPD);
                AppDatabase.AddInParameter(cmd, "@IsDischarge", SqlDbType.Int, isDischarge);
                AppDatabase.AddInParameter(cmd, "@DateFrom", SqlDbType.DateTime, AppShared.ToDbValueNullable(dateFrom));
                AppDatabase.AddInParameter(cmd, "@DateTo", SqlDbType.DateTime, AppShared.ToDbValueNullable(dateTo));
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetSqlDataReader(cmd);
                }
            }
            return(r);
        }
        //internal static DataTable IPDPatientTreamentSheetReport(Guid IPDPatientTreatmentSheetGuid)
        //{
        //    return GetDataTable(IPDPatientTreamentSheetReports, Report.Columns.IPDPatientTreatmentSheetGuid, IPDPatientTreatmentSheetGuid);
        //}

        internal static DataTable IPDPatientVitalByDate(Guid patientGuid, DateTime treatMentDate)
        {
            DataTable r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(IPDPatientVitalReport_ByDate))
            {
                AppDatabase.AddInParameter(cmd, "@PatientGuid", SqlDbType.UniqueIdentifier, AppShared.ToDbValueNullable(patientGuid));
                AppDatabase.AddInParameter(cmd, "@IPDPatientTreatmentSheetDate", SqlDbType.DateTime, AppShared.ToDbValueNullable(treatMentDate));

                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetDataTable(cmd);
                }
            }
            return(r);
        }
Exemple #6
0
 private static void UserParameters(SqlCommand cmd, Guid guid, string name, string loginName, Guid userRoleGuid, string password, string addressline1, string addressline2, string addressline3, string phoneNo, string mobileNo, byte[] photo, string desc, decimal doctorShare, bool isDisable, Guid modifiedBy)
 {
     AppDatabase.AddInParameter(cmd, User.Columns.UserGuid, SqlDbType.UniqueIdentifier, guid);
     AppDatabase.AddInParameter(cmd, User.Columns.UserName, SqlDbType.NVarChar, AppShared.SafeString(name));
     AppDatabase.AddInParameter(cmd, User.Columns.UserLoginName, SqlDbType.NVarChar, AppShared.SafeString(loginName));
     AppDatabase.AddInParameter(cmd, User.Columns.UserRoleGuid, SqlDbType.UniqueIdentifier, userRoleGuid);
     AppDatabase.AddInParameter(cmd, User.Columns.UserPassword, SqlDbType.NVarChar, AppShared.SafeString(password));
     AppDatabase.AddInParameter(cmd, User.Columns.UserAddressLine1, SqlDbType.NVarChar, AppShared.ToDbValueNullable(addressline1));
     AppDatabase.AddInParameter(cmd, User.Columns.UserAddressLine2, SqlDbType.NVarChar, AppShared.ToDbValueNullable(addressline2));
     AppDatabase.AddInParameter(cmd, User.Columns.UserAddressLine3, SqlDbType.NVarChar, AppShared.ToDbValueNullable(addressline3));
     AppDatabase.AddInParameter(cmd, User.Columns.UserPhoneNo, SqlDbType.NVarChar, AppShared.ToDbValueNullable(phoneNo));
     AppDatabase.AddInParameter(cmd, User.Columns.UserMobileNo, SqlDbType.NVarChar, AppShared.ToDbValueNullable(mobileNo));
     AppDatabase.AddInParameter(cmd, User.Columns.UserPhoto, SqlDbType.VarBinary, AppShared.ToDbValueNullable(photo));
     AppDatabase.AddInParameter(cmd, User.Columns.UserDesc, SqlDbType.NVarChar, AppShared.ToDbValueNullable(desc));
     AppDatabase.AddInParameter(cmd, User.Columns.DoctorShare, SqlDbType.Decimal, AppShared.ToDbValueNullable(doctorShare));
     AppDatabase.AddInParameter(cmd, User.Columns.UserIsDisable, SqlDbType.Bit, isDisable);
     AppDatabase.AddInParameter(cmd, User.Columns.UserModifiedBy, 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);
 }
Exemple #8
0
 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 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 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 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));
 }
Exemple #12
0
        internal static bool CheckUsernameAvailibity(string userName, Guid excludeGuid)
        {
            bool r = false;

            if (userName != string.Empty)
            {
                using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(User_CheckName))
                {
                    AppDatabase.AddInParameter(cmd, "@Username", SqlDbType.NVarChar, userName);
                    AppDatabase.AddInParameter(cmd, "@ExcludeGuid", SqlDbType.UniqueIdentifier, AppShared.ToDbValueNullable(excludeGuid));
                    SqlParameter prmAvailable = AppDatabase.AddOutParameter(cmd, "@IsAvailable", SqlDbType.Bit);

                    AppDatabase db = OpenDatabase();
                    if (db != null && db.ExecuteCommand(cmd))
                    {
                        r = AppShared.DbValueToBoolean(prmAvailable.Value);
                    }
                }
            }
            return(r);
        }
Exemple #13
0
        private static void PatientParameters(SqlCommand cmd, Guid guid, string firstName, string middleName, string lastName, int gender, int age, string address, string city,
/*patientDetails fields*/ string district, string taluko, string contactNo, string otherNo, string residenceNo, int maritalstatus, decimal marragetimeyear, int childern, string notes,
                                              Guid wardGuid, Guid roomGuid, DateTime admittedDate, string admittedtime, string admittedBy, string operation, DateTime followUpDate, decimal amount, bool isIpd,
                                              bool isOpd, Guid referenceDoctorGuid, decimal referenceDoctorShare, string PatientOccupation, string PatientOccupationFullAddress, string PatientReference,
                                              string PatientInsurance, string PatientInsuranceCompany, string insuranceAmount, DateTime?PatientOperationDateTime, string PatientSigningPersonName,
                                              string PatientRelationshipWith, string PatientDoctorIncharge, string PatientDivison, string PatientPSOName, string PatientReceivingStaff, string receivingStaffReceptionMO,
                                              string PatientMO, string PatientProvisionalDiagnosis, string PatientCamePreviously, DateTime?patientBirthDate, string senderName, string chiefComplaint,
                                              string typeOfCase, string ht, string dm, string ihd, string majorIllness, string drugAllergy, string pregenency, string bt, string admittedTimetemperature,
                                              string admittedTimePulse, string admittedTimeRR, string admittedTimeSpo2, string admittedTimeBp, string admittedTimeHr, string admittedTimeRbs,
                                              string admittedTimeEcg, string admittedTimeOther, string admittedTimeWeight, string admittedTimeHeight, string systemicExamination,
                                              string rs, string cvs, string cns, string pa, string other, string suggestedInvestigation, string clinicalNote, string admittedTimeTreatment,
                                              DateTime?operationDate, string operationTime,
/*mlc form*/ bool isMlc, string mlcFormFillupName, string PatientMLCNo, string PatientEntryNo, string PatientMarkOfIdentity, string PatientEventDetail,
                                              string PatientFetcherPersonName, string PatientFetcherPersonFullAddress,
                                              string InformerStaffPerson, string PatientInformTime, string RelatedPoliceStation, string RelatedPoliceOfficer,
/*dischage fields*/ bool isDischarge, DateTime?dischargeDate, string dischargeTime, string dischargeBy, string dischargeStaffReception, string dischargeStaffReceptionMO,
                                              int invoiceNo, DateTime?invoiceDate, string PatientFinalDiagnosis, string conditionOnDischarge, string typeOfDischarge, string dischargeTypeTemperature,
                                              string dischargeTimePulse, string dischargeTimeRR, string dischargeTimeSpo2, string dischargeTimeBp, string dischargeTimeHr, string dischargeTimeRbs,
                                              string dischargeTimeEcg, string dischargeTimeRcg, string dischargeTimeOther, string dischargeTimeWeight, string dischargeTimeHeight, string dischargeTimeClinicalExamination,
                                              string dischargeTimeOperativeNote, string dischargeTimeInvestigation, string dischargeTimeTreatment, string advice, string status, string medicalOfficer, string indoorno, string billno,
                                              DateTime?medicalOfficeDate, string medicalOfficeTime, Guid modifiedBy)
        {
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientGuid, SqlDbType.UniqueIdentifier, guid);

            #region patientdetailsparameteres

            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientFirstName, SqlDbType.NVarChar, AppShared.SafeString(firstName));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMiddleName, SqlDbType.NVarChar, AppShared.ToDbValueNullable(middleName));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientLastName, SqlDbType.NVarChar, AppShared.ToDbValueNullable(lastName));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientGender, SqlDbType.Int, gender);
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAge, SqlDbType.Int, AppShared.ToDbValueNullable(age));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAddress, SqlDbType.NVarChar, AppShared.ToDbValueNullable(address));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientCity, SqlDbType.NVarChar, AppShared.ToDbValueNullable(city));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDistrict, SqlDbType.NVarChar, AppShared.ToDbValueNullable(district));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientTaluko, SqlDbType.NVarChar, AppShared.ToDbValueNullable(taluko));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientContactNo, SqlDbType.NVarChar, AppShared.ToDbValueNullable(contactNo));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientOtherNo, SqlDbType.NVarChar, AppShared.ToDbValueNullable(otherNo));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientResidenceNo, SqlDbType.NVarChar, AppShared.ToDbValueNullable(residenceNo));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMaritalStatus, SqlDbType.Int, maritalstatus);
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMarrageTimeyear, SqlDbType.Decimal, AppShared.ToDbValueNullable(marragetimeyear));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientChildern, SqlDbType.Int, AppShared.ToDbValueNullable(childern));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientWardGuid, SqlDbType.UniqueIdentifier, AppShared.ToDbValueNullable(wardGuid));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientRoomGuid, SqlDbType.UniqueIdentifier, AppShared.ToDbValueNullable(roomGuid));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(admittedDate));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTime, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedtime));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedBy, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedBy));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientIsIPD, SqlDbType.Bit, isIpd);
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientIsOPD, SqlDbType.Bit, isOpd);
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientReferenceDoctorGuid, SqlDbType.UniqueIdentifier, AppShared.ToDbValueNullable(referenceDoctorGuid));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientReferenceDoctorShare, SqlDbType.Decimal, AppShared.ToDbValueNullable(referenceDoctorShare));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientOccupation, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientOccupation));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientOccupationFullAddress, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientOccupationFullAddress));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientReference, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientReference));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientInsurance, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientInsurance));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientInsuranceCompany, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientInsuranceCompany));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientInsuranceAmount, SqlDbType.NVarChar, AppShared.ToDbValueNullable(insuranceAmount));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientSigningPersonName, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientSigningPersonName));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientRelationshipWith, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientRelationshipWith));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDoctorIncharge, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientDoctorIncharge));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDivison, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientDivison));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientPSOName, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientPSOName));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientReceivingStaff, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientReceivingStaff));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientReceivingStaffReceptionMO, SqlDbType.NVarChar, AppShared.ToDbValueNullable(receivingStaffReceptionMO));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMO, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientMO));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientProvisionalDiagnosis, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientProvisionalDiagnosis));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientCamePreviously, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientCamePreviously));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientBirthDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(patientBirthDate));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientSenderName, SqlDbType.NVarChar, AppShared.ToDbValueNullable(senderName));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientChiefComplaint, SqlDbType.NVarChar, AppShared.ToDbValueNullable(chiefComplaint));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientTypeOfCase, SqlDbType.NVarChar, AppShared.ToDbValueNullable(typeOfCase));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientHt, SqlDbType.NVarChar, AppShared.ToDbValueNullable(ht));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDm, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dm));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientIhd, SqlDbType.NVarChar, AppShared.ToDbValueNullable(ihd));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMajorIllness, SqlDbType.NVarChar, AppShared.ToDbValueNullable(majorIllness));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDrugAllergy, SqlDbType.NVarChar, AppShared.ToDbValueNullable(drugAllergy));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientPregnency, SqlDbType.NVarChar, AppShared.ToDbValueNullable(pregenency));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientBt, SqlDbType.NVarChar, AppShared.ToDbValueNullable(bt));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeTemperature, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimetemperature));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimePulse, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimePulse));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeRr, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimeRR));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeSpo2, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimeSpo2));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeBp, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimeBp));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeHr, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimeHr));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeRbs, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimeRbs));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeEcg, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimeEcg));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeOther, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimeOther));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeWeight, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimeWeight));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeHeight, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimeHeight));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientSystemicExamination, SqlDbType.NVarChar, AppShared.ToDbValueNullable(systemicExamination));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientRs, SqlDbType.NVarChar, AppShared.ToDbValueNullable(rs));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientCvs, SqlDbType.NVarChar, AppShared.ToDbValueNullable(cvs));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientCNS, SqlDbType.NVarChar, AppShared.ToDbValueNullable(cns));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientPa, SqlDbType.NVarChar, AppShared.ToDbValueNullable(pa));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientOther, SqlDbType.NVarChar, AppShared.ToDbValueNullable(other));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientSuggestedInvstigation, SqlDbType.NVarChar, AppShared.ToDbValueNullable(suggestedInvestigation));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientClinicalNote, SqlDbType.NVarChar, AppShared.ToDbValueNullable(clinicalNote));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAdmittedTimeTreatment, SqlDbType.NVarChar, AppShared.ToDbValueNullable(admittedTimeTreatment));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientOperationDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(operationDate));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientOperationTime, SqlDbType.NVarChar, AppShared.ToDbValueNullable(operationTime));

            #endregion

            #region mlcrelatedparameters

            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientIsMlc, SqlDbType.Bit, AppShared.ToDbValueNullable(isMlc));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMlcFormFillUpName, SqlDbType.NVarChar, AppShared.ToDbValueNullable(mlcFormFillupName));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMLCNo, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientMLCNo));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientEntryNo, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientEntryNo));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMarkOfIdentity, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientMarkOfIdentity));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientEventDetail, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientEventDetail));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientFetcherPersonName, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientFetcherPersonName));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientFetcherPersonFullAddress, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientFetcherPersonFullAddress));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientInformerStaffPerson, SqlDbType.NVarChar, AppShared.ToDbValueNullable(InformerStaffPerson));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientInformTime, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientInformTime));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientRelatedPoliceStation, SqlDbType.NVarChar, AppShared.ToDbValueNullable(RelatedPoliceStation));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientRelatedPoliceOfficer, SqlDbType.NVarChar, AppShared.ToDbValueNullable(RelatedPoliceOfficer));

            #endregion

            #region dischargerelatedparameters

            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientIsDischarge, SqlDbType.Bit, isDischarge);
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatiendDischargeDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(dischargeDate));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTime, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTime));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeBy, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeBy));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeStaffReception, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeStaffReception));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeStaffReceptionMO, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeStaffReceptionMO));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientInvoiceNo, SqlDbType.Int, AppShared.ToDbValueNullable(invoiceNo));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientInvoiceDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(invoiceDate));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientFinalDiagnosis, SqlDbType.NVarChar, AppShared.ToDbValueNullable(PatientFinalDiagnosis));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientConditionOnDischarge, SqlDbType.NVarChar, AppShared.ToDbValueNullable(conditionOnDischarge));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientTypeOfDischarge, SqlDbType.NVarChar, AppShared.ToDbValueNullable(typeOfDischarge));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeTemperature, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTypeTemperature));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimePulse, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimePulse));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeRr, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeRR));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeSpo2, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeSpo2));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeBp, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeBp));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeHr, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeHr));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeRbs, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeRbs));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeEcg, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeEcg));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeOther, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeOther));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeWeight, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeWeight));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeHeight, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeHeight));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeClinicalExamination, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeClinicalExamination));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeOperativeNote, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeOperativeNote));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeInvestigation, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeInvestigation));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeTreatment, SqlDbType.NVarChar, AppShared.ToDbValueNullable(dischargeTimeTreatment));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientDischargeTimeAdvice, SqlDbType.NVarChar, AppShared.ToDbValueNullable(advice));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientStatus, SqlDbType.NVarChar, AppShared.ToDbValueNullable(status));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMedicalOfficer, SqlDbType.NVarChar, AppShared.ToDbValueNullable(medicalOfficer));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMedicalOfficerDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(medicalOfficeDate));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientMedicalOfficerTime, SqlDbType.NVarChar, AppShared.ToDbValueNullable(medicalOfficeTime));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientIndoorNo, SqlDbType.NVarChar, AppShared.ToDbValueNullable(indoorno));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientBillNo, SqlDbType.NVarChar, AppShared.ToDbValueNullable(billno));

            #endregion

            #region otherFields

            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientNotes, SqlDbType.NVarChar, AppShared.ToDbValueNullable(notes));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientOperation, SqlDbType.NVarChar, AppShared.ToDbValueNullable(operation));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientFollowUpDate, SqlDbType.DateTime, AppShared.ToDbValueNullable(followUpDate));
            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientAmountReceived, SqlDbType.Decimal, AppShared.ToDbValueNullable(amount));

            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientOperationDateTime, SqlDbType.DateTime, AppShared.ToDbValueNullable(PatientOperationDateTime));

            #endregion

            AppDatabase.AddInParameter(cmd, Patient.Columns.PatientModifiedBy, SqlDbType.UniqueIdentifier, modifiedBy);
        }
 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 PatientVitalParameters(SqlCommand cmd, Guid Guid, Guid PatientGuid, DateTime VitalDate, string VitalTime, string Bp, string Hr, string Rr, string Temp, string Rbs, string Ecg, string Weight, string Height, string Other, string Spo2, string Pulse)
 {
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalGuid, SqlDbType.UniqueIdentifier, Guid);
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalPatientGuid, SqlDbType.UniqueIdentifier, PatientGuid);
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalDate, SqlDbType.DateTime, VitalDate);
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalTime, SqlDbType.NVarChar, AppShared.ToDbValueNullable(VitalTime));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalBP, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Bp));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalHR, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Hr));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalRR, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Rr));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalTemp, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Temp));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalRBS, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Rbs));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalECG, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Ecg));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalWeight, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Weight));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalHeight, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Height));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalOther, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Other));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalSPO2, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Spo2));
     AppDatabase.AddInParameter(cmd, PatientVital.Columns.PatientVitalPULSE, SqlDbType.NVarChar, AppShared.ToDbValueNullable(Pulse));
 }
 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 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 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);
 }
        internal static DataTable OPDAppointmentReport7Days(DateTime fromDate, DateTime toDate)
        {
            DataTable r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(OPDAppointment_Report7Days))
            {
                AppDatabase.AddInParameter(cmd, "@AppointmentDateFrom", SqlDbType.DateTime, AppShared.ToDbValueNullable(fromDate));
                AppDatabase.AddInParameter(cmd, "@AppointmentDateTo", SqlDbType.DateTime, AppShared.ToDbValueNullable(toDate));
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetDataTable(cmd);
                }
            }
            return(r);

            //return GetDataTable(OPDAppointment_Report7Days);
        }
 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);
 }
Exemple #21
0
        internal static bool UserUpdateWindowsUserName(Guid userGuid, string windowsUser)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(User_WindowsUserNameUpdate))
            {
                AppDatabase.AddInParameter(cmd, User.Columns.UserGuid, SqlDbType.UniqueIdentifier, userGuid);
                AppDatabase.AddInParameter(cmd, User.Columns.UserWindowsUserName, SqlDbType.NVarChar, AppShared.ToDbValueNullable(windowsUser));
                AppDatabase db = AppDAL.OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
 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);
 }