Пример #1
0
 private void dgvMain_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == colClaim.Index)
     {
         if (e.RowIndex >= 0)
         {
             user_action_log ual = (user_action_log)dgvMain.Rows[e.RowIndex].Tag;
             if (CommonFunctions.DBNullToZero(ual["call_id"]) > 0)
             {
                 call toShow = new call(ual.call_id);
                 pnlShowCall.Visible = true;
                 ctlCallDisplay.DisplayCall(toShow);
                 lblCallInfo.Text    = toShow.operatordata + " " + toShow.created_on;
                 pnlShowCall.Visible = true;
             }
             else if (CommonFunctions.DBNullToZero(ual["claim_id"]) > 0)
             {
                 try
                 {
                     frmClaimManager toShow = new frmClaimManager(new claim(ual.claim_id));
                     toShow.Show();
                 }
                 catch {
                     MessageBox.Show(this, "An error occurred showing the selected claim.");
                 }
             }
         }
     }
 }
        void toAdd_RequestViewClaim(object sender, EventArgs e)
        {
            frmClaimManager toShow = new frmClaimManager(true, _currentClaims, ((ctlMultiClaimCallClaimDisplay)sender).LinkedClaim);

            toShow.ShowDialog();

            ((ctlMultiClaimCallClaimDisplay)sender).LoadClaim(toShow.FormClaim);
        }
Пример #3
0
 private void dgvMatches_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvMatches.SelectedRows.Count > 0)
     {
         frmClaimManager toShow = new frmClaimManager((claim)dgvMatches.SelectedRows[0].Cells[colClaimObject.Index].Value, true);
         toShow.Show();
     }
 }
Пример #4
0
        private void OpenSelectedClaim()
        {
            if (datResults.SelectedItems.Count == 1)
            {
                int claimID = Convert.ToInt32(((DataRowView)datResults.SelectedItem).Row["ID"]);

                frmClaimManager toShow;
                bool            found         = false;
                claim           selectedClaim = new claim(claimID);

                if (!found)
                {
                    bool readOnly = false;

                    // Double-check to verify the form isn't currently being edited by another user.
                    // If it is, give them the option to open it read-only, or to force full-access
                    List <user> usersViewingclaim = selectedClaim.UsersViewingClaim(true);
                    if (usersViewingclaim.Count > 0)
                    {
                        string userList = string.Empty;
                        foreach (user aUser in usersViewingclaim)
                        {
                            if (userList != string.Empty)
                            {
                                userList += "; ";
                            }
                            userList += aUser.username;
                        }

                        frmClaimInUseDialog frmInUse = new frmClaimInUseDialog(userList);
                        frmInUse.ShowDialog();

                        if (frmInUse.UserChoice == frmClaimInUseDialog.ClaimInUseChoice.DoNotOpen)
                        {
                            return;
                        }
                        else if (frmInUse.UserChoice == frmClaimInUseDialog.ClaimInUseChoice.OpenReadOnly)
                        {
                            readOnly = true;
                        }
                    }

                    List <claim> searchList = new List <claim>();

                    foreach (DataRowView anItem in datResults.Items)
                    {
                        searchList.Add(new claim(Convert.ToInt32(anItem.Row["ID"])));
                    }

                    toShow = new frmClaimManager(readOnly, searchList, selectedClaim);

                    if (readOnly)
                    {
                        ActiveUser.LogAction(ActiveUser.ActionTypes.ViewClaim, selectedClaim.id, "(Read Only) " + selectedClaim.PatientName);
                    }
                    else
                    {
                        ActiveUser.LogAction(ActiveUser.ActionTypes.ViewClaim, selectedClaim.id, selectedClaim.PatientName);
                    }

                    try
                    {
                        toShow.Left = 0;
                        toShow.Top  = 0;
                        toShow.Show();
                    }
                    catch (Exception err)
                    {
                        LoggingHelper.Log(err, false);
                    }
                }
            }
        }