protected void Page_Load(object sender, EventArgs e)
    {
        myDB = (database)Session["myDB"];
        curUser = (user)Session["curUser"];
        designUser = (user)Session["designUser"];
        userInfoColl = myDB.getUserInfoCollection();

        if (designUser != null)
        {
            usersBoardColl = myDB.getUsersBoardCollection(designUser);
        }
        if (curUser.Account_Type == "client")
        {
            boardPnl.Visible = true;
            usersBoardColl = myDB.getUsersBoardCollection(curUser);
            board_item.loadBoards(usersBoardColl, boardNameList);
        }
        else if (curUser.Account_Type == "designer")
        {
            designerPnl.Visible = true;
            switchUserBtn.Visible = true;
            user.loadUsers(userInfoColl, designerUserList, curUser);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        myDB = (database)Session["myDB"];
        curUser = (user)Session["curUser"];
        designUser = (user)Session["designUser"];
        userInfoColl = myDB.getUserInfoCollection();
        imgColl = myDB.getImagesCollection();
        allItems = product_image.getItems(imgColl);
        Session["imgColl"] = imgColl;
        Session["allItems"] = allItems;

        elements.loadElements(imgColl, colorList, lineList, lightList, formList, spaceList, textureList, patternList, massList, balanceList, unityList, harmonyList, rhythmList, proportionList, varietyList, emphasisList, scaleList, typeList);
        if (curUser.Account_Type == "client")
        {
            boardPnl.Visible = true;
            usersBoardColl = myDB.getUsersBoardCollection(curUser);
            board_item.loadBoards(usersBoardColl, boardNameList);
        }
        else if (curUser.Account_Type == "designer")
        {
            designerPnl.Visible = true;
            user.loadUsers(userInfoColl, designerUserList, curUser);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        myDB = (database)Session["myDB"];
        boardName = (string)Session["boardName"];
        curUser = (user)Session["curUser"];
        designUser = (user)Session["designUser"];
        userInfoColl = myDB.getUserInfoCollection();
        boardNameLbl.Text = boardName;
        userNameLbl.Text = curUser.Username;
        userErrLbl.Text = "";
        boardErrLbl.Text = "";
        resetBoard();
        if (curUser.Account_Type == "client")
        {
            userNamePnl.Visible = false;
            usersBoardColl = myDB.getUsersBoardCollection(curUser);
            board_item.loadBoards(usersBoardColl, boardNameList);
        }
        else if (curUser.Account_Type == "designer")
        {
            userNamePnl.Visible = true;
            switchUserBtn.Visible = true;
            if (designUser != null)
            {
                usersBoardColl = myDB.getUsersBoardCollection(designUser);
                userNameLbl.Text = designUser.Username;
            }
            else
            {
                usersBoardColl = myDB.getUsersBoardCollection(curUser);
            }
            user.loadUsers(userInfoColl, designerUserList, curUser);
        }
        if (!Page.IsPostBack)
        {

            boardNamePnl.Visible = true;

            if (boardName != null)
            {
                loadImages(usersBoardColl, boardName);
                inspirationPnl.Visible = true;
            }
            else
            {
                inspirationPnl.Visible = false;
                userNamePnl.Visible = false;
                boardNamePnl.Visible = false;
                changeBoardBtn.Visible = false;
                if (curUser.Account_Type == "designer")
                {
                    switchUserPnl.Visible = true;
                }
                else
                {
                    changeBoardPnl.Visible = true;
                }
            }
        }
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        myDB = (database)Session["myDB"];
        boardName = (string)Session["boardName"];
        curUser = (user)Session["curUser"];
        designUser = (user)Session["designUser"];
        userInfoColl = myDB.getUserInfoCollection();
        images = (List<product_image>)Session["allItems"];
        imgColl = myDB.getImagesCollection();
        elements.loadElements(imgColl, colorList, lineList, lightList, formList, spaceList, textureList, patternList, massList, balanceList, unityList, harmonyList, rhythmList, proportionList, varietyList, emphasisList, scaleList, typeList);

        if (curUser.Account_Type == "client")
        {
            usersBoardColl = myDB.getUsersBoardCollection(curUser);
            userNameLbl.Text = curUser.Username;
            board_item.loadBoards(usersBoardColl, boardNameList);
        }
        else if (curUser.Account_Type == "designer")
        {
            if (designUser != null)
            {
                usersBoardColl = myDB.getUsersBoardCollection(designUser);
                userNameLbl.Text = designUser.Username;
            }
            else
            {
                userNameLbl.Text = curUser.Username;
                usersBoardColl = myDB.getUsersBoardCollection(curUser);
            }
            switchUserBtn.Visible = true;
            user.loadUsers(userInfoColl, designerUserList, curUser);
        }
        boardNameLbl.Text = boardName;
        if (!Page.IsPostBack)
        {
            if (boardName != null)
            {
                optionsPnl.Visible = true;
                boardNamePnl.Visible = true;
                if (curUser.Account_Type == "designer")
                {
                    userNamePnl.Visible = true;
                }
            }
            else
            {
                boardNamePnl.Visible = false;
                userNamePnl.Visible = false;
                if (curUser.Account_Type == "designer")
                {
                    switchUserPnl.Visible = true;
                }
                else
                {
                    changeBoardPnl.Visible = true;
                }
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     myDB = (database)Session["myDB"];
     userInfoColl = myDB.getUserInfoCollection();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     myDB = (database)Session["myDB"];
     curUser = (user)Session["curUser"];
     userInfoColl = myDB.getUserInfoCollection();
     curUser = user.findUser(userInfoColl, curUser.Username);
     Session["curUser"] = curUser;
     usernameLbl.Text = curUser.Username;
     emailAddressLbl.Text = curUser.Email;
     phoneLbl.Text = curUser.Phone;
     designerLbl.Text = curUser.Designer;
     passwordFieldValidator.ControlToValidate = "passwordTxt";
     cnfrmPassFieldValidator.ControlToValidate = "cnfrmPassTxt";
     changeEmailFieldValidator.ControlToValidate = "emailAddressTxt";
     if (curUser.Account_Type == "client")
     {
         clientPnl.Visible = true;
     }
     else
     {
         designerPnl.Visible = true;
         user.loadClients(userInfoColl, clientList, curUser);
     }
 }