コード例 #1
0
    /// <summary>
    /// event
    /// US:838
    /// assigns the selected checklist to the selected patients
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnAssignChecklist(object sender, EventArgs e)
    {
        if (ChecklistID < 1)
        {
            Master.ShowStatusInfo(k_STATUS_CODE.Failed, Resources.ErrorMessages.ERROR_AC_CLID);
            return;
        }

        PatientIDs = CGridView.GetCheckedRows(
            gvPatients,
            "chkSelect");

        string[] astrPatientIDs = PatientIDs.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
        if (astrPatientIDs.Count() < 1)
        {
            Master.ShowStatusInfo(k_STATUS_CODE.Failed, Resources.ErrorMessages.ERROR_AC_NONESEL);
            return;
        }

        ucExistingChecklist.ChecklistID = ChecklistID;
        ucExistingChecklist.PatientIDs  = PatientIDs;
        CStatus status = ucExistingChecklist.LoadControl(k_EDIT_MODE.READ_ONLY);

        if (!status.Status)
        {
            Master.ShowStatusInfo(status);
            return;
        }
    }
コード例 #2
0
    public override CStatus SaveControl()
    {
        //get the checked temporal states
        string strTSIDs = CGridView.GetCheckedRows(
            gvTS,
            "chkSelect");

        long lTSCount = strTSIDs.Split(',').Count();

        //save the temporal states
        CChecklistItemData itm    = new CChecklistItemData(BaseMstr.BaseData);
        CStatus            status = itm.SaveTemporalStates(
            ChecklistID,
            ChecklistItemID,
            strTSIDs,
            lTSCount);

        if (!status.Status)
        {
            ShowStatusInfo(status);
            ShowMPE();
            return(status);
        }

        return(new CStatus());
    }
コード例 #3
0
    /// <summary>
    /// event
    /// US:931
    /// sorts the page's gridview with respect to the clicked column in asc/desc order
    /// the first time a column is clicked the gridview is sorted in asc order
    /// if the column is clicked twice in a row the gridview is sorted in desc order
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnSortingPat(object sender, GridViewSortEventArgs e)
    {
        PatientIDs = CGridView.GetCheckedRows(
            gvPatients,
            "chkSelect");

        if (SortExpression == e.SortExpression)
        {
            SortDirection = (SortDirection == SortDirection.Ascending) ? SortDirection.Descending : SortDirection.Ascending;
        }
        else
        {
            SortExpression = e.SortExpression;
            SortDirection  = SortDirection.Ascending;
        }

        DataView dv = ucPatientLookup.PatientDataTable.DefaultView;

        dv.Sort = SortExpression + ((SortDirection == SortDirection.Ascending) ? " ASC" : " DESC");
        ucPatientLookup.PatientDataTable = dv.ToTable();

        RebindAndCheck();
    }
コード例 #4
0
    /// <summary>
    /// event
    /// US:931
    /// sorts the page's gridview with respect to the clicked column in asc/desc order
    /// the first time a column is clicked the gridview is sorted in asc order
    /// if the column is clicked twice in a row the gridview is sorted in desc order
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void OnSortingTS(object sender, GridViewSortEventArgs e)
    {
        ShowMPE();
        TemporalStateIDs = CGridView.GetCheckedRows(
            gvTS,
            "chkSelect");

        if (SortExpression == e.SortExpression)
        {
            SortDirection = (SortDirection == SortDirection.Ascending) ? SortDirection.Descending : SortDirection.Ascending;
        }
        else
        {
            SortExpression = e.SortExpression;
            SortDirection  = SortDirection.Ascending;
        }

        DataView dv = TemporalStates.DefaultView;

        dv.Sort        = SortExpression + ((SortDirection == SortDirection.Ascending) ? " ASC" : " DESC");
        TemporalStates = dv.ToTable();

        RebindAndCheck();
    }