예제 #1
0
    protected void btn_save_Click(object sender, EventArgs e)
    {
        IPatientARTCare ACManager;

        ACManager  = (IPatientARTCare)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientARTCare, BusinessProcess.Clinical");
        LocationID = Convert.ToInt32(Session["AppLocationId"]);
        PatientID  = Convert.ToInt32(Session["PatientId"]);
        DataTable theCustomDataDT = null;

        if ((Convert.ToInt32(Session["PatientVisitId"]) > 0))
        {
            visitPK = Convert.ToInt32(Session["PatientVisitId"]);

            CustomFieldClinical theCustomManager = new CustomFieldClinical();
            theCustomDataDT = theCustomManager.GenerateInsertUpdateStatement(pnlCustomList, "Update", ApplicationAccess.PriorARTHIVCare, (DataSet)ViewState["CustomFieldsDS"]);
        }
        else
        {
            CustomFieldClinical theCustomManager = new CustomFieldClinical();
            theCustomDataDT = theCustomManager.GenerateInsertUpdateStatement(pnlCustomList, "Insert", ApplicationAccess.PriorARTHIVCare, (DataSet)ViewState["CustomFieldsDS"]);
        }
        Hashtable htparam = ArtCareParameters();

        ACManager.Save_Update_ARTCare(PatientID, visitPK, LocationID, htparam, Convert.ToInt32(Session["AppUserId"]), 0, theCustomDataDT);
        SaveCancel();
    }
예제 #2
0
        public void Execute(Message message, string name)
        {
            string old = ACManager.GetACSerialName();

            if (ACManager.SetACSerialName(name))
            {
                message.Reply("Changed AC Serial name from: \"" + old + "\" to: \"" + name + "\".");
            }
            else
            {
                message.Reply("New name rejected!");
            }
        }
예제 #3
0
 public void Execute(Message message, string onoff, int temp, ACPower level)
 {
     if (onoff.Equals("on") || onoff.Equals("off"))
     {
         LastUsedAttr = new ACAttr(onoff.Equals("on"), temp, level);
         if (ACManager.SendAC(LastUsedAttr.temp, LastUsedAttr.power, LastUsedAttr.level))
         {
             message.Reply("Transmitted!");
         }
         else
         {
             message.Reply("An error occurred while transmitting!");
         }
     }
     else
     {
         message.Reply("Usage: /ac [on/off] {temp} {low/med/high/auto/turbo}");
     }
 }
예제 #4
0
 public void Execute(Message message, string onoff)
 {
     if (onoff.Equals("on") || onoff.Equals("off"))
     {
         ACAttr att = new ACAttr(LastUsedAttr, onoff.Equals("on"));
         if (ACManager.SendAC(att.temp, att.power, att.level))
         {
             message.Reply("Transmitted!");
         }
         else
         {
             message.Reply("An error occurred while transmitting!");
         }
     }
     else
     {
         message.Reply("Usage: /ac [on/off]");
     }
 }
예제 #5
0
    protected void DQ_Check_Click(object sender, EventArgs e)
    {
        if (Validate_Data_Quality() == false)
        {
            return;
        }
        string msg = DataQuality_Msg();

        if (msg.Length > 69)
        {
            MsgBuilder theBuilder1 = new MsgBuilder();
            theBuilder1.DataElements["MessageText"] = msg;
            IQCareMsgBox.Show("#C1", theBuilder1, this);
            return;
        }
        else
        {
            IPatientARTCare ACManager;
            ACManager  = (IPatientARTCare)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientARTCare, BusinessProcess.Clinical");
            LocationID = Convert.ToInt32(Session["AppLocationId"]);
            PatientID  = Convert.ToInt32(Session["PatientId"]);
            DataTable theCustomDataDT = null;
            if ((Convert.ToInt32(Session["PatientVisitId"]) > 0))
            {
                visitPK = Convert.ToInt32(Session["PatientVisitId"]);
                CustomFieldClinical theCustomManager = new CustomFieldClinical();
                theCustomDataDT = theCustomManager.GenerateInsertUpdateStatement(pnlCustomList, "Update", ApplicationAccess.PriorARTHIVCare, (DataSet)ViewState["CustomFieldsDS"]);
            }
            else
            {
                CustomFieldClinical theCustomManager = new CustomFieldClinical();
                theCustomDataDT = theCustomManager.GenerateInsertUpdateStatement(pnlCustomList, "Insert", ApplicationAccess.PriorARTHIVCare, (DataSet)ViewState["CustomFieldsDS"]);
            }
            Hashtable htparam = ArtCareParameters();
            ACManager.Save_Update_ARTCare(PatientID, visitPK, LocationID, htparam, Convert.ToInt32(Session["AppUserId"]), 1, theCustomDataDT);
            SaveCancel();
        }
    }
예제 #6
0
 public override void Execute(Message message)
 {
     message.Reply("Current Serial name: " + ACManager.GetACSerialName());
 }