Пример #1
0
    protected string CheckUserDemoErrors()
    {
        string strErrMessage = "";

        CUserAdmin usrdemo   = new CUserAdmin();
        long       lUserType = -1;

        if (rblUserType.SelectedIndex > -1)
        {
            lUserType = Convert.ToInt32(rblUserType.SelectedValue);
        }

        if (lUserType < 0)
        {
            strErrMessage += "Please select a User Type.<br/>";
        }

        long lUserRights = 0;
        long lReadOnly   = 0;

        GetUserRights(out lUserRights, out lReadOnly);

        if (lUserRights == 0)
        {
            strErrMessage += "Please select User Rights.<br/>";
        }

        if (cboSite.SelectedItem.Value == "-1")
        {
            strErrMessage += "Please select a Clinic.<br/>";
        }

        string strStatus = "";

        if (!usrdemo.ValidateUserDemographicRules(BaseMstr, cnName, txtName.Text, out strStatus))
        {
            strErrMessage += strStatus;
        }

        strStatus = "";
        if (!usrdemo.ValidateUserDemographicRules(BaseMstr, cnEmail, txtEmail.Text, out strStatus))
        {
            strErrMessage += strStatus;
        }

        strStatus = "";
        if (!usrdemo.ValidateUserDemographicRules(BaseMstr, cnPhone, txtPhone.Text, out strStatus))
        {
            strErrMessage += strStatus;
        }

        return(strErrMessage);
    }
Пример #2
0
    protected string CheckUserDemoErrors()
    {
        string strErrMessage = "";

        CUserAdmin usrdemo = new CUserAdmin();

        string strStatus = "";

        if (!usrdemo.ValidateUserDemographicRules(BaseMstr, cnName, txtName.Text, out strStatus))
        {
            strErrMessage += strStatus;
        }

        return(strErrMessage);
    }