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"];
     curUser = (user)Session["curUser"];
     boardName = (string)Session["boardName"];
     images = (List<product_image>)Session["allItems"];
     imgColl = myDB.getImagesCollection();
     usersBoardColl = myDB.getUsersBoardCollection(curUser);
     board_item.loadBoards(usersBoardColl, boardNameList);
     elements.loadElements(imgColl, colorList, lineList, lightList, formList, spaceList, textureList, patternList, massList, balanceList, unityList, harmonyList, rhythmList, proportionList, varietyList, emphasisList, scaleList, typeList);
     boardNameLbl.Text = "Selected Board: " + boardName;
 }
    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)
 {
     i = (int)Session["i"];
     el = (elements)Session["el"];
     myDB = (database)Session["myDB"];
     curUser = (user)Session["curUser"];
     boardName = (string)Session["boardName"];
     queryItems = (List<product_image>)Session["queryItems"];
     usersBoardColl = myDB.getUsersBoardCollection(curUser);
     p = (product_image)Session["p"];
     setImage(p);
 }
    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);
        }
    }