/// <summary>
        ///
        /// </summary>
        /// <param name="strAccountGroupName"></param>
        /// <param name="decAccountGroupId"></param>
        /// <returns></returns>
        public bool AccountGroupCheckExistence(string strAccountGroupName, decimal decAccountGroupId)
        {
            bool isEdit = false;

            try
            {
                isEdit = spAccountGroup.AccountGroupCheckExistence(strAccountGroupName, decAccountGroupId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("AG3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(isEdit);
        }
예제 #2
0
        /// <summary>
        /// Function to check existance of account group in DataBase
        /// </summary>
        /// <returns></returns>
        public bool CheckExistanceOfGroupName()
        {
            bool isExist = false;

            try
            {
                //Check whether a group name already exist in DB
                AccountGroupSP spAccountGroup = new AccountGroupSP();
                isExist = spAccountGroup.AccountGroupCheckExistence(txtAccountGroupName.Text.Trim(), 0);
                if (isExist)
                {
                    if (txtAccountGroupName.Text.ToLower() == strAccountGroupName.ToLower())
                    {
                        isExist = false;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("AG5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(isExist);
        }