示例#1
0
        /// <summary>
        /// User Id check availability
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        //protected void lnkAvailability_Click(object sender, EventArgs e)
        //{
        //    if (txtUserId.Text != "")
        //        CheckAvailability();
        //    else
        //    {
        //        lblStep3Message.Text = "Please enter userId";
        //        lblAvailabilityMessage.Text = "";
        //    }
        //}

        private bool CheckAvailability()
        {
            CardHolderManager um          = new CardHolderManager();
            CardHolder_MstDTO card_holder = um.FindUser(txtUserId.Text.Trim());

            if (card_holder == null)
            {
                //lblAvailabilityMessage.Text = "User name is available";
                //lblAvailabilityMessage.ForeColor = System.Drawing.Color.Green;
                return(true);
            }
            //lblAvailabilityMessage.Text = "User name is not available";
            //lblAvailabilityMessage.ForeColor = System.Drawing.Color.Red;
            return(false);
        }
示例#2
0
        public static string FindUser(string username)
        {
            CardHolderManager um = new CardHolderManager();

            return(um.FindUser(username) == null ? "0" : "1");
        }