Exemple #1
0
        /// <summary>
        /// 修改派出所信息
        /// </summary>
        /// <param name="vid"></param>
        /// <returns></returns>
        public int UPdatePoliceInfo(PoliceInfo policeInfo)
        {
            string sql = "";

            try
            {
                sql = "UPDATE PoliceInfo SET [Name] = @Name,Mobile = @Mobile,Address = @Address,Contact = @Contact,PoliceInfo_code=@PoliceInfo_code WHERE ID = @Id";
                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@Id", policeInfo.ID),
                    new SqlParameter("@Name", policeInfo.Name),
                    new SqlParameter("@Address", policeInfo.Address),
                    new SqlParameter("@Contact", policeInfo.Contact),
                    new SqlParameter("@Mobile", policeInfo.Mobile),
                    new SqlParameter("@PoliceInfo_code", policeInfo.PoliceInfo_code)
                };
                return(SqlHelper.ExecuteNonQuery(SqlHelper.DBConnStr, CommandType.Text, sql, param));
            }
            catch (Exception ex)
            {
                Logger.ErrorLog(ex, new Dictionary <string, string>()
                {
                    { "Function", "PoliceDAL.UPdatePolice(PoliceInfo police)" },
                    { "SQL", sql }
                });
                throw ex;
            }
        }
Exemple #2
0
        /// <summary>
        /// 添加派出所
        /// </summary>
        /// <param name="Police"></param>
        /// <returns></returns>
        public int InsertPoliceInfo(PoliceInfo PoliceInfo)
        {
            string sql     = "";
            string strGUID = System.Guid.NewGuid().ToString().ToUpper();

            try
            {
                sql = "INSERT INTO PoliceInfo(CreateTime,[Name],Aid,Address,Mobile,Contact,Valid,PoliceInfo_code,Pguid)VALUES(@CreateTime,@Name,@Aid,@Address,@Mobile,@Contact,1,@PoliceInfo_code,@Pguid)";
                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@CreateTime", PoliceInfo.CreateTime),
                    new SqlParameter("@Aid", PoliceInfo.Aid),
                    new SqlParameter("@Address", PoliceInfo.Address),
                    new SqlParameter("@Contact", PoliceInfo.Contact),
                    new SqlParameter("@Name", PoliceInfo.Name),
                    new SqlParameter("@Mobile", PoliceInfo.Mobile),
                    new SqlParameter("@PoliceInfo_code", PoliceInfo.PoliceInfo_code),
                    new SqlParameter("@Pguid", strGUID)
                };
                return(SqlHelper.ExecuteNonQuery(SqlHelper.DBConnStr, CommandType.Text, sql, param));
            }
            catch (Exception ex)
            {
                Logger.ErrorLog(ex, new Dictionary <string, string>()
                {
                    { "Function", "SystemDAL.InsertPoliceInfo(PoliceInfo PoliceInfo)" },
                    { "SQL", sql }
                });
                throw ex;
            }
        }
Exemple #3
0
        /// <summary>
        /// 경찰의 초기 위치를 설정하여 반환합니다.
        /// </summary>
        /// <param name="baseMap">처음 맵의 상태</param>
        /// <returns>처음 경찰의 위치</returns>
        public override PoliceInfo[] InitialPolicePos(TileType[,] baseMap)
        {
            PoliceInfo[] pos = new PoliceInfo[6];
            for (int i = 0; i < 6; i++)
            {
                pos[i] = new PoliceInfo();
            }

            //-------------------------------
            //
            // 이 부분을 구현해 주시면 됩니다.
            // (MoveAngle) PoliceInfo.angle : 바라보는 방향
            // (Vector2) PoliceInfo.mapPos : 맵 상 좌표
            //
            //-------------------------------

            return pos;
        }
        public override PoliceInfo[] InitialPolicePos(TileType[,] baseMap)
        {
            PoliceInfo[] pos = new PoliceInfo[6];
            for (int i = 0; i < 6; i++)
            {
                pos[i] = new PoliceInfo();
            }

            pos[0].mapPos = new Vector2(1, 3);
            pos[1].mapPos = new Vector2(1, 3);
            pos[2].mapPos = new Vector2(1, 3);
            pos[3].mapPos = new Vector2(1, 3);
            pos[4].mapPos = new Vector2(1, 3);
            pos[5].mapPos = new Vector2(1, 3);

            pos[0].angle = MoveAngle.Up;
            pos[1].angle = MoveAngle.Up;
            pos[2].angle = MoveAngle.Up;
            pos[3].angle = MoveAngle.Up;
            pos[4].angle = MoveAngle.Up;
            pos[5].angle = MoveAngle.Up;

            return(pos);
        }
Exemple #5
0
        private void buttonSubmit_Click(object sender, EventArgs e)
        {
            DialogResult dgr = DialogResult.Retry;

            //Check that the officer first name, officer last name, badge number,
            //agency, phone area code, phone number, request type, reason for hold
            //and eleigible for release is entered
            if (customTextBoxAgency.isValid && customTextBoxBadgeNumber.isValid &&
                customTextBoxOfficerFirstName.isValid && customTextBoxOfficerLastName.isValid &&
                customTextBoxPhoneAreaCode.isValid && customTextBoxPhoneNumber.isValid &&
                comboBoxReqType.SelectedItem != null &&
                richTextBoxReason.Text.Trim().Length > 0 &&
                dateCalendarRelease.SelectedDate != string.Empty)
            {
                _formValid = true;
            }
            else
            {
                _formValid = false;
            }
            if (_formValid)
            {
                do
                {
                    if (policeHolds.Count > 0)
                    {
                        //Continue with Hold if there are any transactions to put on Hold
                        bool returnValue = HoldsProcedures.AddPoliceHolds(policeHolds, this.richTextBoxReason.Text,
                                                                          Utilities.GetDateTimeValue(
                                                                              this.dateCalendarRelease.SelectedDate,
                                                                              DateTime.MaxValue), this.customTextBoxOfficerFirstName.Text,
                                                                          customTextBoxOfficerLastName.Text, customTextBoxBadgeNumber.Text,
                                                                          customTextBoxPhoneAreaCode.Text,
                                                                          customTextBoxPhoneExt.Text,
                                                                          customTextBoxPhoneNumber.Text,
                                                                          comboBoxReqType.Text,
                                                                          customTextBoxCaseNumber.Text,
                                                                          customTextBoxAgency.Text);
                        if (returnValue)
                        {
                            var policeInfo = new PoliceInfo
                            {
                                Agency           = customTextBoxAgency.Text,
                                BadgeNumber      = customTextBoxBadgeNumber.Text,
                                CaseNumber       = customTextBoxCaseNumber.Text,
                                OfficerFirstName = customTextBoxOfficerFirstName.Text,
                                OfficerLastName  = customTextBoxOfficerLastName.Text,
                                PhoneAreaCode    = customTextBoxPhoneAreaCode.Text,
                                PhoneExtension   = customTextBoxPhoneExt.Text,
                                PhoneNumber      = customTextBoxPhoneNumber.Text,
                                RequestType      = comboBoxReqType.Text
                            };
                            foreach (var policehold in policeHolds)
                            {
                                policehold.PoliceInformation = policeInfo;
                                policehold.HoldComment       = richTextBoxReason.Text;
                                policehold.ReleaseDate       = Utilities.GetDateTimeValue(
                                    this.dateCalendarRelease.SelectedDate,
                                    DateTime.MaxValue);
                            }
                            //Call print Police seize form if print is enabled
                            if (SecurityAccessor.Instance.EncryptConfig.ClientConfig.ClientConfiguration.PrintEnabled)
                            {
                                var phFrm = new PoliceHoldform();
                                phFrm.PoliceHoldLoans = policeHolds;
                                phFrm.ShowDialog();
                            }
                            MessageBox.Show("Selected transactions placed on police hold successfully");
                            break;
                        }
                        else
                        {
                            dgr = MessageBox.Show(Commons.GetMessageString("ProcessingError"), "Error",
                                                  MessageBoxButtons.RetryCancel);
                        }
                    }
                    else //no holds to do
                    {
                        dgr = DialogResult.Cancel;
                    }
                }while (dgr == DialogResult.Retry);
                this.NavControlBox.Action = NavBox.NavAction.BACKANDSUBMIT;
            }
            else
            {
                MessageBox.Show(Commons.GetMessageString("FormErrorSubmitAgain"));
                return;
            }
        }
        /// <summary>
        /// 获取所有警车信息
        /// </summary>
        /// <returns></returns>
        public List <PoliceInfo> GetAllPoliceCarInfo()
        {
            List <PoliceInfo> list = new List <PoliceInfo>();
            String            sql  =
                "select GPSID,LOCTYPE,POLICETYPEID,UIM,CARNO,CZTID,FZR,LXFS,SSSJMC,SSFJMC,SSDWMC,POLICEID,POLICENAME,CALLNO,REMARK,SFBDHM from PGIS_DWXX.T_GPS_INFO_DZSP";

            try
            {
                using (OleDbConnection conn = new OleDbConnection(policeCarDBConnectBuilder.ConnectionString))
                {
                    //15个字段

                    conn.Open();
                    OleDbCommand    cmd    = new OleDbCommand(sql, conn);
                    OleDbDataReader reader = cmd.ExecuteReader();

                    while (reader.Read())
                    {
                        PoliceInfo info = new PoliceInfo();
                        //GPSID
                        if (!reader.IsDBNull(0))
                        {
                            info.GpsId = reader[0].ToString();
                        }
                        //LOCTYPE
                        if (!reader.IsDBNull(1))
                        {
                            info.LocType = Convert.ToInt32(reader[1].ToString());
                        }
                        //POLICETYPEID
                        if (!reader.IsDBNull(2))
                        {
                            info.PatrolType = reader[2].ToString();
                        }
                        //UIM
                        if (!reader.IsDBNull(3))
                        {
                            info.UIM = reader[3].ToString();
                        }
                        //CARNO
                        if (!reader.IsDBNull(4))
                        {
                            info.CarPlateNum = reader[4].ToString();
                        }
                        //350MCZTID
                        if (!reader.IsDBNull(5))
                        {
                            info.CarCallNum = reader[5].ToString();
                        }
                        //FZR
                        if (!reader.IsDBNull(6))
                        {
                            info.Responser = reader[6].ToString();
                        }
                        //LXFS
                        if (!reader.IsDBNull(7))
                        {
                            info.ResponserPhoneNo = reader[7].ToString();
                        }
                        //SSSJMC
                        if (!reader.IsDBNull(8))
                        {
                            info.CarSJUnit = reader[8].ToString();
                        }
                        //SSFJMC
                        if (!reader.IsDBNull(9))
                        {
                            info.CarFJUnit = reader[9].ToString();
                        }
                        //SSDWMC
                        if (!reader.IsDBNull(10))
                        {
                            info.CarUnit = reader[10].ToString();
                        }
                        //POLICEID
                        if (!reader.IsDBNull(11))
                        {
                            info.PoliceId = reader[11].ToString();
                        }
                        //POLICENAME
                        if (!reader.IsDBNull(12))
                        {
                            info.PoliceName = reader[12].ToString();
                        }
                        //CALLNO
                        if (!reader.IsDBNull(13))
                        {
                            info.PhoneNo = reader[13].ToString();
                        }
                        //REMARK
                        if (!reader.IsDBNull(14))
                        {
                            info.Remark = reader[14].ToString();
                        }
                        //SFBDHM
                        if (!reader.IsDBNull(15))
                        {
                            info.CarChannel = reader[15].ToString();
                        }
                        list.Add(info);
                        //LogManage.InfoLog(typeof(int), "警车总数:" + list.Count);
                    } //end while
                }     //end using
            }
            catch (Exception ex)
            {
                LogMgr.Instance.Error(String.Format("执行警车查询失败,SQL:{0}", sql), ex);
                //LogManage.ErrorLog("日志记录", ex);
            }

            return(list);
        }
Exemple #7
0
        private void buttonSubmit_Click(object sender, EventArgs e)
        {
            bool         returnValue = false;
            DialogResult dgr         = DialogResult.Retry;

            //Release police hold
            if (!PoliceSeize && !ReleaseToClaimant)
            {
                do
                {
                    if (!customTextBoxAgency.isValid || !customTextBoxBadgeNumber.isValid ||
                        !customTextBoxOfficerFirstName.isValid || !customTextBoxOfficerLastName.isValid ||
                        !customTextBoxPhoneAreaCode.isValid || !customTextBoxPhoneNumber.isValid ||
                        richTextBoxReason.Text.Trim().Length <= 0)
                    {
                        MessageBox.Show("Please enter all the required fields and submit");
                        return;
                    }
                    returnValue = HoldsProcedures.RemovePoliceHolds(policeHolds, this.richTextBoxReason.Text,
                                                                    customTextBoxOfficerFirstName.Text,
                                                                    customTextBoxOfficerLastName.Text,
                                                                    customTextBoxBadgeNumber.Text,
                                                                    customTextBoxAgency.Text,
                                                                    customTextBoxCaseNumber.Text,
                                                                    customTextBoxPhoneAreaCode.Text,
                                                                    customTextBoxPhoneNumber.Text,
                                                                    customTextBoxPhoneExt.Text);
                    if (returnValue)
                    {
                        MessageBox.Show("selected transactions released from police hold successfully");
                        break;
                    }
                    else
                    {
                        dgr = MessageBox.Show(Commons.GetMessageString("ProcessingError"), "Error", MessageBoxButtons.RetryCancel);
                    }
                }while (dgr == DialogResult.Retry);
            }
            //Process police seize
            if (PoliceSeize)
            {
                if (!customTextBoxAgency.isValid || !customTextBoxBadgeNumber.isValid ||
                    !customTextBoxOfficerFirstName.isValid || !customTextBoxOfficerLastName.isValid ||
                    !customTextBoxPhoneAreaCode.isValid || !customTextBoxPhoneNumber.isValid ||
                    richTextBoxReason.Text.Trim().Length <= 0 || !customTextBoxCaseNumber.isValid)
                {
                    MessageBox.Show("Please enter all the required fields and submit");
                    return;
                }
                CustomerVO currentCustomer = GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer;
                foreach (HoldData policeHold in policeHolds)
                {
                    policeHold.HoldComment = richTextBoxReason.Text;
                }
                PoliceInfo policeInfo = new PoliceInfo
                {
                    Agency           = customTextBoxAgency.Text,
                    BadgeNumber      = customTextBoxBadgeNumber.Text,
                    CaseNumber       = customTextBoxCaseNumber.Text,
                    OfficerFirstName = customTextBoxOfficerFirstName.Text,
                    OfficerLastName  = customTextBoxOfficerLastName.Text,
                    PhoneAreaCode    = customTextBoxPhoneAreaCode.Text,
                    PhoneExtension   = customTextBoxPhoneExt.Text,
                    PhoneNumber      = customTextBoxPhoneNumber.Text,
                    RequestType      = ""
                };

                do
                {
                    int seizeNumber = 0;

                    returnValue = HoldsProcedures.AddPoliceSeize(
                        policeHolds, policeHolds[0].HoldComment,
                        policeInfo, currentCustomer, out seizeNumber);
                    if (returnValue && seizeNumber > 0)
                    {
                        policeInfo.SeizeNumber = seizeNumber;
                        ReceiptDetailsVO rDVO = new ReceiptDetailsVO();
                        if (!HoldsProcedures.insertPoliceReceipt(policeHolds, ref rDVO))
                        {
                            FileLogger.Instance.logMessage(LogLevel.ERROR, null, "Receipt details could not be entered for police seize " + seizeNumber);
                        }

                        MessageBox.Show("Selected items police seized successfully");
                        //Print police seize document
                        foreach (HoldData policehold in policeHolds)
                        {
                            policehold.PoliceInformation = policeInfo;
                        }
                        //Call print Police seize form if print is enabled
                        if (SecurityAccessor.Instance.EncryptConfig.ClientConfig.ClientConfiguration.PrintEnabled)
                        {
                            //PoliceSeizeform seizeFrm = new PoliceSeizeform();
                            //seizeFrm.PoliceSeizeLoans = policeHolds;
                            //seizeFrm.ShowDialog();

                            //Calling policeseizereport(Itextsharp) instead of bitmap(policeseizeform) calling
                            var policeseizereport = new Reports.PoliceSeizeReport();
                            var reportObject      = new ReportObject();
                            reportObject.ReportTempFileFullName      = SecurityAccessor.Instance.EncryptConfig.ClientConfig.GlobalConfiguration.BaseLogPath + "\\Police Seize" + DateTime.Now.ToString("MMddyyyyhhmmssFFFFFFF") + ".pdf";
                            policeseizereport.reportObject           = reportObject;
                            policeseizereport.ReportTempFileFullName = reportObject.ReportTempFileFullName;
                            policeseizereport.STORE_NAME             = GlobalDataAccessor.Instance.CurrentSiteId.StoreName;
                            policeseizereport.STORE_ADDRESS          = GlobalDataAccessor.Instance.CurrentSiteId.StoreAddress1;
                            policeseizereport.STORE_CITY             = GlobalDataAccessor.Instance.CurrentSiteId.StoreCityName;
                            policeseizereport.STORE_STATE            = GlobalDataAccessor.Instance.CurrentSiteId.State;
                            policeseizereport.STORE_ZIP       = GlobalDataAccessor.Instance.CurrentSiteId.StoreZipCode;
                            policeseizereport.CurrentCust     = GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer;
                            policeseizereport.EmpNo           = GlobalDataAccessor.Instance.DesktopSession.UserName.ToLowerInvariant();
                            policeseizereport.TransactionDate = ShopDateTime.Instance.ShopDate.FormatDate();
                            policeseizereport.HoldData        = policeHolds[0];
                            policeseizereport.CustHomeAddr    = GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer.CustomerAddress[0];
                            policeseizereport.CreateReport();
                            string strReturnMessage;
                            if (GlobalDataAccessor.Instance.DesktopSession.PDALaserPrinter.IsValid)
                            {
                                if (FileLogger.Instance.IsLogInfo)
                                {
                                    FileLogger.Instance.logMessage(LogLevel.INFO, this, "Printing PoliceSeize report on PDA Laser printer: {0}",
                                                                   GlobalDataAccessor.Instance.DesktopSession.PDALaserPrinter);
                                }
                                strReturnMessage = PrintingUtilities.printDocument(
                                    reportObject.ReportTempFileFullName,
                                    GlobalDataAccessor.Instance.DesktopSession.PDALaserPrinter.IPAddress,
                                    GlobalDataAccessor.Instance.DesktopSession.PDALaserPrinter.Port,
                                    2);
                            }
                            else if (GlobalDataAccessor.Instance.DesktopSession.LaserPrinter.IsValid)
                            {
                                if (FileLogger.Instance.IsLogWarn)
                                {
                                    FileLogger.Instance.logMessage(LogLevel.WARN, this,
                                                                   "Could not find valid PDA laser printer to print the PoliceSeize report." + Environment.NewLine +
                                                                   " Printing on default pawn laser printer: {0}",
                                                                   GlobalDataAccessor.Instance.DesktopSession.LaserPrinter);
                                }
                                strReturnMessage = PrintingUtilities.printDocument(
                                    reportObject.ReportTempFileFullName,
                                    GlobalDataAccessor.Instance.DesktopSession.LaserPrinter.IPAddress,
                                    GlobalDataAccessor.Instance.DesktopSession.LaserPrinter.Port,
                                    2);
                            }
                            else
                            {
                                if (FileLogger.Instance.IsLogError)
                                {
                                    FileLogger.Instance.logMessage(LogLevel.ERROR, this,
                                                                   "Could not find a valid laser printer to print the PoliceSeize report");
                                }
                                strReturnMessage = "FAIL - NO PRINTER FOUND";
                            }
                            if (strReturnMessage.IndexOf("SUCCESS", StringComparison.OrdinalIgnoreCase) == -1)
                            {
                                if (FileLogger.Instance.IsLogError)
                                {
                                    FileLogger.Instance.logMessage(LogLevel.ERROR, this,
                                                                   "Cannot print the PoliceSeize report: " + strReturnMessage);
                                }
                            }
                        }

                        break;
                    }

                    dgr = MessageBox.Show(Commons.GetMessageString("ProcessingError"), "Error", MessageBoxButtons.RetryCancel);
                }while (dgr == DialogResult.Retry);
            }
            //Process Release to claimant
            if (ReleaseToClaimant)
            {
                //Store the police info in session
                if (GlobalDataAccessor.Instance.DesktopSession.PoliceInformation == null)
                {
                    if (!customTextBoxAgency.isValid || !customTextBoxBadgeNumber.isValid ||
                        !customTextBoxOfficerFirstName.isValid || !customTextBoxOfficerLastName.isValid ||
                        !customTextBoxPhoneAreaCode.isValid || !customTextBoxPhoneNumber.isValid ||
                        richTextBoxReason.Text.Trim().Length <= 0)
                    {
                        MessageBox.Show("Please enter all the required fields and submit");
                        return;
                    }
                    foreach (HoldData policeHold in policeHolds)
                    {
                        policeHold.HoldComment = richTextBoxReason.Text;
                    }
                    PoliceInfo policeInfo = new PoliceInfo
                    {
                        Agency           = customTextBoxAgency.Text,
                        BadgeNumber      = customTextBoxBadgeNumber.Text,
                        CaseNumber       = customTextBoxCaseNumber.Text,
                        OfficerFirstName = customTextBoxOfficerFirstName.Text,
                        OfficerLastName  = customTextBoxOfficerLastName.Text,
                        PhoneAreaCode    = customTextBoxPhoneAreaCode.Text,
                        PhoneExtension   = customTextBoxPhoneExt.Text,
                        PhoneNumber      = customTextBoxPhoneNumber.Text
                    };
                    GlobalDataAccessor.Instance.DesktopSession.PoliceInformation = policeInfo;
                    GlobalDataAccessor.Instance.DesktopSession.ReleaseToClaimant = true;
                    NavControlBox.IsCustom     = true;
                    NavControlBox.CustomDetail = "FindClaimant";
                    this.NavControlBox.Action  = NavBox.NavAction.BACKANDSUBMIT;
                }
                else
                {
                    bool       gunInvolved     = false;
                    CustomerVO currentCustomer = GlobalDataAccessor.Instance.DesktopSession.ActiveCustomer;
                    //Check if any of the loans being released has a gun

                    foreach (HoldData pl in policeHolds)
                    {
                        var gunItems = from pItem in pl.Items
                                       where pItem.GunNumber > 0
                                       select pItem;
                        if (gunItems.Any())
                        {
                            gunInvolved = true;
                            break;
                        }
                    }
                    //if gun involved check for cwp
                    bool backgroundCheck = false;
                    if (gunInvolved)
                    {
                        /*DateTime currentDate = ShopDateTime.Instance.ShopDate;
                         * string strStoreState = GlobalDataAccessor.Instance.CurrentSiteId.State;
                         * if (currentCustomer.HasValidConcealedWeaponsPermitInState(strStoreState, currentDate))
                         * {
                         *  if (CustomerProcedures.IsBackgroundCheckRequired())
                         *  {
                         *      FirearmsBackgroundCheck backgroundcheckFrm = new FirearmsBackgroundCheck();
                         *      backgroundcheckFrm.ShowDialog(this);
                         *  }
                         *  else //If the background check is not needed
                         *      CashlinxDesktopSession.Instance.BackgroundCheckCompleted = true;
                         * }
                         * //else if they do not have CWP or not a CWP in the store state or expired
                         * //then show the background check form
                         * else
                         * {
                         *  FirearmsBackgroundCheck backgroundcheckFrm = new FirearmsBackgroundCheck();
                         *  backgroundcheckFrm.ShowDialog(this);
                         * }*/
                        FirearmsBackgroundCheck backgroundcheckFrm = new FirearmsBackgroundCheck();
                        backgroundcheckFrm.ShowDialog(this);
                        if (GlobalDataAccessor.Instance.DesktopSession.BackgroundCheckCompleted)
                        {
                            backgroundCheck = true;
                        }
                    }
                    else
                    {
                        backgroundCheck = true;
                    }

                    if (backgroundCheck)
                    {
                        do
                        {
                            returnValue = HoldsProcedures.AddReleaseToClaimant(policeHolds, policeHolds[0].HoldComment,
                                                                               GlobalDataAccessor.Instance.DesktopSession.PoliceInformation, currentCustomer);
                            if (returnValue)
                            {
                                MessageBox.Show("selected transactions released to claimant successfully");
                                //Print RTC form
                                foreach (var policeHold in policeHolds)
                                {
                                    policeHold.PoliceInformation = GlobalDataAccessor.Instance.DesktopSession.PoliceInformation;
                                    policeHold.RestitutionPaid   = radioButtonYes.Checked;

                                    if (panelRestitution.Visible == true && radioButtonYes.Checked == true)
                                    {
                                        // there was restitution paid
                                        if (customTextBoxResAmount.Text.Trim() == "")
                                        {
                                            // Probably should have caught this before
                                            policeHold.RestitutionAmount = 0;
                                            MessageBox.Show("Please enter the restitution amount!", "Restitution amount missing");
                                            customTextBoxResAmount.Focus();
                                            return;
                                        }
                                    }
                                    else
                                    {
                                        // No restitution paid
                                        policeHold.RestitutionPaid   = false;
                                        policeHold.RestitutionAmount = 0;
                                    }
                                }
                                //Call print RTC if print is enabled
                                if (SecurityAccessor.Instance.EncryptConfig.ClientConfig.ClientConfiguration.PrintEnabled)
                                {
                                    var rtcprintFrm = new RTCform();
                                    rtcprintFrm.RTCLoans = policeHolds;

                                    rtcprintFrm.ShowDialog();
                                }
                                break;
                            }
                            dgr = MessageBox.Show(Commons.GetMessageString("ProcessingError"), "Error", MessageBoxButtons.RetryCancel);
                        }while (dgr == DialogResult.Retry);
                    }
                    else
                    {
                        MessageBox.Show("Background check not completed. selected transactions not released to claimant");
                        RemoveTempStatusOnLoans();
                    }

                    GlobalDataAccessor.Instance.DesktopSession.PoliceInformation = null;
                    GlobalDataAccessor.Instance.DesktopSession.ReleaseToClaimant = false;
                }
            }
            this.NavControlBox.Action = NavBox.NavAction.BACKANDSUBMIT;
        }