protected void rdneworder_Click(object sender, EventArgs e)
        {
            //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadpharm", "parent.ShowLoading()", true);
            Session["IsFirstLoad"] = "true";
            Page        mp  = (Page)this.Parent.Page;
            PlaceHolder ph  = (PlaceHolder)mp.FindControl("phForms");
            UpdatePanel upt = (UpdatePanel)mp.FindControl("updtForms");

            Session["CurrentFormName"] = "frmPharmacyTouch";

            Touch.Custom_Forms.frmPharmacyTouch fr = (frmPharmacyTouch)mp.LoadControl("frmPharmacyTouch.ascx");
            Session["Orderid"] = 0;
            fr.ID = "ID" + Session["CurrentFormName"].ToString();
            frmVisitTouch theFrm = (frmVisitTouch)ph.FindControl("ID" + Session["CurrentFormName"].ToString());

            foreach (Control item in ph.Controls)
            {
                ph.Controls.Remove(item);
                //item.Visible = false;
            }

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                ph.Controls.Add(fr);
            }
            ph.DataBind();
            upt.Update();
            mp.ClientScript.RegisterStartupScript(mp.GetType(), "settabschild", "setTabs();");
        }
        protected void btnGoToVisit_Click(object sender, EventArgs e)
        {
            Session["FormIsLoaded"]    = null;
            Session["CurrentFormName"] = "frmVisitTouch";

            Touch.Custom_Forms.frmVisitTouch fr = (frmVisitTouch)Page.LoadControl("frmVisitTouch.ascx"); // new Touch.Custom_Forms.frmVisitTouch();
            fr.ID = "IDVisitForm";
            foreach (Control item in phForms.Controls)
            {
                phForms.Controls.Remove(item);
                //item.Visible = false;
            }
            frmVisitTouch theFrm = (frmVisitTouch)phForms.FindControl("IDVisitForm");

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                phForms.Controls.Add(fr);
            }
            phForms.DataBind();
            updtForms.Update();
            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "settabs", "setTabs();", true);
        }
Esempio n. 3
0
        protected void rdneworder_Click(object sender, EventArgs e)
        {
            //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadpharm", "parent.ShowLoading()", true);
            Session["IsFirstLoad"] = "true";
            Page        mp  = (Page)this.Parent.Page;
            PlaceHolder ph  = (PlaceHolder)mp.FindControl("phForms");
            UpdatePanel upt = (UpdatePanel)mp.FindControl("updtForms");

            Session["CurrentFormName"] = "frmPharmacyTouch";
            Session["Refill"]          = "0";
            Session["Visit_id"]        = "0";
            Touch.Custom_Forms.frmPharmacyTouch fr = (frmPharmacyTouch)mp.LoadControl("~/Touch/Custom Forms/frmPharmacyTouch.ascx");
            Session["Orderid"] = 0;
            Session["Mode"]    = "newARV";
            fr.ID = "ID" + Session["CurrentFormName"].ToString();
            frmVisitTouch theFrm = (frmVisitTouch)ph.FindControl("ID" + Session["CurrentFormName"].ToString());

            // Handle Save button
            HiddenField Phf  = (HiddenField)mp.FindControl("hdSaveBtnVal");
            UpdatePanel updt = (UpdatePanel)mp.FindControl("updtPatientSave");

            Phf.Value = fr.ID + "_btnSave_input";
            updt.Update();
            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "shwSve", "$('#divSave').css('display', 'block');", true);

            // END

            foreach (Control item in ph.Controls)
            {
                ph.Controls.Remove(item);
                //item.Visible = false;
                //if (item.ID == "ID" + Session["CurrentFormName"].ToString())
                //{
                //    item.Visible = true;
                //}
                //item.Visible = false;
            }

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                ph.Controls.Add(fr);
            }
            //ph.DataBind();
            upt.Update();
            mp.ClientScript.RegisterStartupScript(mp.GetType(), "settabschild", "setTabs();");
        }
        protected void rgviewpharmacyform_ItemCommand(object sender, GridCommandEventArgs e)
        {
            GridDataItem item1      = (GridDataItem)e.Item;
            string       strOrderID = item1.GetDataKeyValue("OrderID").ToString();
            string       strrefill  = item1["NextAction"].Text;

            Session["Refill"]   = strrefill;
            Session["Visit_id"] = item1["visitid"].Text.ToString();

            //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadpharm", "parent.ShowLoading()", true);
            Session["IsFirstLoad"] = "true";
            Page        mp  = (Page)this.Parent.Page;
            PlaceHolder ph  = (PlaceHolder)mp.FindControl("phForms");
            UpdatePanel upt = (UpdatePanel)mp.FindControl("updtForms");

            Session["CurrentFormName"] = "frmPharmacyTouch";

            Touch.Custom_Forms.frmPharmacyTouch fr = (frmPharmacyTouch)mp.LoadControl("~/Touch/Custom Forms/frmPharmacyTouch.ascx");
            Session["Orderid"] = Convert.ToInt32(strOrderID);
            fr.ID = "ID" + Session["CurrentFormName"].ToString();
            frmVisitTouch theFrm = (frmVisitTouch)ph.FindControl("ID" + Session["CurrentFormName"].ToString());

            // Handle Save button
            HiddenField Phf  = (HiddenField)mp.FindControl("hdSaveBtnVal");
            UpdatePanel updt = (UpdatePanel)mp.FindControl("updtPatientSave");

            Phf.Value = fr.ID + "_btnSave_input";
            updt.Update();
            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "shwSve", "$('#divSave').css('display', 'block');", true);

            // END
            foreach (Control item in ph.Controls)
            {
                ph.Controls.Remove(item);
                //item.Visible = false;
            }

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                ph.Controls.Add(fr);
            }
            //ph.DataBind();
            upt.Update();
            mp.ClientScript.RegisterStartupScript(mp.GetType(), "settabschild", "setTabs();");
        }
        protected void rgviewpharmacyform_ItemCommand(object sender, GridCommandEventArgs e)
        {
            GridDataItem item1      = (GridDataItem)e.Item;
            string       strOrderID = item1.GetDataKeyValue("OrderID").ToString();

            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadpharm", "parent.ShowLoading()", true);
            Session["IsFirstLoad"] = "true";
            Page        mp  = (Page)this.Parent.Page;
            PlaceHolder ph  = (PlaceHolder)mp.FindControl("phForms");
            UpdatePanel upt = (UpdatePanel)mp.FindControl("updtForms");

            Session["CurrentFormName"] = "frmPharmacyTouch";

            frmPharmacyTouch fr = (frmPharmacyTouch)mp.LoadControl("frmPharmacyTouch.ascx");

            Session["Orderid"] = Convert.ToInt32(strOrderID);
            fr.ID = "ID" + Session["CurrentFormName"].ToString();
            frmVisitTouch theFrm = (frmVisitTouch)ph.FindControl("ID" + Session["CurrentFormName"].ToString());

            foreach (Control item in ph.Controls)
            {
                ph.Controls.Remove(item);
                //item.Visible = false;
            }

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                ph.Controls.Add(fr);
            }
            ph.DataBind();
            upt.Update();
            mp.ClientScript.RegisterStartupScript(mp.GetType(), "settabschild", "setTabs();");
        }