/// <summary>
        /// Get the Neighborhood Parcel locks
        /// </summary>
        /// <param name="nbhdId">nbhdID</param>
        /// <returns>Typed dataset</returns>
        public static F3501NeighborhoodParcelLocksData ListNeighborhoodParcelLocks(int nbhdId)
        {
            F3501NeighborhoodParcelLocksData neighborhoodParcelLocksData = new F3501NeighborhoodParcelLocksData();
            Hashtable ht = new Hashtable();

            ht.Add("@NBHDID", nbhdId);
            Utility.LoadDataSet(neighborhoodParcelLocksData.f35100NeighborhoodParcelLocks, "f35100_pcget_NeighborhoodLocks", ht);
            return(neighborhoodParcelLocksData);
        }
示例#2
0
        /// <summary>
        /// EditLockStatus
        /// </summary>
        /// <param name="keyid">keyid</param>
        /// <param name="lockvalue">lockvalue</param>
        /// <param name="lockAdmin">lockAdmin</param>
        /// <param name="appraisallock">appraisallock</param>
        /// <param name="primaryID">primaryID</param>
        private void EditLockStatus(int keyid, int lockvalue, int lockAdmin, int appraisallock, int primaryID)
        {
            if (this.LockButton.Enabled || this.UnlockButton.Enabled)
            {
                this.neighborhoodParcelLocksData = this.formF3501Control.WorkItem.UpdateParcelLockingDetails(keyid, lockvalue, lockAdmin, appraisallock, primaryID, TerraScan.Common.TerraScanCommon.UserId);
                if (this.neighborhoodParcelLocksData.f35100_pcupd_NeighborhoodLocks.Rows.Count > 0)
                {
                    int.TryParse((this.neighborhoodParcelLocksData.f35100_pcupd_NeighborhoodLocks.Rows[0][this.neighborhoodParcelLocksData.f35100_pcupd_NeighborhoodLocks.QntyParcelColumn].ToString()), out this.qntyParcels);
                    int.TryParse((this.neighborhoodParcelLocksData.f35100_pcupd_NeighborhoodLocks.Rows[0][this.neighborhoodParcelLocksData.f35100_pcupd_NeighborhoodLocks.QntyParcelLockedColumn].ToString()), out this.qntyParcelsLocked);
                    if (this.buttonFlag)
                    {
                        switch (MessageBox.Show(SharedFunctions.GetResourceString("NeighborhoodWarning") + " " + this.qntyParcels + " of which " + this.qntyParcelsLocked + " are already locked. ", SharedFunctions.GetResourceString("LockWarning") + " ", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2))
                        {
                        case DialogResult.OK:
                        {
                            this.neighborhoodParcelLocksData = this.formF3501Control.WorkItem.UpdateParcelLockingDetails(this.keyId, lockvalue, lockAdmin, appraisallock, -100, TerraScan.Common.TerraScanCommon.UserId);
                            if (this.neighborhoodParcelLocksData.f35100_pcupd_NeighborhoodLocks.Rows[0][this.neighborhoodParcelLocksData.f35100_pcupd_NeighborhoodLocks.ReturnValueColumn].ToString().Equals("Zero"))
                            {
                                ////updateStatus = true;
                                this.LoadNeighborhoodParcelLocks();
                            }

                            break;
                        }

                        case DialogResult.Cancel:
                        {
                            break;
                        }
                        }
                    }
                    else
                    {
                        switch (MessageBox.Show(SharedFunctions.GetResourceString("NeighborhoodUnlock") + " " + this.qntyParcels + " of which " + this.qntyParcelsLocked + " are currently locked. ", SharedFunctions.GetResourceString("LockWarning") + " ", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2))
                        {
                        case DialogResult.OK:
                        {
                            this.neighborhoodParcelLocksData = this.formF3501Control.WorkItem.UpdateParcelLockingDetails(this.keyId, lockvalue, lockAdmin, appraisallock, -100, TerraScan.Common.TerraScanCommon.UserId);
                            if (this.neighborhoodParcelLocksData.f35100_pcupd_NeighborhoodLocks.Rows[0][this.neighborhoodParcelLocksData.f35100_pcupd_NeighborhoodLocks.ReturnValueColumn].ToString().Equals("Zero"))
                            {
                                this.LoadNeighborhoodParcelLocks();
                            }

                            break;
                        }

                        case DialogResult.Cancel:
                        {
                            break;
                        }
                        }
                    }
                }
            }
        }
        /// <summary>
        /// F3501_UpdateParcelLockingDetails
        /// </summary>
        /// <param name="keyId">keyId</param>
        /// <param name="valueLock">valueLock</param>
        /// <param name="adminLock">adminLock</param>
        /// <param name="lockAppraisal">lockAppraisal</param>
        /// <param name="primaryId">primaryID</param>
        /// <param name="userId">userId</param>
        /// <returns>Typed dataset</returns>
        public static F3501NeighborhoodParcelLocksData UpdateParcelLockingDetails(int keyId, int valueLock, int adminLock, int lockAppraisal, int primaryId, int userId)
        {
            F3501NeighborhoodParcelLocksData neighborhoodParcelLocksData = new F3501NeighborhoodParcelLocksData();
            Hashtable ht = new Hashtable();

            ht.Add("@NBHDID", keyId);
            ht.Add("@LockAppraisalBy", lockAppraisal);
            ht.Add("@LockAssessmentBy", valueLock);
            ht.Add("@LockAdminBy", adminLock);
            ht.Add("@PrimaryKeyID", primaryId);
            ht.Add("@UserID", userId);
            Utility.LoadDataSet(neighborhoodParcelLocksData.f35100_pcupd_NeighborhoodLocks, "f35100_pcupd_NeighborhoodLocks", ht);
            return(neighborhoodParcelLocksData);
        }
示例#4
0
        /// <summary>
        /// LoadNeighborhoodParcelLocks
        /// </summary>
        private void LoadNeighborhoodParcelLocks()
        {
            string neighborhood = null;
            string rollYear     = null;

            this.FormNoLabel.Text            = this.formName;
            this.neighborhoodParcelLocksData = this.formF3501Control.WorkItem.ListNeighborhoodParcelLocks(this.keyId);
            if (this.neighborhoodParcelLocksData.f35100NeighborhoodParcelLocks.Rows.Count > 0)
            {
                this.getNeighborhoodHeaderLockData = (F3501NeighborhoodParcelLocksData.f35100NeighborhoodParcelLocksRow) this.neighborhoodParcelLocksData.f35100NeighborhoodParcelLocks.Rows[0];
                //// string[] parcelNo = null;
                if (this.formName == SharedFunctions.GetResourceString("NeighborhoodAppraisalformNo"))
                {
                    ////this.getNeighborhoodHeaderLockData = (F3501NeighborhoodParcelLocksData.f35100NeighborhoodParcelLocksRow)this.neighborhoodParcelLocksData.f35100NeighborhoodParcelLocks.Rows[0];
                    this.lockNumber            = this.getNeighborhoodHeaderLockData.LockAppraisal;
                    this.DescriptionLabel.Text = SharedFunctions.GetResourceString("NeighborhoodAppraisalLock");
                    this.parcelNumber          = this.getNeighborhoodHeaderLockData.NeighborhoodLabel;
                    if (this.parcelNumber.Length > 0)
                    {
                        rollYear     = this.parcelNumber.Substring(this.parcelNumber.Length - 4);
                        neighborhood = this.parcelNumber.Substring(0, this.parcelNumber.Length - 5);
                    }

                    this.ParcelnumberLabel.Text  = neighborhood.Trim();
                    this.ParcelnumberLabel2.Text = rollYear.Trim();
                    ////}
                    this.userName = this.getNeighborhoodHeaderLockData.LockAppraisalName;

                    ////this.userID = Convert.ToInt32(this.lockNumber);
                    ////this.GetLockUser(this.userID);
                    this.formTitle = SharedFunctions.GetResourceString("NeighborhoodFormTitle") + " " + SharedFunctions.GetResourceString("Appraisal");
                    this.SetFormName(this.formTitle, this.lockNumber, this.userName);
                }
                else if (this.formName == SharedFunctions.GetResourceString("NeighborhoodAssessmentFormNo"))
                {
                    this.lockNumber            = this.getNeighborhoodHeaderLockData.LockAssessment;
                    this.DescriptionLabel.Text = SharedFunctions.GetResourceString("NeighborhoodAssessmentLock");
                    this.parcelNumber          = this.getNeighborhoodHeaderLockData.NeighborhoodLabel;
                    if (this.parcelNumber.Length > 0)
                    {
                        rollYear     = this.parcelNumber.Substring(this.parcelNumber.Length - 4);
                        neighborhood = this.parcelNumber.Substring(0, this.parcelNumber.Length - 5);
                    }

                    this.ParcelnumberLabel.Text  = neighborhood;
                    this.ParcelnumberLabel2.Text = rollYear.Trim();
                    this.userName = this.getNeighborhoodHeaderLockData.LockAssessmentName;
                    ////this.GetLockUser(this.userID);
                    this.formTitle = SharedFunctions.GetResourceString("NeighborhoodFormTitle") + " " + SharedFunctions.GetResourceString("Assessment");
                    this.SetFormName(this.formTitle, this.lockNumber, this.userName);
                }
                else
                {
                    this.lockNumber            = this.getNeighborhoodHeaderLockData.LockAdmin;
                    this.DescriptionLabel.Text = SharedFunctions.GetResourceString("NeighborhoodAdminLock");
                    this.parcelNumber          = this.getNeighborhoodHeaderLockData.NeighborhoodLabel;
                    if (this.parcelNumber.Length > 0)
                    {
                        rollYear     = this.parcelNumber.Substring(this.parcelNumber.Length - 4);
                        neighborhood = this.parcelNumber.Substring(0, this.parcelNumber.Length - 5);
                    }

                    this.ParcelnumberLabel.Text  = neighborhood;
                    this.ParcelnumberLabel2.Text = rollYear.Trim();
                    this.userName = this.getNeighborhoodHeaderLockData.LockAdminName;
                    ////this.GetLockUser(this.userID);
                    this.formTitle = SharedFunctions.GetResourceString("NeighborhoodFormTitle") + " " + SharedFunctions.GetResourceString("Administrative");
                    this.SetFormName(this.formTitle, this.lockNumber, this.userName);
                }
            }
        }