Exemple #1
0
        public static bool CheckUserAccountName(string userCode, string accountName)
        {
            bool flag2;

            try
            {
                DataRow[]  rowArray;
                bool       flag          = true;
                EntityData allSystemUser = SystemManageDAO.GetAllSystemUser();
                if (userCode == "")
                {
                    rowArray = allSystemUser.CurrentTable.Select(string.Format("UserID='{0}'", accountName));
                }
                else
                {
                    rowArray = allSystemUser.CurrentTable.Select(string.Format("UserID='{0}' and UserCode<>'{1}' ", accountName, userCode));
                }
                if (rowArray.Length > 0)
                {
                    flag = false;
                }
                allSystemUser.Dispose();
                flag2 = flag;
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(flag2);
        }
Exemple #2
0
        public static string GetAllUser()
        {
            string   text = "";
            DataView view = new DataView(SystemManageDAO.GetAllSystemUser().CurrentTable, "Status='0'", "", DataViewRowState.CurrentRows);

            foreach (DataRowView view2 in view)
            {
                if (text != "")
                {
                    text = text + ",";
                }
                text = text + view2["UserCode"].ToString();
            }
            return(text);
        }
    private string GetAllUser()
    {
        string     strUser = "";
        EntityData entity  = SystemManageDAO.GetAllSystemUser();
        DataView   dv      = new DataView(entity.CurrentTable, "isnull(Status,0)='0'", "", System.Data.DataViewRowState.CurrentRows);

        foreach (DataRowView drv in dv)
        {
            if (strUser != "")
            {
                strUser += ",";
            }
            strUser += drv["UserCode"].ToString();
        }
        return(strUser);
    }