Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var userID = Session["userID"];

            if (userID == null)
            {
                Response.Redirect("~/Default.aspx");
            }

            UpdateSessionValues();
            CardCreateView cardCreateView = new CardCreateView();

            Session["searchList"] = new List <TableActions.SearchValues>(); // сессия поиска
            var canEditSession = Session["userID"];

            cardMainDiv.Controls.Add(cardCreateView.CreateViewByRegisterAndCard(_registerId, _cardId, _version, !_canEdit));
            // cardPrintDiv.Controls.Add(cardCreateView.GetPrintVersion(_registerId,_cardId, _version));
            if (!_canEdit)
            {
                LinkButton1.Visible  = true;
                CreateButton.Visible = false;
            }
            createdFields      = cardCreateView.allFieldsInCard;
            createdFileUploads = cardCreateView.allFileUploadsInCard;
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            List <PrintManyParams> allParams      = (List <PrintManyParams>)Session["PrintManyParams"];
            CardCreateView         cardCreateView = new CardCreateView();
            int i = 0;

            foreach (PrintManyParams page in allParams)
            {
                PrintMainDiv.Controls.Add(cardCreateView.GetPrintVersion(page.RegisterId, page.CardId, page.Version, Convert.ToInt32(DropDownList1.SelectedValue)));
                if (++i < allParams.Count)
                {
                    PrintMainDiv.Controls.Add(new Panel()
                    {
                        CssClass = "pagebreak"
                    });
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            var userID = Session["userID"];

            if (userID == null)
            {
                Response.Redirect("~/Default.aspx");
            }
            CardCreateView cardCreateView = new CardCreateView();
            var            registerIdSes  = Session["registerID"];
            var            versionSes     = Session["version"];
            var            cardIdSes      = Session["cardID"];

            if (registerIdSes != null && versionSes != null && cardIdSes != null)
            {
                PrintMainDiv.Controls.Add(cardCreateView.GetPrintVersion((int)registerIdSes, (int)cardIdSes, (int)versionSes));
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            var userID = Session["userID"];

            if (userID == null)
            {
                Response.Redirect("~/Default.aspx");
            }

            int regId;
            int vers;
            int cardId;

            int.TryParse(Session["registerID"].ToString(), out regId);
            int.TryParse(Session["version"].ToString(), out vers);
            int.TryParse(Session["cardID"].ToString(), out cardId);

            CardCreateView cardCreateView = new CardCreateView();
            var            registerIdSes  = regId;
            var            versionSes     = vers;
            var            cardIdSes      = cardId;

            PrintMainDiv.Controls.Add(cardCreateView.GetPrintVersion((int)registerIdSes, (int)cardIdSes, (int)versionSes, Convert.ToInt32(DropDownList1.SelectedValue)));
        }