public void SetRate(int p_oid, double p_rate) { /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Medication_setRate) ENABLED START*/ // Write here your custom code... MedicationCAD medicationCAD = new MedicationCAD(); MedicationCEN medicationCEN = new MedicationCEN(medicationCAD); if (p_oid > 0) { MedicationEN medication = medicationCEN.ReadOID(p_oid); if (medication != null) { if (p_rate >= 0) { medication.Rate = p_rate; medicationCAD.Modify(medication); } } } /*PROTECTED REGION END*/ }
public void SetDosage(int p_oid, string p_dosage) { /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Medication_setDosage) ENABLED START*/ // Write here your custom code... MedicationCAD medicationCAD = new MedicationCAD(); MedicationCEN medicationCEN = new MedicationCEN(medicationCAD); if (p_oid > 0) { MedicationEN medication = medicationCEN.ReadOID(p_oid); if (medication != null) { if (!string.IsNullOrEmpty(p_dosage)) { medication.Dosage = p_dosage; medicationCAD.Modify(medication); } } } /*PROTECTED REGION END*/ }
public void SetStatus(int p_oid, ChroniGenNHibernate.Enumerated.Chroni.MedicationStatusEnum p_status) { /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Medication_setStatus) ENABLED START*/ // Write here your custom code... MedicationCAD medicationCAD = new MedicationCAD(); MedicationCEN medicationCEN = new MedicationCEN(medicationCAD); if (p_oid > 0) { MedicationEN medication = medicationCEN.ReadOID(p_oid); if (medication != null) { if (p_status > 0) { medication.Status = p_status; medicationCAD.Modify(medication); } } } /*PROTECTED REGION END*/ }