public static string GenerateUserID(TextBox txtUserStaffID)
        {
            int    iicount = 0;
            string ID      = "";

            db = new db_MiletecDataContext();
            var query = db.sp_Get_User_ID();

            foreach (sp_Get_User_IDResult count in query)
            {
                iicount = count.Count.Value;
                iicount = iicount - 1;
            }
            ++iicount;
            if (iicount.ToString().Length.Equals(1))
            {
                ID = "User-" + iicount.ToString().PadLeft(4, '0').ToString();
            }
            else if (iicount.ToString().Length.Equals(2))
            {
                ID = "User-" + iicount.ToString().PadLeft(3, '0').ToString();
            }
            else
            {
                ID = "User-" + iicount.ToString().PadLeft(2, '0').ToString();
            }

            return(txtUserStaffID.Text = ID);
        }