Exemplo n.º 1
0
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            Title = "Требования - LeadForce";

            RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(chxByResponsible, gridRequirements);
            RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(chxCurrentRequirements, gridRequirements);
            RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(ucResponsible, gridRequirements);
            RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(chxToPay, gridRequirements);

            RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(chxByResponsible, rtlRequirements);
            RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(chxCurrentRequirements, rtlRequirements);
            RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(ucResponsible, rtlRequirements);
            RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(chxToPay, rtlRequirements);

            gridRequirements.AddNavigateUrl = UrlsData.AP_RequirementAdd();
            gridRequirements.Actions.Add(new GridAction {
                Text = "Карточка требования", NavigateUrl = string.Format("~/{0}/Requirements/Edit/{{0}}", CurrentTab), ImageUrl = "~/App_Themes/Default/images/icoView.png"
            });
            gridRequirements.SiteID = SiteId;

            dcbCompany.SiteID = SiteId;

            if (!Page.IsPostBack)
            {
                InitFilter();
                rdpStartDate.SelectedDate = DateTimeHelper.GetFirstDayOfWeek(DateTime.Now);
                rdpEndDate.SelectedDate   = DateTime.Now;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Handles the OnClick event of the lbtnCreateRequirement control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void lbtnCreateRequirement_OnClick(object sender, EventArgs e)
        {
            Session["Selected-Text"] = hfSelection.Value;

            if (_requestId != Guid.Empty)
            {
                Session["Source-RequestId"] = _requestId;
            }

            Response.Write(string.Format("<script>window.open('{0}','_blank');</script>", UrlsData.AP_RequirementAdd()));
        }