Ejemplo n.º 1
0
    protected void CboMSD_Init(object sender, EventArgs e)
    {
        ASPxComboBox CboMSD = (ASPxComboBox)sender;
        GridViewEditFormLayoutItemTemplateContainer templateContainer = (GridViewEditFormLayoutItemTemplateContainer)CboMSD.NamingContainer;

        CboMSD.ClientInstanceName = string.Format("cboMSD_{0}", templateContainer.VisibleIndex);
        CboMSD.Callback          += CboMSD_Callback;

        string str_msID  = templateContainer.Grid.GetRowValues(templateContainer.VisibleIndex, "MeasStatusID").ToString();
        string str_msdID = templateContainer.Grid.GetRowValues(templateContainer.VisibleIndex, "MeasStatusDetailID").ToString();


        CboMSD.DataSourceID = "sqlMSD2";
        CboMSD.TextField    = "MeasStatusDetail";
        CboMSD.ValueField   = "MeasStatusDetailID";

        int  msID; int msdID;
        bool msID_is_int = int.TryParse(str_msID, out msID);

        if (msID_is_int)
        {
            FillCboMSD(CboMSD, msID.ToString());
        }

        bool msdID_is_int = int.TryParse(str_msdID, out msdID);

        if (msdID_is_int)
        {
            CboMSD.Value = msdID;
        }
    }
    protected void cboSSD_Init(object sender, EventArgs e)
    {
        ASPxComboBox cboSSD = (ASPxComboBox)sender;
        GridViewEditFormLayoutItemTemplateContainer templateContainer = (GridViewEditFormLayoutItemTemplateContainer)cboSSD.NamingContainer;

        cboSSD.ClientInstanceName = string.Format("cboSSD_{0}", templateContainer.VisibleIndex);
        cboSSD.Callback          += cboSSD_Callback;

        string str_ssID  = templateContainer.Grid.GetRowValues(templateContainer.VisibleIndex, "ssID").ToString();
        string str_ssdID = templateContainer.Grid.GetRowValues(templateContainer.VisibleIndex, "ssdID").ToString();


        cboSSD.DataSourceID = "sqlSSD_by_SS";
        cboSSD.TextField    = "subjstatusdetail";
        cboSSD.ValueField   = "ssdID";


        int  ssID; int ssdID;
        bool ssID_is_int = int.TryParse(str_ssID, out ssID);

        if (ssID_is_int)
        {
            FillCboSSD(cboSSD, ssID.ToString());
        }

        bool ssdID_is_int = int.TryParse(str_ssdID, out ssdID);

        if (ssdID_is_int)
        {
            cboSSD.Value = ssdID;
        }
    }
Ejemplo n.º 3
0
    protected void popupTitle_OnInit(object sender, EventArgs e)
    {
        ASPxLabel popupTitle = (ASPxLabel)sender;
        GridViewEditFormLayoutItemTemplateContainer templateContainer = (GridViewEditFormLayoutItemTemplateContainer)popupTitle.NamingContainer;

        popupTitle.Text = DataBinder.Eval(templateContainer.DataItem, "timepoint_text").ToString() + " " +
                          DataBinder.Eval(templateContainer.DataItem, "StudyMeasName").ToString() + " for subject " +
                          DataBinder.Eval(templateContainer.DataItem, "ID").ToString();
    }
Ejemplo n.º 4
0
    protected void CountNumSelectedRecords(object sender, EventArgs e)
    {
        ASPxLabel lblNumSelected = (ASPxLabel)sender;         // gvM.FindEditFormLayoutItemTemplateControl("lblNumSelected");


        var           obj_selectedPKs = gvM.GetSelectedFieldValues("StudyMeasSubjID");
        List <string> selectedPKs     = new List <string>();

        foreach (var itm in obj_selectedPKs)
        {
            int i = (int)itm;
            selectedPKs.Add(i.ToString());
        }

        int sumPKs = selectedPKs.Sum(item => Convert.ToInt32(item));

        int num = gvM.GetSelectedFieldValues("StudyMeasSubjID").Count();


        GridViewEditFormLayoutItemTemplateContainer template = (GridViewEditFormLayoutItemTemplateContainer)lblNumSelected.NamingContainer;
        ASPxGridView gv = (ASPxGridView)template.Grid;

        ASPxCheckBox chkall = (ASPxCheckBox)gv.FindControlRecursive("chkUpdateAllSelected");

        if (selectedPKs.Contains(hidEditingPk.Value))
        {
            num = num - 1;
        }


        if (lblNumSelected != null & num > 0)
        {
            string adds = (num > 1) ? "s" : "";
            lblNumSelected.Text  = num.ToString() + " additional record" + adds;
            chkall.ClientVisible = true;
        }
        else
        {
            lblNumSelected.Text  = "";
            chkall.ClientVisible = false;

            //Hide the DoNotUpdate checkboxes if multiple records are not selected
            ASPxCheckBox DateCalendar_DoNotUpdate = (ASPxCheckBox)gv.FindControlRecursive("DateCalendar_DoNotUpdate");
            ASPxCheckBox CboMS_DoNotUpdate        = (ASPxCheckBox)gv.FindControlRecursive("CboMS_DoNotUpdate");
            ASPxCheckBox CboMSD_DoNotUpdate       = (ASPxCheckBox)gv.FindControlRecursive("CboMSD_DoNotUpdate");
            ASPxCheckBox CboClin_DoNotUpdate      = (ASPxCheckBox)gv.FindControlRecursive("CboClin_DoNotUpdate");
            ASPxCheckBox notesEditor_DoNotUpdate  = (ASPxCheckBox)gv.FindControlRecursive("notesEditor_DoNotUpdate");


            DateCalendar_DoNotUpdate.Visible = false;
            CboMS_DoNotUpdate.Visible        = false;
            CboMSD_DoNotUpdate.Visible       = false;
            CboClin_DoNotUpdate.Visible      = false;
            notesEditor_DoNotUpdate.Visible  = false;
        }
    }
Ejemplo n.º 5
0
    protected void CboClin_Init(object sender, EventArgs e)
    {
        ASPxComboBox CboClin = (ASPxComboBox)sender;
        GridViewEditFormLayoutItemTemplateContainer templateContainer = (GridViewEditFormLayoutItemTemplateContainer)CboClin.NamingContainer;

        CboClin.ClientInstanceName = string.Format("cboClin_{0}", templateContainer.VisibleIndex);
        //CboClin.ClientSideEvents.SelectedIndexChanged = string.Format("function(s, e) {{ OnSelectedIndexChanged(s, e, {0}); }}", templateContainer.VisibleIndex);

        CboClin.DataSourceID = "sqlStaff";
        CboClin.TextField    = "staffname";
        CboClin.ValueField   = "staffID";
        CboClin.DataBind();

        CboClin.Value = templateContainer.Grid.GetRowValues(templateContainer.VisibleIndex, "Clinician");
    }
Ejemplo n.º 6
0
    protected void CboMS_Init(object sender, EventArgs e)
    {
        ASPxComboBox CboMS = (ASPxComboBox)sender;
        //GridViewDataItemTemplateContainer templateContainer = (GridViewDataItemTemplateContainer)CboMS.NamingContainer;
        GridViewEditFormLayoutItemTemplateContainer templateContainer = (GridViewEditFormLayoutItemTemplateContainer)CboMS.NamingContainer;

        CboMS.ClientInstanceName = string.Format("cboMS_{0}", templateContainer.VisibleIndex);
        CboMS.ClientSideEvents.SelectedIndexChanged = string.Format("function(s, e) {{ OnSelectedIndexChanged(s, e, {0}); }}", templateContainer.VisibleIndex);

        CboMS.DataSourceID = "sqlMS";
        CboMS.TextField    = "MeasStatus";
        CboMS.ValueField   = "MeasStatusID";
        CboMS.DataBind();

        CboMS.Value = templateContainer.Grid.GetRowValues(templateContainer.VisibleIndex, "MeasStatusID");
    }
Ejemplo n.º 7
0
    protected void CountNumSelectedRecords(object sender, EventArgs e)
    {
        ASPxLabel lblNumSelected = (ASPxLabel)sender;         // gvM.FindEditFormLayoutItemTemplateControl("lblNumSelected");
        int       num            = gvM.GetSelectedFieldValues("StudyMeasSubjID").Count();
        GridViewEditFormLayoutItemTemplateContainer template = (GridViewEditFormLayoutItemTemplateContainer)lblNumSelected.NamingContainer;
        ASPxGridView gv = (ASPxGridView)template.Grid;

        ASPxCheckBox chkall = (ASPxCheckBox)gv.FindControlRecursive("chkUpdateAllSelected");

        if (lblNumSelected != null & num > 0)
        {
            lblNumSelected.Text  = num.ToString() + " records";
            chkall.ClientVisible = true;
        }
        else
        {
            lblNumSelected.Text  = "";
            chkall.ClientVisible = false;
        }
    }
Ejemplo n.º 8
0
    //protected void CboMS_Init(object sender, EventArgs e)
    //{
    //	ASPxComboBox CboMS = (ASPxComboBox)sender;
    //	//GridViewDataItemTemplateContainer templateContainer = (GridViewDataItemTemplateContainer)CboMS.NamingContainer;
    //	GridViewEditFormLayoutItemTemplateContainer templateContainer = (GridViewEditFormLayoutItemTemplateContainer)CboMS.NamingContainer;

    //	CboMS.ClientInstanceName = string.Format("cboMS_{0}", templateContainer.VisibleIndex);
    //	CboMS.ClientSideEvents.SelectedIndexChanged = string.Format("function(s, e) {{ OnSelectedIndexChanged(s, e, {0}); }}", templateContainer.VisibleIndex);

    //	CboMS.DataSourceID = "sqlMS";
    //	CboMS.TextField = "MeasStatus";
    //	CboMS.ValueField = "MeasStatusID";
    //	CboMS.DataBind();

    //	CboMS.Value = templateContainer.Grid.GetRowValues(templateContainer.VisibleIndex, "MeasStatusID");

    //}


    protected void CboAS_Init(object sender, EventArgs e)
    {
        ASPxComboBox CboAS = (ASPxComboBox)sender;
        GridViewEditFormLayoutItemTemplateContainer templateContainer = (GridViewEditFormLayoutItemTemplateContainer)CboAS.NamingContainer;

        CboAS.ClientInstanceName = string.Format("cboAS_{0}", templateContainer.VisibleIndex);
        CboAS.Callback          += CboAS_Callback;

        string str_actiontypeID = templateContainer.Grid.GetRowValues(templateContainer.VisibleIndex, "ActionTypeID").ToString();
        string str_asID         = templateContainer.Grid.GetRowValues(templateContainer.VisibleIndex, "ActionStatusID").ToString();


        CboAS.DataSourceID = "sqlAS_by_AT";
        CboAS.TextField    = "actionstatus";
        CboAS.ValueField   = "actionstatusID";

        int  actiontypeID;
        bool actiontypeID_is_int = int.TryParse(str_actiontypeID, out actiontypeID);

        if (actiontypeID_is_int)
        {
            FillCboAS(CboAS, actiontypeID.ToString());
        }
    }