コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string qsuimode = Request.QueryString["mode"];
                if (string.IsNullOrEmpty(qsuimode) == false)
                {
                    _mode = (UIMode.mode)Enum.Parse(typeof(UIMode.mode), qsuimode);
                    if (_mode == UIMode.mode.add)
                    {
                        LoadPortalionList2DDL();
                        ShowContentItemList();
                        ShowLanguage();
                        ShowTreeNodes_TabList();
                        ShowListFileInFolder();
                    }
                    hdnWindowUIMODE.Value = _mode.ToString();
                }
                MultiView1.ActiveViewIndex = 0;
            }

            PostBackOptions optionsSubmit = new PostBackOptions(btnOkay);

            btnOkay.OnClientClick  = "disableButtonOnClick(this, 'Please wait...', 'disabled_button'); ";
            btnOkay.OnClientClick += ClientScript.GetPostBackEventReference(optionsSubmit);
        }
コード例 #2
0
        protected override void OnRowDataBound(C1GridView grid, C1GridViewRowEventArgs e, MobileEventVo dataItem)
        {
            var clickScript = ClientScript.GetPostBackEventReference(Grid, string.Format("Select:{0}", e.Row.RowIndex));

            e.Row.Attributes.Remove("onclick");

            var checkIndex = GridUtils.GetColumnIndex(MobileEventVo.IndexTieneFoto);

            for (var i = 0; i < e.Row.Cells.Count; i++)
            {
                if (i != checkIndex)
                {
                    GridUtils.GetCell(e.Row, i).Attributes.Add("onclick", clickScript);
                }
                else if (dataItem.TieneFoto)
                {
                    GridUtils.GetCell(e.Row, MobileEventVo.IndexTieneFoto).Text = @"<div class=""withPhoto""></div>";

                    const string link = "window.open('../../Common/Pictures?e={0}', 'Fotos_{0}', 'width=345,height=408,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');";
                    GridUtils.GetCell(e.Row, i).Attributes.Add("onclick", string.Format(link, dataItem.Id));
                }
            }

            GridUtils.GetCell(e.Row, MobileEventVo.IndexIconUrl).Text = string.Format("<img src='{0}' />", IconDir + dataItem.IconUrl);
            grid.Columns[MobileEventVo.IndexInitialCross].Visible     = chkVerEsquinas.Checked;
            grid.Columns[MobileEventVo.IndexFinalCross].Visible       = chkVerEsquinas.Checked;

            grid.Columns[MobileEventVo.IndexAtendido].Visible    = chkVerAtenciones.Checked;
            grid.Columns[MobileEventVo.IndexUsuario].Visible     = chkVerAtenciones.Checked;
            grid.Columns[MobileEventVo.IndexFecha].Visible       = chkVerAtenciones.Checked;
            grid.Columns[MobileEventVo.IndexMensaje].Visible     = chkVerAtenciones.Checked;
            grid.Columns[MobileEventVo.IndexObservacion].Visible = chkVerAtenciones.Checked;
        }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
       
        ClientScript.GetPostBackEventReference(this, string.Empty);
        
       
        if (!IsPostBack)
        {
            
            Init_Page();
        }

        getCurrency();
        //(Master.FindControl("lblRoot") as Label).Text = "Reports >>";
        //(Master.FindControl("lblMark") as Label).Visible = false;
        //(Master.FindControl("lblheader") as Label).Text = "Debit Note";
        //(Master.FindControl("levelOneNavigationUserControl1").FindControl("lblRoot") as Label).Text = "Reports >> ";
        //(Master.FindControl("levelOneNavigationUserControl1").FindControl("lblheader") as Label).Text = "Debit Note";
        //btnSubmit.Attributes.Add("OnClick", "fnOpenWin('../ExcelFiles/DebitNote.pdf')");
        //btnCancel.Attributes.Add("OnClick", "fnOpenWin('../ExcelFiles/DebitNote.pdf')");
        TxtFromDate.Attributes.Add("OnBlur", "DateFormat(this,this.value,event,true,'3')");
        TxtFromDate.Attributes.Add("onkeyup", "DateFormat(this,this.value,event,false,'3')");
        TxtToDate.Attributes.Add("OnBlur", "DateFormat(this,this.value,event,true,'3')");
        TxtToDate.Attributes.Add("onkeyup", "DateFormat(this,this.value,event,false,'3')");
        
    }
コード例 #4
0
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        // Disable confirm changes checking
        DocumentManager.RegisterSaveChangesScript = false;

        // Init node
        workflowElem.Node = Node;

        workflow = DocumentManager.Workflow;
        if (workflow != null)
        {
            menuElem.OnClientStepChanged = ClientScript.GetPostBackEventReference(pnlUp, null);

            // Backward compatibility - Display Archive button for all steps
            menuElem.ForceArchive = workflow.IsBasic;
        }

        // Enable split mode
        EnableSplitMode = true;

        // Mark selected tab
        UIContext.ProductTab = ProductTabEnum.Workflow;
    }
コード例 #5
0
        protected void RegisterEvents()
        {
            var script =
                string.Format(
                    @" var PopupPanelOpen = false;
                function ClearEvents(){{ 
                    var cont = $get('{1}');                           
                    cont.innerHTML = ''; 
                }}
                function ShowEvents(){{ HideDetail(); $get('{0}').style.display = '';PopupPanelOpen = true; }} 
                function HideEvents(){{ $get('{0}').style.display = 'none';PopupPanelOpen = false; }} 
                function ToggleEvents(){{ if($get('{0}').style.display == 'none') ShowEvents(); else HideEvents(); }} 
                function AddEvent(txt){{ 
                    var cont = $get('{1}');
                    if(cont.childNodes.length > 20)
                        cont.removeChild(cont.lastChild);
                            
                    cont.innerHTML = txt + cont.innerHTML; 
                }}
                function ShowDetail(){{  $get('{1}').style.display = 'none'; $get('{2}').style.display = '';PopupPanelOpen = true; }}
                function HideDetail(){{ $get('{1}').style.display = ''; $get('{2}').style.display = 'none'; PopupPanelOpen = false;}}
                function LoadDetail(id){{ $get('ifrPopupDetail').src = 'InfoEventM2M.aspx?evt='+id; ShowDetail(); }}
                ",
                    panelPopup.ClientID,
                    panelPopupEvents.ClientID,
                    panelPopupDetail.ClientID
                    );

            ClientScript.RegisterStartupScript(typeof(string), "popup_events", script, true);

            cbEntidad.Attributes.Add("ondblclick", ClientScript.GetPostBackEventReference(btCenter, ""));
        }
コード例 #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (IsPostBack == false)
         {
             MultiView1.ActiveViewIndex = 0;
             LoadLists();
             LinkButton MenuSms      = (LinkButton)Master.FindControl("lblsmsPanel");
             LinkButton MenuReport   = (LinkButton)Master.FindControl("lblReporting");
             LinkButton MenuProfile  = (LinkButton)Master.FindControl("lblSetup");
             LinkButton MenuSettting = (LinkButton)Master.FindControl("lbtnSetting");
             MenuSms.Font.Italic      = true;
             MenuReport.Font.Italic   = false;
             MenuSettting.Font.Italic = false;
             MenuProfile.Font.Italic  = false;
             string strProcessScript = "this.value='Working...';this.disabled=true;";
             Button1.Attributes.Add("onclick", strProcessScript + ClientScript.GetPostBackEventReference(Button1, "").ToString());
             Button2.Attributes.Add("onclick", strProcessScript + ClientScript.GetPostBackEventReference(Button2, "").ToString());
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex.Message, true);
     }
 }
コード例 #7
0
    private void DisableBtnsOnClick()
    {
        string strProcessScript = "this.value='Working...';this.disabled=true;";

        btnOK.Attributes.Add("onclick", strProcessScript + ClientScript.GetPostBackEventReference(btnOK, "").ToString());
        btnPost.Attributes.Add("onclick", strProcessScript + ClientScript.GetPostBackEventReference(btnPost, "").ToString());
    }
コード例 #8
0
    protected void grdRoles_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            PostBackOptions postOptions  = new PostBackOptions(this.grdRoles, "Select$" + e.Row.RowIndex.ToString());
            String          insertScript = ClientScript.GetPostBackEventReference(postOptions);

            //
            // This for not uses equal, to not overbound the index
            //
            for (int a = 0; a < e.Row.Cells.Count; a++)
            {
                e.Row.Cells[a].Attributes.Add("onclick", insertScript);
            }

            //
            // Cancel a nested event fires
            //
            if (Convert.ToString(grdRoles.DataKeys[e.Row.RowIndex]["Name"]).ToUpper().Contains("ADMIN"))
            {
                e.Row.Cells[e.Row.Cells.Count - 1].Text = "";
            }
            else
            {
                e.Row.Cells[e.Row.Cells.Count - 1].Attributes.Add("onclick", "event.cancelBubble=true;javascript:if(confirm('O registro será excluido e não poderá mais ser recuperado, deseja realmente efetuar a operação?') == false) return false;");
            }
        }
    }
コード例 #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //populate years drop down list using carqueryapi json

            if (!IsPostBack)
            {
                //get the minimum and maximum car years available in json
                string Json_MinMaxYears = formater(Get("https://www.carqueryapi.com/api/0.3/?callback=?&cmd=getYears"));
                //convert to a more usable object for querying
                dynamic dynJson = JsonConvert.DeserializeObject(Json_MinMaxYears);

                //query out the min and max years
                int max_year = dynJson.Years.max_year;
                int min_year = dynJson.Years.min_year;

                //loop from biggest year to smallest year and add it to a drop down list control
                for (int i = max_year; i >= min_year; i--)
                {
                    ddlYear.Items.Add(i.ToString());
                }
            }


            ClientScript.GetPostBackEventReference(this, string.Empty);

            //get postback control
            string targetCtrl = Page.Request.Params.Get("__EVENTTARGET");

            //check if control is a subcategory menu control 'SubCat'
            if (targetCtrl != null && targetCtrl != string.Empty && targetCtrl.Contains("SubCat"))
            {
                GetPostBackControlName();
            }
        }
コード例 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["USER_Users"] == null)
            {
                string coutws = "<script language=\"javascript\" type=\"text/javascript\">alert(\"您目前已经登录超时!请重新登录!谢谢!\");location.href='/login.aspx';</script>";
                Response.Write(coutws);
            }
            try
            {
                string jscript = "function UploadComplete(){" + ClientScript.GetPostBackEventReference(Label_type, "") + "};";
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "FileCompleteUpload", jscript, true);

                FlashUpLoad1.QueryParameters = string.Format("User={0}", FormsAuthentication.HashPasswordForStoringInConfigFile("Beniao", "MD5"));
                if (!IsPostBack)
                {
                    string filetypes = cfup.getAllowFileType();                    //获取支持上传的文件的类型
                    FlashUpLoad1.FileTypes           = cfup.getAllowFileType_Up();
                    FlashUpLoad1.FileTypeDescription = filetypes;
                    Label_type.Text       = filetypes;
                    HiddenField_uid.Value = Request["ID"];
                }
            }
            catch
            {
            }
        }
コード例 #11
0
    ///////////////////////////////
    ///////// Page Events /////////
    ///////////////////////////////

    protected void Page_Load(object sender, EventArgs e)
    {
        clsSpeedo.Authenticate();
        //btnSend.Attributes.Add("onclick", "if(Page_ClientValidate()){this.disabled=true;" + btnSend.Page.ClientScript.GetPostBackEventReference(btnSend, string.Empty).ToString() + ";return CheckIsRepeat();}");
        btnSend.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btnSend, null) + ";");
        if (!Page.IsPostBack)
        {
            //string strProcessScript = "this.value='" + clsString.Submit + "';this.disabled=true;";
            // btnSend.Attributes.Add("onclick", strProcessScript + ClientScript.GetPostBackEventReference(btnSend, "").ToString());

            CreateDataTable();
            ddlDivision.DataSource     = clsModuleApprover.GetDSLDivisionHeadApprover(Request.Cookies["Speedo"]["UserName"], clsModule.ATWModule);
            ddlDivision.DataValueField = "pvalue";
            ddlDivision.DataTextField  = "ptext";
            ddlDivision.DataBind();

            using (clsEmployee employee = new clsEmployee())
            {
                employee.Username = Request.Cookies["Speedo"]["UserName"];
                employee.Fill();
                lblRequestorName.Text = employee.FirstName + " " + employee.MiddleInitial + ". " + employee.LastName;
            }

            ddlApprover.DataSource     = clsModuleApprover.DSLApproverEmployee(Request.Cookies["Speedo"]["UserName"], clsModule.ATWModule, "1");
            ddlApprover.DataValueField = "pvalue";
            ddlApprover.DataTextField  = "ptext";
            ddlApprover.DataBind();

            divScheduleList.Visible = false;

            dtpDateStart.Date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 22, 0, 0);
            dtpDateEnd.Date   = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 0, 0);
        }
    }
コード例 #12
0
        private void InitConrols()
        {
            searchText.Value = Search_text;

            // 검색창 Enter키 이벤트
            searchText.Attributes["onkeypress"] = "if (event.keyCode==13){" + ClientScript.GetPostBackEventReference(btnSearch, searchText.Value) + "; return false }";
        }
コード例 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //string qsuimode = Request.QueryString["mode"];

                //if (string.IsNullOrEmpty(qsuimode) == false)
                //{
                //    _mode = (UIMode.mode)Enum.Parse(typeof(UIMode.mode), qsuimode);
                //    if (_mode == UIMode.mode.add)
                //    {
                loadPermissionToChkBoxListPermission();
                ShowMenuSections();
                //    }
                //    if (_mode == UIMode.mode.edit)
                //    {
                //        _idx = Convert.ToInt32(Request.QueryString["idx"]);
                //        LoadData();
                //        hdnWindowUIMODE.Value = _mode.ToString();
                //    }
                TreeView1.Attributes.Add("onclick", "OnCheckBoxCheckChanged(event)");
                //}
                MultiView1.ActiveViewIndex = 0;
            }

            PostBackOptions optionsSubmit = new PostBackOptions(btnOkay);

            btnOkay.OnClientClick  = "disableButtonOnClick(this, 'Please wait...', 'disabled_button'); ";
            btnOkay.OnClientClick += ClientScript.GetPostBackEventReference(optionsSubmit);
            //btnOkay.OnClientClick = String.Format("this.disabled=true; __doPostBack('{0}','');", btnOkay.UniqueID);
        }
コード例 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string qsuimode = Request.QueryString["mode"];

                if (string.IsNullOrEmpty(qsuimode) == false)
                {
                    _idx = Convert.ToInt32(Request.QueryString["idx"]);
                    LoadData();
                }
                Session["FileUpload1"]     = null;
                MultiView1.ActiveViewIndex = 0;
            }
            else
            {
                if (FileUpload1.HasFile)
                {
                    Session["FileUpload1"] = FileUpload1;
                }
                else if (Session["FileUpload1"] != null)
                {
                    FileUpload1 = (FileUpload)Session["FileUpload1"];
                }
            }

            PostBackOptions optionsSubmit = new PostBackOptions(btnOkay);

            btnOkay.OnClientClick  = "disableButtonOnClick(this, 'Please wait...', 'disabled_button'); ";
            btnOkay.OnClientClick += ClientScript.GetPostBackEventReference(optionsSubmit);
        }
コード例 #15
0
        private string BindLinks(string templateBody)
        {
            //"<sku id='5' />Do you want to take advantage of this offer <a href='javascript:void(0)' bind='yes'>Yes</a> no <a href='javascript:void(0)' bind='no'>No</a>";
            MatchCollection links = Regex.Matches(templateBody, "<a.*?</a>", RegexOptions.Singleline | RegexOptions.IgnoreCase);

            int totalMatches = links.Count;

            for (int i = 0; i < totalMatches; i++)
            {
                XElement linkXml = XElement.Parse(links[i].Value);
                if (linkXml.Attribute("bind") != null)
                {
                    string attributeName = linkXml.Attribute("bind").Value;
                    Button btn           = Page.FindControl("btn" + attributeName) as Button;
                    if (btn != null)
                    {
                        string clientScript = ClientScript.GetPostBackEventReference(btn, "", btn.CausesValidation);

                        if (attributeName == "yes")
                        {
                            clientScript = "if(validateForm()) " + clientScript;
                        }

                        if (linkXml.Attribute("onclick") != null)
                        {
                            clientScript = string.Concat(linkXml.Attribute("onclick").Value, clientScript);
                        }

                        linkXml.SetAttributeValue("onclick", clientScript + ";return false;");
                        templateBody = templateBody.Replace(links[i].Value, linkXml.ToString());
                    }
                }
            }
            return(templateBody);
        }
コード例 #16
0
ファイル: OBNew.aspx.cs プロジェクト: nivzxc/WebPortal
    ///////////////////////////////
    ///////// Form Events /////////
    ///////////////////////////////

    protected void Page_Load(object sender, EventArgs e)
    {
        clsSpeedo.Authenticate();
        //btnSend.Attributes.Add("onclick", "if(Page_ClientValidate()){this.disabled=true;" + btnSend.Page.ClientScript.GetPostBackEventReference(btnSend, string.Empty).ToString() + ";return CheckIsRepeat();}");
        btnSend.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btnSend, null) + ";");
        if (!Page.IsPostBack)
        {
            // string strProcessScript = "this.value='Submitting...';this.disabled=true;";
            //btnSend.Attributes.Add("onclick", strProcessScript + ClientScript.GetPostBackEventReference(btnSend, "").ToString());

            MakeCart();

            txtRequestorName.Text = clsUsers.GetName(Request.Cookies["Speedo"]["UserName"]);

            ddlDepartment.DataSource     = clsDepartment.GetDdlDs();
            ddlDepartment.DataValueField = "pValue";
            ddlDepartment.DataTextField  = "pText";
            ddlDepartment.DataBind();

            ddlHeadApprover.DataSource     = clsDepartmentApprover.DSLApproverEmployee(Request.Cookies["Speedo"]["UserName"], EFormType.OfficialBussiness);
            ddlHeadApprover.DataValueField = "pvalue";
            ddlHeadApprover.DataTextField  = "ptext";
            ddlHeadApprover.DataBind();

            dtpOBDate.SelectedDate = DateTime.Now;
            BindDefaultSchedule();
            divScheduleList.Visible = false;
        }
    }
コード例 #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (user.isAnonymous)
            {
                Response.End();
            }
            if (Roles.GetRolesForUser()[0] != "Author" && Roles.GetRolesForUser()[0] != "Moderator" && Roles.GetRolesForUser()[0] != "Administrator")
            {
                Response.End();
            }
            if (!IsPostBack)
            {
                new mpTreeView().fillTreeView("exampleGroups", exampleGroupsTV);
                exampleGroupsTV.CollapseAll();
                exampleGroupsTV.Nodes[0].Expand();
                helpWizzardVisibilitySet(true);
                finalBT.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(finalBT, null) + ";");
            }
            else
            {
                helpWizzardVisibilitySet(false);
            }

            showPanelsAndButtons();
        }
コード例 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string qsuimode = Request.QueryString["mode"];

                if (string.IsNullOrEmpty(qsuimode) == false)
                {
                    _mode = (UIMode.mode)Enum.Parse(typeof(UIMode.mode), qsuimode);

                    if (_mode == UIMode.mode.edit)
                    {
                        _idx = Request.QueryString["idx"];
                        LoadData();
                        hdnWindowUIMODE.Value = _mode.ToString();
                    }
                }
                MultiView1.ActiveViewIndex = 0;
            }

            PostBackOptions optionsSubmit = new PostBackOptions(btnOkay);

            btnOkay.OnClientClick  = "disableButtonOnClick(this, 'Please wait...', 'disabled_button'); ";
            btnOkay.OnClientClick += ClientScript.GetPostBackEventReference(optionsSubmit);
            //btnOkay.OnClientClick = String.Format("this.disabled=true; __doPostBack('{0}','');", btnOkay.UniqueID);
        }
コード例 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string qsuimode = Request.QueryString["mode"];
                if (string.IsNullOrEmpty(qsuimode) == false)
                {
                    _mode = (UIMode.mode)Enum.Parse(typeof(UIMode.mode), qsuimode);
                    if (_mode == UIMode.mode.add)
                    {
                        PopulatePortalList2DDL(PortalId);
                        PopulateContentItemList();
                        PopulateCulture2DDL();
                    }
                    if (_mode == UIMode.mode.edit)
                    {
                        _idx = Convert.ToInt32(Request.QueryString["idx"]);
                        LoadData();
                    }
                    hdnWindowUIMODE.Value = _mode.ToString();
                }
                Session["update"]          = Server.UrlEncode(System.DateTime.Now.ToString());
                MultiView1.ActiveViewIndex = 0;
            }

            PostBackOptions optionsSubmit = new PostBackOptions(btnOkay);

            btnOkay.OnClientClick  = "disableButtonOnClick(this, 'Please wait...', 'disabled_button'); ";
            btnOkay.OnClientClick += ClientScript.GetPostBackEventReference(optionsSubmit);
        }
コード例 #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!m.CookieExists("userInfo")) //Fixes 'Chuck E Hacker' bug
        {
            m.SIMPLE_POPUP("Something went wrong!");
            Response.Redirect("~/Login.aspx"); //Send unauthorized user back to login page.
        }
        /*So in order for the listbox to get the userName cookie, we have to request the userInfo cookie, create a new cookie that will hold ONLY username!*/
        /*So aCookie is the original cookie, usernameCookie is the new cookie that gets assigned aCookie.Values["userName"], and of course we named the new cookie USERname*/
        /*USERname is the cookie that will be looked for in the .aspx file*/
        HttpCookie aCookie        = Request.Cookies["userInfo"];
        HttpCookie usernameCookie = new HttpCookie("USERname");

        usernameCookie.Value = aCookie.Values["userName"];
        Response.Cookies.Add(usernameCookie);
        /*DOUBLE CLICK EVENT FOR LISTBOX*/
        try
        {
            if (Request["__EVENTARGUMENT"] != null && Request["__EVENTARGUMENT"] == "move")
            {
                HttpCookie bCookie = new HttpCookie("submittedCookieInfo");
                Response.Cookies.Add(bCookie);

                string REQID = ListBox1.SelectedValue;
                m.Pending_Request_Read(bCookie, REQID);
                Response.Redirect("~/ViewSubmittedForm.aspx");
            }
        }
        catch
        {
        }
        ListBox1.Attributes.Add("ondblclick", ClientScript.GetPostBackEventReference(ListBox1, "move"));

        /****************/
    }
コード例 #21
0
 protected override void OnLoad(EventArgs e)
 {
     btnQuickCreate.Attributes["onclick"] = "this.disabled=true;"
                                            +
                                            ClientScript.GetPostBackEventReference(btnQuickCreate, "");
     base.OnLoad(e);
 }
コード例 #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string strProcessScript = "this.value='Processing...';this.disabled=true;";

            btnPrint.Attributes.Add("onclick", strProcessScript + ClientScript.GetPostBackEventReference(btnPrint, "").ToString());
            try
            {
                if (!Page.IsPostBack)
                {
                    RoleName();
                    Page.Title = "Central Purchase";
                    LoadRequisitionNo();
                    Company();
                    LoadPurReqGridView();
                    Company_productEntryPnl();
                    LoadCategory_productEntryPnl();
                    Product_productEntryPnl();
                    Unit_productEntryPnl();
                    GetBranchId();
                }
            }
            catch (Exception ex)
            {
                Show(ex.Message);
            }
        }
コード例 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string qsuimode = Request.QueryString["mode"];

                if (string.IsNullOrEmpty(qsuimode) == false)
                {
                    _mode = (UIMode.mode)Enum.Parse(typeof(UIMode.mode), qsuimode);
                    if (_mode == UIMode.mode.add)
                    {
                        LoadApplicationList2DDL();
                        PopulatePortalList2DDL();
                        LoadPackageList2DDL();
                        LoadSkinTypeList2DDL();
                    }
                    if (_mode == UIMode.mode.edit)
                    {
                        _idx = Convert.ToInt32(Request.QueryString["idx"]);
                        LoadData();
                    }
                    hdnWindowUIMODE.Value = _mode.ToString();
                }

                MultiView1.ActiveViewIndex = 0;
            }

            PostBackOptions optionsSubmit = new PostBackOptions(btnOkay);

            btnOkay.OnClientClick  = "disableButtonOnClick(this, 'Please wait...', 'disabled_button'); ";
            btnOkay.OnClientClick += ClientScript.GetPostBackEventReference(optionsSubmit);
        }
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        if (!MembershipContext.AuthenticatedUser.IsAuthorizedPerUIElement("CMS.Content", "Properties.Workflow"))
        {
            RedirectToUIElementAccessDenied("CMS.Content", "Properties.Workflow");
        }

        DocumentManager.OnCheckPermissions += DocumentManager_OnCheckPermissions;


        // Disable confirm changes checking
        DocumentManager.RegisterSaveChangesScript = false;

        // Init node
        workflowElem.Node = Node;

        workflow = DocumentManager.Workflow;
        if (workflow != null)
        {
            menuElem.OnClientStepChanged = ClientScript.GetPostBackEventReference(pnlUp, null);

            // Backward compatibility - Display Archive button for all steps
            menuElem.ForceArchive = workflow.IsBasic;
        }

        // Enable split mode
        EnableSplitMode = true;
    }
コード例 #25
0
        protected override void OnRowDataBound(C1GridView grid, C1GridViewRowEventArgs e, ReporteDistribucionVo dataItem)
        {
            base.OnRowDataBound(grid, e, dataItem);
            e.Row.Attributes.Add("id", dataItem.Id.ToString("#0"));

            var clickScript = ClientScript.GetPostBackEventReference(Grid, string.Format("Select:{0}", e.Row.RowIndex));

            e.Row.Attributes.Remove("onclick");

            var checkIndex = GridUtils.GetColumnIndex(ReporteDistribucionVo.IndexTieneFoto);

            for (var i = 0; i < e.Row.Cells.Count; i++)
            {
                if (i != checkIndex)
                {
                    GridUtils.GetCell(e.Row, i).Attributes.Add("onclick", clickScript);
                }
                else if (dataItem.TieneFoto)
                {
                    GridUtils.GetCell(e.Row, ReporteDistribucionVo.IndexTieneFoto).Text = @"<div class=""withPhoto""></div>";

                    const string link = "window.open('../../Common/Pictures/Default.aspx?d={0}&f={1}&t={2}', 'Fotos_{0}', 'width=345,height=408,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');";
                    GridUtils.GetCell(e.Row, i).Attributes.Add("onclick", string.Format(link, dataItem.IdDispositivo, dataItem.Desde.ToString("dd/MM/yyyy HH:mm:ss"), dataItem.Hasta.ToString("dd/MM/yyyy HH:mm:ss")));
                }
            }

            grid.Columns[ReporteDistribucionVo.IndexConfirmacion].Visible = chkVerConfirmacion.Checked;
            grid.Columns[ReporteDistribucionVo.IndexHorario].Visible      = chkVerConfirmacion.Checked;

            grid.Columns[ReporteDistribucionVo.IndexReadInactive].Visible   = chkInteraccionGarmin.Checked;
            grid.Columns[ReporteDistribucionVo.IndexUnreadInactive].Visible = chkInteraccionGarmin.Checked;

            grid.Columns[ReporteDistribucionVo.IndexDescripcion].Visible = chkVerDescripcion.Checked;
        }
コード例 #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Context.Session != null)
        {
            if (Session.IsNewSession)
            {
                HttpCookie newSessionIdCookie = Request.Cookies["ASP.NET_SessionId"];
                if (newSessionIdCookie != null)
                {
                    string newSessionIdCookieValue = newSessionIdCookie.Value;
                    if (newSessionIdCookieValue != string.Empty)
                    {
                        if (!Page.IsCallback)
                        {
                            Response.Redirect("Default.aspx");
                        }
                        else
                        {
                            Response.RedirectLocation = Page.ResolveUrl("~/Default.aspx");
                        }
                    }
                }
            }
        }
        if (!IsPostBack)
        {
            //lblid.Text = objTeam.Decrypt(HttpUtility.UrlDecode(Request.QueryString["TID"]));

            //LoadEmp();
            BindTeam();
        }

        btnYes.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btnYes, null) + ";");
    }
コード例 #27
0
    protected void grdLisTBL_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.Header ||
            e.Row.RowType == DataControlRowType.Footer ||
            e.Row.RowType == DataControlRowType.Pager ||
            e.Row.RowType == DataControlRowType.Separator)
        {
            return;
        }

        LinkButton lnkNo = (LinkButton)e.Row.FindControl("lnkNo");

        if (lnkNo != null)
        {
            CheckBox cbxAlarm = (CheckBox)e.Row.FindControl("cbxAlarm");
            if (cbxAlarm != null)
            {
                cbxAlarm.Attributes["onclick"] = ClientScript.GetPostBackEventReference(cbxAlarm, "");
                cbxAlarm.Checked = (e.Row.DataItem != null && 알람정보들.IndexOf("withdraw" + ((DataRowView)e.Row.DataItem)["ID"].ToString() + ":") > -1);
            }

            // e.Row.Attributes["onclick"] = ClientScript.GetPostBackEventReference(lnkNo, "");
            e.Row.Attributes["onmouseover"] = "javascript:prevBGColor=this.style.backgroundColor; this.style.backgroundColor='#D1DDF1';this.style.cursor='hand';";
            e.Row.Attributes["onmouseout"]  = "javascript:this.style.backgroundColor=prevBGColor;this.style.cursor='default';";
            e.Row.Attributes["mouseover"]   = "cursor:hand";

            lnkNo.Text = (grdList.PageIndex * grdList.PageSize + e.Row.RowIndex + 1).ToString();
        }
    }
コード例 #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClientScript.GetPostBackEventReference(this, string.Empty);

            Session["UserInteraction"] = true;

            try
            {
                if (!IsPostBack)
                {
                    Session["CopyRowList"]      = null;
                    Session["PartRequestTable"] = null;

                    tcNo.Text    = Convert.ToString(Request.QueryString["No"]);
                    tcDocNo.Text = Convert.ToString(Request.QueryString["ExternalDocumentNo"]);
                    Sh           = (List <SalesHeader>)Session["SalesHeaders"];
                }

                LoadPartRequestLines();
            }
            catch (Exception loadE)
            {
                Log.Error(loadE.Message, loadE);
            }
        }
コード例 #29
0
    private void RegisterRefreshScript()
    {
        ScriptHelper.RegisterJQuery(Page);

        StringBuilder script = new StringBuilder();

        script.Append(@"
var refreshTimeout_", ClientID, @";
$cmsj(function () 
{ 
    if (refreshTimeout_", ClientID, @") 
    { 
        clearTimeout(refreshTimeout_", ClientID, @"); 
    } 

    refreshTimeout_", ClientID, @" = setTimeout(function ()
    {
        ", ClientScript.GetPostBackEventReference(btnHiddenRefresh, ""), @";
    },
        1000
    );
});"
                      );

        ScriptHelper.RegisterStartupScript(this, typeof(string), "ViewLog_" + ClientID, ScriptHelper.GetScript(script.ToString()));
    }
コード例 #30
0
        /// <summary>
        /// 页面载入响应
        /// </summary>
        protected override void OnGmPageLoad()
        {
            if (!this.IsPostBack)
            {
                gmt.Server server = Session["Server"] as gmt.Server;

                for (int i = 0; i < gmt.Server.Count; ++i)
                {
                    gmt.Server theServer = gmt.Server.GetServerAt(i);
                    this.serverList.Items.Add(theServer.Name);

                    if (theServer == server)
                    {
                        this.serverList.SelectedIndex = i;
                    }
                }

                if (server == null)
                {
                    Session["Server"] = gmt.Server.GetServerAt(0);
                }

                foreach (Channel channel in CreateKey.ChannelSet)
                {
                    this.channelList.Items.Add(channel.Name);
                }

                DateTime expiryDate = DateTime.Today + new TimeSpan(1, 0, 0, 0);
                ViewState["expiryDate"]     = expiryDate;
                this.expiryDateTextBox.Text = expiryDate.ToShortDateString();
                this.countTextBox.Text      = "1";
            }

            this.expiryDateTextBox.Attributes["onclick"] = ClientScript.GetPostBackEventReference(this.hideButton, null);
        }