Exemplo n.º 1
0
    protected void Page_Init(object sender, EventArgs e)
    {
        #region 設定 Trigger

        AsyncPostBackTrigger trigger1 = new AsyncPostBackTrigger();
        trigger1.EventName = "Click";
        trigger1.ControlID = this.but_Unusual_Report.UniqueID;
        this.up_GridView.Triggers.Add(trigger1);

        AsyncPostBackTrigger trigger2 = new AsyncPostBackTrigger();
        trigger2.EventName = "Click";
        trigger2.ControlID = this.ButtonQuery.UniqueID;
        this.up_GridView.Triggers.Add(trigger2);

        AsyncPostBackTrigger triggerA = new AsyncPostBackTrigger();
        triggerA.EventName = "Click";
        triggerA.ControlID = this.but_Unusual_Report.UniqueID;
        this.up_ErrorMsg.Triggers.Add(triggerA);

        AsyncPostBackTrigger triggerB = new AsyncPostBackTrigger();
        triggerB.EventName = "Click";
        triggerB.ControlID = this.ButtonQuery.UniqueID;
        this.up_ErrorMsg.Triggers.Add(triggerB);

        
        #endregion
    }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    hfSettingBase.Value = Request.RawUrl.Substring(Request.RawUrl.LastIndexOf('/') + 1) + "-PubNub-MV" + ((Table)Page.Master.FindControl("tblExpand")).Visible.ToString();

                    bool visible = true;
                    string dataVisible = SettingMgmt.getSetting(hfSettingBase.Value + "-Visible");
                    if (dataVisible != null)
                    {
                        bool.TryParse(dataVisible, out visible);
                        rowData.Visible = visible;
                        cbShow.Checked = visible;
                    }

                    AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
                    System.Web.UI.Timer tmrCheckChanges = (System.Web.UI.Timer)Page.Master.FindControl("tmrCheckChanges");
                    if (tmrCheckChanges != null && visible)
                    {
                        trigger.ControlID = tmrCheckChanges.ID;
                        UpdatePanelPubNub.Triggers.Add(trigger);
                    }

                }
            }
            catch (Exception ex)
            {
                throw; //EventLog.WriteEntry("WinkAtHome.PubNubDisplay.Page_Load", ex.Message, EventLogEntryType.Error);
            }
        }
Exemplo n.º 3
0
    protected void Page_Init(object sender, EventArgs e)
    {
        #region 設定 Trigger

        #region 設定 up_Msg trigger

        AsyncPostBackTrigger trigger_up_Msg1 = new AsyncPostBackTrigger();
        trigger_up_Msg1.EventName = "Click";
        trigger_up_Msg1.ControlID = this.but_Query.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg1);

        AsyncPostBackTrigger trigger_up_Msg2 = new AsyncPostBackTrigger();
        trigger_up_Msg2.EventName = "PageIndexChanging";
        trigger_up_Msg2.ControlID = this.gv_Main_Query.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg2);

        AsyncPostBackTrigger trigger_up_Msg3 = new AsyncPostBackTrigger();
        trigger_up_Msg3.EventName = "Sorting";
        trigger_up_Msg3.ControlID = this.gv_Main_Query.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg3);


        AsyncPostBackTrigger trigger_up_Msg4 = new AsyncPostBackTrigger();
        trigger_up_Msg4.EventName = "RowCommand";
        trigger_up_Msg4.ControlID = this.gv_Main_Query.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg4);

        AsyncPostBackTrigger trigger_up_Msg5 = new AsyncPostBackTrigger();
        trigger_up_Msg5.EventName = "PageIndexChanging";
        trigger_up_Msg5.ControlID = this.gv_Detl_Query.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg5);


        AsyncPostBackTrigger trigger_up_Msg6 = new AsyncPostBackTrigger();
        trigger_up_Msg6.EventName = "Sorting";
        trigger_up_Msg6.ControlID = this.gv_Detl_Query.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg6);

        #endregion

        #region 設定 up_Main_Query trigger

        AsyncPostBackTrigger trigger_up_Main_Query1 = new AsyncPostBackTrigger();
        trigger_up_Main_Query1.EventName = "Click";
        trigger_up_Main_Query1.ControlID = this.but_Query.UniqueID;
        this.up_Main_Query.Triggers.Add(trigger_up_Main_Query1);

        #endregion

        #region 設定 up_Detl_Query trigger

        AsyncPostBackTrigger trigger_up_Detl_Query1 = new AsyncPostBackTrigger();
        trigger_up_Detl_Query1.EventName = "RowCommand";
        trigger_up_Detl_Query1.ControlID = this.gv_Main_Query.UniqueID;
        this.up_Detl_Query.Triggers.Add(trigger_up_Detl_Query1);

        #endregion

        #endregion
    }
Exemplo n.º 4
0
    private void Page_Init(object sender, System.EventArgs e)
    {
        #region
        WUI_GMToolbarV uc = (WUI_GMToolbarV)this.GMToolbar1;
        //     uc.Btn_New += new WUI_GMToolbarV.UCDelegate(this.UC_New);
        uc.Btn_Find += new WUI_GMToolbarV.UCDelegate(this.UC_Find);
        uc.Btn_FindExport += new WUI_GMToolbarV.UCDelegate(this.UC_Export);
        #endregion

        #region 設定 Trigger

        AsyncPostBackTrigger trigger_up_Msg1 = new AsyncPostBackTrigger();
        trigger_up_Msg1.EventName = "Click";
        trigger_up_Msg1.ControlID = ButtonQuery_1.UniqueID;
        UpdatePanel1.Triggers.Add(trigger_up_Msg1);

        AsyncPostBackTrigger trigger_up_Msg2 = new AsyncPostBackTrigger();
        trigger_up_Msg2.EventName = "Click";
        trigger_up_Msg2.ControlID = ButtonQuery_2.UniqueID;
        UpdatePanel1.Triggers.Add(trigger_up_Msg2);

        AsyncPostBackTrigger trigger_up_Msg3 = new AsyncPostBackTrigger();
        trigger_up_Msg3.EventName = "Click";
        trigger_up_Msg3.ControlID = ButtonQuery_3.UniqueID;
        UpdatePanel1.Triggers.Add(trigger_up_Msg3);

        AsyncPostBackTrigger trigger_up_Msg4 = new AsyncPostBackTrigger();
        trigger_up_Msg4.EventName = "Click";
        trigger_up_Msg4.ControlID = ButtonQuery_4.UniqueID;
        UpdatePanel1.Triggers.Add(trigger_up_Msg4);

        #endregion
    }
Exemplo n.º 5
0
    private void Page_Init(object sender, System.EventArgs e)
    {
        #region 設定 updatepanel1 trigger

        AsyncPostBackTrigger trigger_up_Msg1 = new AsyncPostBackTrigger();
        trigger_up_Msg1.EventName = "Click";
        trigger_up_Msg1.ControlID = this.btnSet.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_up_Msg1);

        AsyncPostBackTrigger trigger_up_Msg2 = new AsyncPostBackTrigger();
        trigger_up_Msg2.EventName = "Click";
        trigger_up_Msg2.ControlID = this.btnUnSet.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_up_Msg2);

        AsyncPostBackTrigger trigger_up_Msg3 = new AsyncPostBackTrigger();
        trigger_up_Msg3.EventName = "Click";
        trigger_up_Msg3.ControlID = this.btnLock.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_up_Msg3);

        AsyncPostBackTrigger trigger2 = new AsyncPostBackTrigger();
        trigger2.EventName = "Click";
        trigger2.ControlID = this.ButtonQuery.UniqueID;
        this.up_GridView.Triggers.Add(trigger2);

        #endregion
    }
Exemplo n.º 6
0
 public static void AppendTrigger(this UpdatePanel up, string controlId, string eventName)
 {
     AsyncPostBackTrigger tg = new AsyncPostBackTrigger();
     tg.ControlID = controlId;
     tg.EventName = eventName;
     up.Triggers.Add(tg);
 }
Exemplo n.º 7
0
    /// <summary>
    /// Page預設起始作業
    /// </summary>
    private void Page_Init(object sender, System.EventArgs e)
    {
        WUI_GMToolbarV uc = (WUI_GMToolbarV)this.GMToolbar1;

        //uc.Btn_New += new WUI_GMToolbarV.UCDelegate(this.UC_New);
        uc.Btn_Find += new WUI_GMToolbarV.UCDelegate(this.UC_Find);
        //uc.Btn_FindExport += new WUI_GMToolbarV.UCDelegate(UC_Export);
        uc.Btn_RecFirst += new WUI_GMToolbarV.UCDelegate(UC_RecFirst);
        uc.Btn_RecLast += new WUI_GMToolbarV.UCDelegate(UC_RecLast);
        uc.Btn_RecNext += new WUI_GMToolbarV.UCDelegate(UC_RecNext);
        uc.Btn_RecPre += new WUI_GMToolbarV.UCDelegate(UC_RecPre);

        #region ToolBar "第一筆"鈕


        AsyncPostBackTrigger trigger_RecFirst1 = new AsyncPostBackTrigger();
        trigger_RecFirst1.EventName = "Click";
        trigger_RecFirst1.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[25]).UniqueID;
        this.PanelDetail.Triggers.Add(trigger_RecFirst1);


        #endregion


        #region ToolBar "最後一筆"鈕


        AsyncPostBackTrigger trigger_RecLast1 = new AsyncPostBackTrigger();
        trigger_RecLast1.EventName = "Click";
        trigger_RecLast1.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[31]).UniqueID;
        this.PanelDetail.Triggers.Add(trigger_RecLast1);


        #endregion


        #region ToolBar "下一筆"鈕


        AsyncPostBackTrigger trigger_RecNext1 = new AsyncPostBackTrigger();
        trigger_RecNext1.EventName = "Click";
        trigger_RecNext1.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[29]).UniqueID;
        this.PanelDetail.Triggers.Add(trigger_RecNext1);


        #endregion


        #region ToolBar "上一筆"鈕


        AsyncPostBackTrigger trigger_RecPre1 = new AsyncPostBackTrigger();
        trigger_RecPre1.EventName = "Click";
        trigger_RecPre1.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[27]).UniqueID;
        this.PanelDetail.Triggers.Add(trigger_RecPre1);


        #endregion

    }
Exemplo n.º 8
0
    private void Page_Init(object sender, System.EventArgs e)
    {
        #region
        WUI_GMToolbarV uc = (WUI_GMToolbarV)this.GMToolbar1;
        uc.Btn_RecFirst += new WUI_GMToolbarV.UCDelegate(this.UC_RecFirst);
        uc.Btn_RecLast += new WUI_GMToolbarV.UCDelegate(this.UC_RecLast);
        uc.Btn_RecNext += new WUI_GMToolbarV.UCDelegate(this.UC_RecNext);
        uc.Btn_RecPre += new WUI_GMToolbarV.UCDelegate(this.UC_RecPre);
        uc.Btn_New += new WUI_GMToolbarV.UCDelegate(this.UC_New);
        uc.Btn_Edit += new WUI_GMToolbarV.UCDelegate(this.UC_Edit);
        uc.Btn_Find += new WUI_GMToolbarV.UCDelegate(this.UC_Find);
        uc.Btn_Delete += new WUI_GMToolbarV.UCDelegate(this.UC_Delete);
        uc.Btn_Save += new WUI_GMToolbarV.UCDelegate(this.UC_Save);
        uc.Btn_Copy += new WUI_GMToolbarV.UCDelegate(this.UC_Copy);

        AsyncPostBackTrigger trigger_up_Msg1 = new AsyncPostBackTrigger();
        trigger_up_Msg1.EventName = "Click";
        trigger_up_Msg1.ControlID = this.btnImport.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger_up_Msg1);

        AsyncPostBackTrigger trigger_up_Msg2 = new AsyncPostBackTrigger();
        trigger_up_Msg2.EventName = "Click";
        trigger_up_Msg2.ControlID = this.btnAdd.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger_up_Msg2);


        #endregion
    }//Page_Init
Exemplo n.º 9
0
    private void Page_Init(object sender, System.EventArgs e)
    {

        #region 設定 Trigger
        AsyncPostBackTrigger trigger1 = new AsyncPostBackTrigger();
        trigger1.EventName = "Click";
        trigger1.ControlID = this.btnSave.UniqueID;
        this.UpdatePanel2.Triggers.Add(trigger1);
        #endregion
    }
Exemplo n.º 10
0
    protected void Page_Init(object sender, EventArgs e)
    {
        #region 設定 Trigger

        #region 設定 up_Msg

        AsyncPostBackTrigger trigger_up_Msg1 = new AsyncPostBackTrigger();
        trigger_up_Msg1.EventName = "Click";
        trigger_up_Msg1.ControlID = this.btn_Rollback.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg1);

        #endregion

        #endregion
    }
Exemplo n.º 11
0
    protected void Page_Init(object sender, EventArgs e)
    {
        #region 設定 Trigger

        #region 設定 up_QueryResult

        AsyncPostBackTrigger trigger_up_QueryResult1 = new AsyncPostBackTrigger();
        trigger_up_QueryResult1.EventName = "Click";
        trigger_up_QueryResult1.ControlID = this.but_Query.UniqueID;
        this.up_QueryResult.Triggers.Add(trigger_up_QueryResult1);

        #endregion

        #endregion
    }
Exemplo n.º 12
0
    private void Page_Init(object sender, System.EventArgs e)
    {
        #region

        AsyncPostBackTrigger trigger_up_Msg1 = new AsyncPostBackTrigger();
        trigger_up_Msg1.EventName = "Click";
        trigger_up_Msg1.ControlID = this.btnQuery.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger_up_Msg1);

        AsyncPostBackTrigger trigger_up_Msg2 = new AsyncPostBackTrigger();
        trigger_up_Msg2.EventName = "Click";
        trigger_up_Msg2.ControlID = this.btnQuery.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg2);

        #endregion
    }
Exemplo n.º 13
0
    private void Page_Init(object sender, System.EventArgs e)
    {

        #region 設定 Trigger
        AsyncPostBackTrigger trigger1 = new AsyncPostBackTrigger();
        trigger1.EventName = "Click";
        trigger1.ControlID = this.ButtonQuery.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger1);

        AsyncPostBackTrigger trigger2 = new AsyncPostBackTrigger();
        trigger2.EventName = "Click";
        trigger2.ControlID = this.ButtonNew.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger2);

        #endregion
    }
    protected void GV_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            var lb_Select = (LinkButton)e.Row.FindControl("lb_Select");
            var lb_Delete = (LinkButton)e.Row.FindControl("lb_Delete");

            lb_Select.OnClientClick = Page.ClientScript.GetPostBackEventReference(GV, "Select$" + e.Row.RowIndex) + ";return false;";
            lb_Delete.OnClientClick = "if (confirm('Are you sure you want to delete this product?')) {" + Page.ClientScript.GetPostBackEventReference(GV, "Delete$" + e.Row.RowIndex) + ";}return false;";

            var Trigger = new AsyncPostBackTrigger();
            Trigger.ControlID = GV.ID;
            Trigger.EventName = "";
            UP.Triggers.Add(Trigger);
        }
    }
Exemplo n.º 15
0
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            // Update パネルを使うときは、この関数を "おまじないで" 呼び出しましょう !
            EnsurePanelFix();

            // ラベルを追加
            label1.Text = "商品(キーワードを入力し選択) : ";
            this.Controls.Add(label1);

            // テキストボックスを追加
            textbox1.ID = "SearchStringTextBox";
            textbox1.Width = 300;
            textbox1.AutoPostBack = true;
            textbox1.TextChanged += new EventHandler(autoCompleteTextbox_TextChanged);
            this.Controls.Add(textbox1);

            // 改行を追加
            lCrLf.Text = "<br />";
            this.Controls.Add(lCrLf);

            // UpdatePanel のトリガーを設定 (テキストボックスが更新されたら Update !)
            updPanel1.ChildrenAsTriggers = false;
            updPanel1.UpdateMode = UpdatePanelUpdateMode.Conditional;
            AsyncPostBackTrigger updTrigger1 = new AsyncPostBackTrigger();
            updTrigger1.ControlID = "SearchStringTextBox";
            updTrigger1.EventName = "TextChanged";
            updPanel1.Triggers.Add(updTrigger1);

            // UpdatePanel にコントロールを追加
            updPanel1.ContentTemplateContainer.Controls.Add(photoImage);

            // UpdatePanel を追加
            this.Controls.Add(updPanel1);

            // さらに、テキストボックスに AutoComplete Extender (Ajax Contorol Toolkit の部品の 1 つ) を設定
            autoCompleteCtrl.MinimumPrefixLength = 1;
            /*****
            (ドメインをまたがったデータソースへのアクセスは、
            ブラウザの設定によってエラーとなるため、相対パスで記載)
             *****/
            autoCompleteCtrl.ServicePath = "/_vti_bin/KakakuSearch.asmx";
            autoCompleteCtrl.ServiceMethod = "GetSelectableNames";
            autoCompleteCtrl.TargetControlID = "SearchStringTextBox";
            this.Controls.Add(autoCompleteCtrl);
        }
Exemplo n.º 16
0
    private void Page_Init(object sender, System.EventArgs e)
    {
        #region

        WUI_GMToolbarV uc = (WUI_GMToolbarV)this.GMToolbar1;
        uc.Btn_RecFirst += new WUI_GMToolbarV.UCDelegate(this.UC_RecFirst);
        uc.Btn_RecLast += new WUI_GMToolbarV.UCDelegate(this.UC_RecLast);
        uc.Btn_RecNext += new WUI_GMToolbarV.UCDelegate(this.UC_RecNext);
        uc.Btn_RecPre += new WUI_GMToolbarV.UCDelegate(this.UC_RecPre);

        #endregion

        #region 設定 Trigger
        AsyncPostBackTrigger trigger1 = new AsyncPostBackTrigger();
        trigger1.EventName = "Click";
        trigger1.ControlID = this.btnSave.UniqueID;
        this.UpdatePanel2.Triggers.Add(trigger1);
        #endregion
    }
Exemplo n.º 17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // create an update panel
            UpdatePanel updatepanel = new UpdatePanel();

            // add the update panel to the placeholder
            LocalPlaceHolder.Controls.Add(updatepanel);

            // create a label to show time
            m_TimeLabel = new Label();
            m_TimeLabel.Text = DateTime.Now.ToString();

            // add the label to the update panel
            updatepanel.ContentTemplateContainer.Controls.Add(m_TimeLabel);

            // create a drop down list
            DropDownList dropdown = new DropDownList();
            dropdown.ID = "Dropdown1";
            dropdown.AutoPostBack = true; // this is absolutely required
            dropdown.Items.Add("Item 1");
            dropdown.Items.Add("Item 2");
            dropdown.Items.Add("Item 3");
            dropdown.Items.Add("Item 4");

            // add the drop down list to the update panel
            updatepanel.ContentTemplateContainer.Controls.Add(dropdown);

            // create a trigger
            AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();

            // associate the trigger with the drop down
            trigger.ControlID = "Dropdown1";
            trigger.EventName = "SelectedIndexChanged";

            // add the trigger to the update panel
            updatepanel.Triggers.Add(trigger);
        }
Exemplo n.º 18
0
    private void Page_Init(object sender, System.EventArgs e)
    {
        #region 設定 updatepanel1 trigger

        AsyncPostBackTrigger trigger_up_Msg1 = new AsyncPostBackTrigger();
        trigger_up_Msg1.EventName = "Click";
        trigger_up_Msg1.ControlID = this.btnSet.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_up_Msg1);

        AsyncPostBackTrigger trigger_up_Msg2 = new AsyncPostBackTrigger();
        trigger_up_Msg2.EventName = "Click";
        trigger_up_Msg2.ControlID = this.btnUnSet.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_up_Msg2);

        AsyncPostBackTrigger trigger_up_Msg4 = new AsyncPostBackTrigger();
        trigger_up_Msg4.EventName = "Click";
        trigger_up_Msg4.ControlID = this.btnUnSetTrace.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_up_Msg4);

        AsyncPostBackTrigger trigger3 = new AsyncPostBackTrigger();
        trigger3.EventName = "ActiveTabChanged";
        trigger3.ControlID = TabContainer1.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger3);

        AsyncPostBackTrigger trigger_up_Msg5 = new AsyncPostBackTrigger();
        trigger_up_Msg5.EventName = "Click";
        trigger_up_Msg5.ControlID = this.btnUnSetItemTrace.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_up_Msg5);

        AsyncPostBackTrigger trigger_up_Msg6 = new AsyncPostBackTrigger();
        trigger_up_Msg6.EventName = "Click";
        trigger_up_Msg6.ControlID = this.btnTransToDB.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_up_Msg6);

        #endregion
    }
Exemplo n.º 19
0
 void Page_Init(object sender, EventArgs e)
 {
     AsyncPostBackTrigger t = new AsyncPostBackTrigger();
     UpdatePanel1.Triggers.Add(t);
     t.ControlID = radCHANGE_TYPE1.UniqueID;
     AsyncPostBackTrigger t1 = new AsyncPostBackTrigger();
     UpdatePanel1.Triggers.Add(t1);
     t1.ControlID = radCHANGE_TYPE2.UniqueID;
     AsyncPostBackTrigger t2 = new AsyncPostBackTrigger();
     UpdatePanel1.Triggers.Add(t2);
     t2.ControlID = radCHANGE_TYPE3.UniqueID;
     AsyncPostBackTrigger t3 = new AsyncPostBackTrigger();
     UpdatePanel1.Triggers.Add(t3);
     t3.ControlID = btnSetQty.UniqueID;
     AsyncPostBackTrigger t4 = new AsyncPostBackTrigger();
     UpdatePanel1.Triggers.Add(t4);
     t4.ControlID = btnAdd.UniqueID;
     AsyncPostBackTrigger t5 = new AsyncPostBackTrigger();
     UpdatePanel1.Triggers.Add(t5);
     t5.ControlID = btnUpdate.UniqueID;
     AsyncPostBackTrigger t6 = new AsyncPostBackTrigger();
     UpdatePanel1.Triggers.Add(t6);
     t6.ControlID = btnCancel.UniqueID;
 }
Exemplo n.º 20
0
    protected void Page_Init(object sender, EventArgs e)
    {
        #region 設定 Trigger

        #region 設定 up_Condition

        AsyncPostBackTrigger trigger_up_Condition1 = new AsyncPostBackTrigger();
        trigger_up_Condition1.EventName = "Click";
        trigger_up_Condition1.ControlID = this.but_Disc_Insert.UniqueID;
        this.up_Condition.Triggers.Add(trigger_up_Condition1);

        AsyncPostBackTrigger trigger_up_Condition2 = new AsyncPostBackTrigger();
        trigger_up_Condition2.EventName = "Click";
        trigger_up_Condition2.ControlID = this.but_GetDiscInv.UniqueID;
        this.up_Condition.Triggers.Add(trigger_up_Condition2);

        #endregion

        #region 設定 up_DiscInv trigger

        AsyncPostBackTrigger trigger_up_DiscInv1 = new AsyncPostBackTrigger();
        trigger_up_DiscInv1.EventName = "Click";
        trigger_up_DiscInv1.ControlID = this.but_GetDiscInv.UniqueID;
        this.up_DiscInv.Triggers.Add(trigger_up_DiscInv1);

        AsyncPostBackTrigger trigger_up_DiscInv2 = new AsyncPostBackTrigger();
        trigger_up_DiscInv2.EventName = "Click";
        trigger_up_DiscInv2.ControlID = this.but_Disc_Insert.UniqueID;
        this.up_DiscInv.Triggers.Add(trigger_up_DiscInv2);

        AsyncPostBackTrigger trigger_up_DiscInv3 = new AsyncPostBackTrigger();
        trigger_up_DiscInv3.EventName = "CheckedChanged";
        trigger_up_DiscInv3.ControlID = this.chb_REPROOF_FLG.UniqueID;
        this.up_DiscInv.Triggers.Add(trigger_up_DiscInv3);

        AsyncPostBackTrigger trigger_up_DiscInv4 = new AsyncPostBackTrigger();
        trigger_up_DiscInv4.EventName = "CheckedChanged";
        trigger_up_DiscInv4.ControlID = this.chb_CANCEL_FLG.UniqueID;
        this.up_DiscInv.Triggers.Add(trigger_up_DiscInv4);

        AsyncPostBackTrigger trigger_up_DiscInv5 = new AsyncPostBackTrigger();
        trigger_up_DiscInv5.EventName = "CheckedChanged";
        trigger_up_DiscInv5.ControlID = this.chb_RECEIPT_FLG.UniqueID;
        this.up_DiscInv.Triggers.Add(trigger_up_DiscInv5);

        #endregion

        #region 設定 up_DiscItem trigger

        AsyncPostBackTrigger trigger_up_DiscItem1 = new AsyncPostBackTrigger();
        trigger_up_DiscItem1.EventName = "Click";
        trigger_up_DiscItem1.ControlID = this.but_GetDiscInv.UniqueID;
        this.up_DiscItem.Triggers.Add(trigger_up_DiscItem1);

        AsyncPostBackTrigger trigger_up_DiscItem2 = new AsyncPostBackTrigger();
        trigger_up_DiscItem2.EventName = "RowCommand";
        trigger_up_DiscItem2.ControlID = this.gv_DiscInv.UniqueID;
        this.up_DiscItem.Triggers.Add(trigger_up_DiscItem2);

        AsyncPostBackTrigger trigger_up_DiscItem3 = new AsyncPostBackTrigger();
        trigger_up_DiscItem3.EventName = "CheckedChanged";
        trigger_up_DiscItem3.ControlID = this.chb_REPROOF_FLG.UniqueID;
        this.up_DiscItem.Triggers.Add(trigger_up_DiscItem3);

        AsyncPostBackTrigger trigger_up_DiscItem4 = new AsyncPostBackTrigger();
        trigger_up_DiscItem4.EventName = "CheckedChanged";
        trigger_up_DiscItem4.ControlID = this.chb_CANCEL_FLG.UniqueID;
        this.up_DiscItem.Triggers.Add(trigger_up_DiscItem4);

        AsyncPostBackTrigger trigger_up_DiscItem5 = new AsyncPostBackTrigger();
        trigger_up_DiscItem5.EventName = "CheckedChanged";
        trigger_up_DiscItem5.ControlID = this.chb_RECEIPT_FLG.UniqueID;
        this.up_DiscItem.Triggers.Add(trigger_up_DiscItem5);

        #endregion

        #endregion

        #region 設定Toolbar的事件

        WUI_GMToolbarV uc = (WUI_GMToolbarV)this.GMToolbar1;
        uc.Btn_RecFirst += new WUI_GMToolbarV.UCDelegate(this.UC_RecFirst);//第一筆
        uc.Btn_RecLast += new WUI_GMToolbarV.UCDelegate(this.UC_RecLast);//最後一筆
        uc.Btn_RecNext += new WUI_GMToolbarV.UCDelegate(this.UC_RecNext);//下一筆
        uc.Btn_RecPre += new WUI_GMToolbarV.UCDelegate(this.UC_RecPre);//上一筆

        #endregion
    }
Exemplo n.º 21
0
    private void Page_Init(object sender, System.EventArgs e)
    {
        WUI_GMToolbarV uc = (WUI_GMToolbarV)this.GMToolbar1;

        uc.Btn_RecFirst += new WUI_GMToolbarV.UCDelegate(uc_Btn_RecFirst);
        uc.Btn_RecLast += new WUI_GMToolbarV.UCDelegate(uc_Btn_RecLast);
        uc.Btn_RecNext += new WUI_GMToolbarV.UCDelegate(uc_Btn_RecNext);
        uc.Btn_RecPre += new WUI_GMToolbarV.UCDelegate(uc_Btn_RecPre);

        AsyncPostBackTrigger trigger_up_Msg1 = new AsyncPostBackTrigger();
        trigger_up_Msg1.EventName = "Click";
        trigger_up_Msg1.ControlID = this.btnSearch.UniqueID;
        this.UpdatePanel2.Triggers.Add(trigger_up_Msg1);
    }
Exemplo n.º 22
0
    protected void Page_Init(object sender, EventArgs e)
    {
        #region 設定 Trigger

        AsyncPostBackTrigger trigger1 = new AsyncPostBackTrigger();
        trigger1.EventName = "Click";
        trigger1.ControlID = btn_ResetRoute.UniqueID;
        UpdatePanel1.Triggers.Add(trigger1);

        #endregion
    }
Exemplo n.º 23
0
    protected void Page_Init(object sender, EventArgs e)
    {
        //Mycart3.Update();
        Mycart3.ContentTemplateContainer.EnableViewState = true;
        currentScriptManager = System.Web.UI.ScriptManager.GetCurrent(this.Page);
        //Mycart2.Controls.Clear();
        // Mycart = new UpdatePanel();
        // Mycart.ID = "updatee";
        // Mycart.Attributes.Add("runat", "server");
        // Mycart.UpdateMode = UpdatePanelUpdateMode.Conditional;
        cid       = (string)Session["cust_id"];
        sessionid = Session.SessionID;
        SqlCommand    co1  = new SqlCommand();
        SqlConnection con1 = new SqlConnection();

        con1.ConnectionString = ConfigurationManager.ConnectionStrings["OrangeConnectionString"].ConnectionString;
        //con1.ConnectionString = "Data Source=GLOBELERA-PC;Initial Catalog=Orange;Integrated Security=True";
        con1.Open();
        co1.CommandText = "select item_name,qty,item_price,cart_id from [cart] where client_user_id='" + cid + "' AND client_session_id='" + sessionid + "' AND payment_status='Pending'";
        co1.Connection  = con1;
        int                i = 0, j = 0;
        string             data = "";
        HtmlGenericControl ul;

        reader = co1.ExecuteReader();
        //if (!IsPostBack)
        {
            if (reader.HasRows)
            {
                HtmlGenericControl div = new HtmlGenericControl("div");
                div.ID = "dynamiccart";
                while (reader.Read())
                {
                    cartid = reader.GetInt32(3);
                    quantitycontrol();
                    string name = reader.GetString(0);
                    price = reader.GetInt32(2);
                    i     = i + 1;

                    lbtnDelete          = new LinkButton();
                    lbtnDelete.Text     = "Remove";
                    lbtnDelete.CssClass = "linkdeletecart";
                    lbtnDelete.Attributes.Add("runat", "server");
                    lbtnDelete.Attributes.Add("AutoPost", "true");
                    lbtnDelete.Click          += new EventHandler(this.lbtnDelete_Command);
                    lbtnDelete.ID              = "lkbtDelete" + cartid.ToString();
                    lbtnDelete.CommandArgument = cartid.ToString();
                    lbtnDelete.CommandName     = "Delete";

                    ul    = new HtmlGenericControl("ul");
                    ul.ID = "dyanmicul" + cartid;
                    ul.Attributes.Add("class", "carttablehead");
                    HtmlGenericControl li = new HtmlGenericControl("li");
                    li.ID        = "dynamicli" + cartid;
                    li.InnerHtml = name;
                    ul.Controls.Add(li);
                    HtmlGenericControl li2 = new HtmlGenericControl("li");
                    li2.ID = "dynamicli2" + cartid;
                    //li.InnerHtml = name;
                    //data = "<ul class='carttablehead'><li class=''>" + name + "</li><li class=''>";
                    //Mycart.Controls.Add(new LiteralControl(data));
                    Mycart3.ContentTemplateContainer.Controls.Add(ul);
                    //Mycart2.Controls.Add(new LiteralControl(data));
                    HtmlGenericControl cartdiv = new HtmlGenericControl("div");
                    cartdiv.ID = "innercartdiv" + cartid;
                    cartdiv.Attributes.Add("class", "cart-qty-panel-read fk-text-center");
                    cartdiv.Controls.Add(qtylink);
                    // Mycart3.ContentTemplateContainer.Controls.Add(new LiteralControl("<div class='cart-qty-panel-read fk-text-center'>"));
                    // Mycart2.Controls.Add(new LiteralControl("<div class='cart-qty-panel-read fk-text-center'>"));
                    Mycart3.ContentTemplateContainer.Controls.Add(cartdiv);
                    //Mycart2.Controls.Add(qtylink);

                    textbox1 = new TextBox();

                    textbox1.Attributes.Add("name", "qty" + i);
                    textbox1.Attributes.Add("runat", "server");
                    //textbox.Attributes.Add("AutoPost", "true");
                    textbox1.Attributes.Add("class", "cart-qty-textbox");
                    textbox1.ID   = (cartid).ToString() + i;
                    textbox1.Text = (qty).ToString();
                    //textbox1.AutoPostBack = true;
                    text_qty_val          = qty.ToString();
                    textbox1.TextChanged += new EventHandler(this.textbox1_TextChanged);
                    hide         = new HiddenField();
                    hide.ID      = "hide_" + cartid;
                    hide.Value   = price.ToString();
                    tvalue       = new HiddenField();
                    tvalue.ID    = "text_" + cartid;
                    tvalue.Value = qty.ToString();
                    HtmlGenericControl cartdivtext = new HtmlGenericControl("div");
                    cartdivtext.Attributes.Add("class", "cart-qty-panel-write fk-hidden");
                    cartdivtext.Controls.Add(textbox1);
                    cartdivtext.Controls.Add(hide);
                    cartdivtext.Controls.Add(tvalue);
                    //Mycart3.ContentTemplateContainer.Controls.Add(new LiteralControl("</div><div class='cart-qty-panel-write fk-hidden'>"));
                    //Mycart2.Controls.Add(new LiteralControl("</div><div class='cart-qty-panel-write fk-hidden'>"));
                    //Mycart3.ContentTemplateContainer.Controls.Add(textbox1);
                    //Mycart2.Controls.Add(textbox1);
                    save      = new LinkButton();
                    save.Text = "Save";
                    save.Attributes.Add("AutoPostBack ", "true");
                    save.Attributes.Add("class", "fk-smallfont fk-font-small fksd-smalltext");
                    save.ID = cartid.ToString();
                    //save.Attributes.Add("onclick", "save_ServerClick");// += new EventHandler(this.save_ServerClick);
                    save.Click       += new EventHandler(this.save_ServerClick);
                    save.ClientIDMode = ClientIDMode.Static;
                    save.Attributes.Add("runat", "server");
                    cartdivtext.Controls.Add(save);
                    li2.Controls.Add(cartdiv);
                    li2.Controls.Add(cartdivtext);
                    ul.Controls.Add(li2);
                    HtmlGenericControl liprice = new HtmlGenericControl("li");
                    liprice.ID        = "pricel" + cartid;
                    liprice.InnerHtml = (price * qty).ToString();
                    ul.Controls.Add(liprice);
                    //Mycart3.ContentTemplateContainer.Controls.Add(save);
                    //Mycart2.Controls.Add(save);
                    //Mycart3.ContentTemplateContainer.Controls.Add(new LiteralControl("</div></li><li class=''>" + price * qty + "</li>"));
                    // Mycart2.Controls.Add(new LiteralControl("</div></li><li class=''>" + price * qty + "</li>"));
                    ul.Controls.Add(lbtnDelete);
                    //Mycart3.ContentTemplateContainer.Controls.Add(lbtnDelete);
                    //Mycart2.Controls.Add(lbtnDelete);
                    System.Web.UI.AsyncPostBackTrigger trig = new System.Web.UI.AsyncPostBackTrigger();
                    trig.ControlID = save.ID;
                    trig.EventName = "Click";
                    Mycart3.Triggers.Add(trig);
                    System.Web.UI.AsyncPostBackTrigger trigdelete = new System.Web.UI.AsyncPostBackTrigger();
                    trigdelete.ControlID = lbtnDelete.ID;
                    trigdelete.EventName = "Click";
                    Mycart3.Triggers.Add(trig);
                    currentScriptManager.RegisterAsyncPostBackControl(save);
                    currentScriptManager.RegisterAsyncPostBackControl(lbtnDelete);
                    //Mycart3.ContentTemplateContainer.Controls.Add(new LiteralControl("</ul>"));
                    //Mycart2.Controls.Add(new LiteralControl("</ul>"));

                    //Mycart.ChildrenAsTriggers = true;
                    //ScriptManager1.RegisterAsyncPostBackControl(save);
                    //ScriptManager1.RegisterAsyncPostBackControl(lbtnDelete);
                    //Page.Form.FindControl("cartlayer").Controls.Add(Mycart);
                    //cartlayer.Controls.Add(Mycart);

                    //updatecartpanel.ContentTemplateContainer.Controls.Add(save);
                    //ScriptManager currPageScriptManager = ScriptManager.GetCurrent(Page) as ScriptManager;
                    //if (currPageScriptManager != null)
                    //{
                    //    //Response.Write("<script>alert(' text=" + save.ClientID + "')</script>");
                    //    // write your code
                    //    currPageScriptManager.RegisterAsyncPostBackControl(save);
                    //    // Now call the UpdatePanel.Update() when myControlName posts back.
                    //    Mycart.Update();
                    //}


                    //updatecartpanel.Triggers.Add(trig);
                    //updatecartpanel.Update();
                    //Response.Write("<script>alert(' text=" + save.ClientID + "')</script>");
                    //at = new AsyncPostBackTrigger();
                    //at.ControlID = save.ID;
                    //at.EventName = "ServerClick";
                    //updatecartpanel.Triggers.Add(at);
                    //div.Controls.Add(ul);
                    div.Controls.Add(ul);
                    Mycart3.ContentTemplateContainer.Controls.Add(div);
                }

                //Page.Form.FindControl("Mycart2").Controls.Add(Mycart3);
            }
            else
            {
                Mycart3.ContentTemplateContainer.Controls.Add(new LiteralControl("<div class='nodata'>No Products added in Cart</div>"));
                //Mycart3.Update();
            }
        }
        reader.Close();
    }
Exemplo n.º 24
0
    protected void Page_Init(object sender, EventArgs e)
    {
        #region 設定 Trigger

        //AsyncPostBackTrigger trigger_ActiveTabChanged = new AsyncPostBackTrigger();
        //trigger_ActiveTabChanged.EventName = "ActiveTabChanged";
        //trigger_ActiveTabChanged.ControlID = this.TabContainer1.UniqueID;
        //this.upButton.Triggers.Add(trigger_ActiveTabChanged);

        #region 設定 up_Toolbar

        AsyncPostBackTrigger trigger_up_Toolbar1 = new AsyncPostBackTrigger();
        trigger_up_Toolbar1.EventName = "ActiveTabChanged";
        trigger_up_Toolbar1.ControlID = this.TabContainer1.UniqueID;
        this.up_Toolbar.Triggers.Add(trigger_up_Toolbar1);

        #endregion


        #region 設定 up_Format

        AsyncPostBackTrigger trigger_up_Format1 = new AsyncPostBackTrigger();
        trigger_up_Format1.EventName = "ActiveTabChanged";
        trigger_up_Format1.ControlID = this.TabContainer1.UniqueID;
        this.up_Format.Triggers.Add(trigger_up_Format1);

        AsyncPostBackTrigger trigger_up_Format2 = new AsyncPostBackTrigger();
        trigger_up_Format2.EventName = "Click";
        trigger_up_Format2.ControlID = this.btn_Query.UniqueID;
        this.up_Format.Triggers.Add(trigger_up_Format2);

        #endregion


        #endregion
    }
Exemplo n.º 25
0
    protected void Page_Init(object sender, EventArgs e)
    {
        #region 設定 Trigger

        #region 設定 up_Msg trigger

        AsyncPostBackTrigger trigger_up_Msg1 = new AsyncPostBackTrigger();
        trigger_up_Msg1.EventName = "Click";
        trigger_up_Msg1.ControlID = this.but_Query.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg1);

        AsyncPostBackTrigger trigger_up_Msg2 = new AsyncPostBackTrigger();
        trigger_up_Msg2.EventName = "PageIndexChanging";
        trigger_up_Msg2.ControlID = this.gv_Query_Result.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg2);

        AsyncPostBackTrigger trigger_up_Msg3 = new AsyncPostBackTrigger();
        trigger_up_Msg3.EventName = "Sorting";
        trigger_up_Msg3.ControlID = this.gv_Query_Result.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg3);

        AsyncPostBackTrigger trigger_up_Msg4 = new AsyncPostBackTrigger();
        trigger_up_Msg4.EventName = "Click";
        trigger_up_Msg4.ControlID = this.but_Expect_Item.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg4);

        AsyncPostBackTrigger trigger_up_Msg5 = new AsyncPostBackTrigger();
        trigger_up_Msg5.EventName = "Click";
        trigger_up_Msg5.ControlID = this.but_Execute.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg5);

        #endregion

        #region 設定 up_Query_Result trigger

        AsyncPostBackTrigger trigger_up_Query_Result1 = new AsyncPostBackTrigger();
        trigger_up_Query_Result1.EventName = "Click";
        trigger_up_Query_Result1.ControlID = this.but_Query.UniqueID;
        this.up_Query_Result.Triggers.Add(trigger_up_Query_Result1);

        #endregion

        #endregion
    }
Exemplo n.º 26
0
    protected void Page_Init(object sender, EventArgs e)
    {
        #region 設定 Trigger

        #region 設定 up_ErrorMsg trigger

        AsyncPostBackTrigger trigger_ErrorMsg1 = new AsyncPostBackTrigger();
        trigger_ErrorMsg1.EventName = "Click";
        trigger_ErrorMsg1.ControlID = this.but_up_Insert.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_ErrorMsg1);

        AsyncPostBackTrigger trigger_ErrorMsg2 = new AsyncPostBackTrigger();
        trigger_ErrorMsg2.EventName = "Click";
        trigger_ErrorMsg2.ControlID = this.but_up_Query.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_ErrorMsg2);

        AsyncPostBackTrigger trigger_ErrorMsg3 = new AsyncPostBackTrigger();
        trigger_ErrorMsg3.EventName = "Click";
        trigger_ErrorMsg3.ControlID = this.but_up_Delete.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_ErrorMsg3);

        AsyncPostBackTrigger trigger_ErrorMsg4 = new AsyncPostBackTrigger();
        trigger_ErrorMsg4.EventName = "Click";
        trigger_ErrorMsg4.ControlID = this.but_up_Edit.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_ErrorMsg4);

        AsyncPostBackTrigger trigger_ErrorMsg5 = new AsyncPostBackTrigger();
        trigger_ErrorMsg5.EventName = "Click";
        trigger_ErrorMsg5.ControlID = this.but_up_Save.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_ErrorMsg5);

        AsyncPostBackTrigger trigger_ErrorMsg6 = new AsyncPostBackTrigger();
        trigger_ErrorMsg6.EventName = "Click";
        trigger_ErrorMsg6.ControlID = this.but_up_Cancle.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_ErrorMsg6);

        AsyncPostBackTrigger trigger_ErrorMsg7 = new AsyncPostBackTrigger();
        trigger_ErrorMsg7.EventName = "Click";
        trigger_ErrorMsg7.ControlID = this.but_down_AddDetail.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_ErrorMsg7);

        AsyncPostBackTrigger trigger_ErrorMsg8 = new AsyncPostBackTrigger();
        trigger_ErrorMsg8.EventName = "Click";
        trigger_ErrorMsg8.ControlID = this.but_down_Update.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_ErrorMsg8);

        AsyncPostBackTrigger trigger_ErrorMsg9 = new AsyncPostBackTrigger();
        trigger_ErrorMsg9.EventName = "Click";
        trigger_ErrorMsg9.ControlID = this.but_down_Cancel.UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_ErrorMsg9);

        #endregion

        #region 設定 up_RightMsg trigger

        AsyncPostBackTrigger trigger_RightMsg1 = new AsyncPostBackTrigger();
        trigger_RightMsg1.EventName = "Click";
        trigger_RightMsg1.ControlID = this.but_up_Save.UniqueID;
        this.up_RightMsg.Triggers.Add(trigger_RightMsg1);

        AsyncPostBackTrigger trigger_RightMsg2 = new AsyncPostBackTrigger();
        trigger_RightMsg2.EventName = "Click";
        trigger_RightMsg2.ControlID = this.but_up_Query.UniqueID;
        this.up_RightMsg.Triggers.Add(trigger_RightMsg2);

        AsyncPostBackTrigger trigger_RightMsg3 = new AsyncPostBackTrigger();
        trigger_RightMsg3.EventName = "Click";
        trigger_RightMsg3.ControlID = this.but_up_Delete.UniqueID;
        this.up_RightMsg.Triggers.Add(trigger_RightMsg3);

        AsyncPostBackTrigger trigger_RightMsg4 = new AsyncPostBackTrigger();
        trigger_RightMsg4.EventName = "Click";
        trigger_RightMsg4.ControlID = this.but_up_Edit.UniqueID;
        this.up_RightMsg.Triggers.Add(trigger_RightMsg4);

        AsyncPostBackTrigger trigger_RightMsg5 = new AsyncPostBackTrigger();
        trigger_RightMsg5.EventName = "Click";
        trigger_RightMsg5.ControlID = this.but_up_Save.UniqueID;
        this.up_RightMsg.Triggers.Add(trigger_RightMsg5);

        AsyncPostBackTrigger trigger_RightMsg6 = new AsyncPostBackTrigger();
        trigger_RightMsg6.EventName = "Click";
        trigger_RightMsg6.ControlID = this.but_up_Cancle.UniqueID;
        this.up_RightMsg.Triggers.Add(trigger_RightMsg6);

        #endregion

        #region 設定 up_Middle trigger

        AsyncPostBackTrigger trigger_up_Middle1 = new AsyncPostBackTrigger();
        trigger_up_Middle1.EventName = "Click";
        trigger_up_Middle1.ControlID = this.but_down_Update.UniqueID;
        this.up_Middle.Triggers.Add(trigger_up_Middle1);

        AsyncPostBackTrigger trigger_up_Middle2 = new AsyncPostBackTrigger();
        trigger_up_Middle2.EventName = "Click";
        trigger_up_Middle2.ControlID = this.but_up_Save.UniqueID;
        this.up_Middle.Triggers.Add(trigger_up_Middle2);

        AsyncPostBackTrigger trigger_up_Middle3 = new AsyncPostBackTrigger();
        trigger_up_Middle3.EventName = "Click";
        trigger_up_Middle3.ControlID = this.but_up_Query.UniqueID;
        this.up_Middle.Triggers.Add(trigger_up_Middle3);

        AsyncPostBackTrigger trigger_up_Middle4 = new AsyncPostBackTrigger();
        trigger_up_Middle4.EventName = "Click";
        trigger_up_Middle4.ControlID = this.but_up_Edit.UniqueID;
        this.up_Middle.Triggers.Add(trigger_up_Middle4);

        AsyncPostBackTrigger trigger_up_Middle5 = new AsyncPostBackTrigger();
        trigger_up_Middle5.EventName = "Click";
        trigger_up_Middle5.ControlID = this.but_up_Cancle.UniqueID;
        this.up_Middle.Triggers.Add(trigger_up_Middle5);

        #endregion

        #region 設定 up_Down_AddButton trigger


        #endregion

        #region 設定 up_Down_AddDetail trigger

        #endregion

        #region 設定 up_Down_Button trigger

        #endregion

        #region ToolBar "第一筆"鈕


        AsyncPostBackTrigger trigger_RecFirst1 = new AsyncPostBackTrigger();
        trigger_RecFirst1.EventName = "Click";
        trigger_RecFirst1.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[25]).UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_RecFirst1);

        AsyncPostBackTrigger trigger_RecFirst2 = new AsyncPostBackTrigger();
        trigger_RecFirst2.EventName = "Click";
        trigger_RecFirst2.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[25]).UniqueID;
        this.up_Master.Triggers.Add(trigger_RecFirst2);

        AsyncPostBackTrigger trigger_RecFirst3 = new AsyncPostBackTrigger();
        trigger_RecFirst3.EventName = "Click";
        trigger_RecFirst3.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[25]).UniqueID;
        this.up_Middle.Triggers.Add(trigger_RecFirst3);

        #endregion

        #region ToolBar "最後一筆"鈕


        AsyncPostBackTrigger trigger_RecLast1 = new AsyncPostBackTrigger();
        trigger_RecLast1.EventName = "Click";
        trigger_RecLast1.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[31]).UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_RecLast1);

        AsyncPostBackTrigger trigger_RecLast2 = new AsyncPostBackTrigger();
        trigger_RecLast2.EventName = "Click";
        trigger_RecLast2.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[31]).UniqueID;
        this.up_Master.Triggers.Add(trigger_RecLast2);

        AsyncPostBackTrigger trigger_RecLast3 = new AsyncPostBackTrigger();
        trigger_RecLast3.EventName = "Click";
        trigger_RecLast3.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[31]).UniqueID;
        this.up_Middle.Triggers.Add(trigger_RecLast3);

        #endregion

        #region ToolBar "下一筆"鈕


        AsyncPostBackTrigger trigger_RecNext1 = new AsyncPostBackTrigger();
        trigger_RecNext1.EventName = "Click";
        trigger_RecNext1.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[29]).UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_RecNext1);

        AsyncPostBackTrigger trigger_RecNext2 = new AsyncPostBackTrigger();
        trigger_RecNext2.EventName = "Click";
        trigger_RecNext2.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[29]).UniqueID;
        this.up_Master.Triggers.Add(trigger_RecNext2);

        AsyncPostBackTrigger trigger_RecNext3 = new AsyncPostBackTrigger();
        trigger_RecNext3.EventName = "Click";
        trigger_RecNext3.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[29]).UniqueID;
        this.up_Middle.Triggers.Add(trigger_RecNext3);

        #endregion

        #region ToolBar "上一筆"鈕


        AsyncPostBackTrigger trigger_RecPre1 = new AsyncPostBackTrigger();
        trigger_RecPre1.EventName = "Click";
        trigger_RecPre1.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[27]).UniqueID;
        this.up_ErrorMsg.Triggers.Add(trigger_RecPre1);

        AsyncPostBackTrigger trigger_RecPre2 = new AsyncPostBackTrigger();
        trigger_RecPre2.EventName = "Click";
        trigger_RecPre2.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[27]).UniqueID;
        this.up_Master.Triggers.Add(trigger_RecPre2);

        AsyncPostBackTrigger trigger_RecPre3 = new AsyncPostBackTrigger();
        trigger_RecPre3.EventName = "Click";
        trigger_RecPre3.ControlID = ((ImageButton)GMToolbar1.Controls[0].Controls[27]).UniqueID;
        this.up_Middle.Triggers.Add(trigger_RecPre3);

        #endregion

        #endregion
    }
Exemplo n.º 27
0
    private void Page_Init(object sender, System.EventArgs e)
    {
        #region

        AsyncPostBackTrigger trigger_up_Msg1 = new AsyncPostBackTrigger();
        trigger_up_Msg1.EventName = "Click";
        trigger_up_Msg1.ControlID = this.btnQuery.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger_up_Msg1);

        AsyncPostBackTrigger trigger_up_Msg2 = new AsyncPostBackTrigger();
        trigger_up_Msg2.EventName = "Click";
        trigger_up_Msg2.ControlID = this.btnQuery.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg2);

        AsyncPostBackTrigger trigger_up_Msg3 = new AsyncPostBackTrigger();
        trigger_up_Msg3.EventName = "Click";
        trigger_up_Msg3.ControlID = this.btnAdd.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger_up_Msg3);

        AsyncPostBackTrigger trigger_up_Msg4 = new AsyncPostBackTrigger();
        trigger_up_Msg4.EventName = "Click";
        trigger_up_Msg4.ControlID = this.btnAdd.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg4);

        AsyncPostBackTrigger trigger_up_Msg5 = new AsyncPostBackTrigger();
        trigger_up_Msg5.EventName = "Click";
        trigger_up_Msg5.ControlID = this.btnSave.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger_up_Msg5);

        AsyncPostBackTrigger trigger_up_Msg6 = new AsyncPostBackTrigger();
        trigger_up_Msg6.EventName = "Click";
        trigger_up_Msg6.ControlID = this.btnSave.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg6);

        AsyncPostBackTrigger trigger_up_Msg7 = new AsyncPostBackTrigger();
        trigger_up_Msg7.EventName = "Click";
        trigger_up_Msg7.ControlID = this.btnCancel.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger_up_Msg7);

        AsyncPostBackTrigger trigger_up_Msg8 = new AsyncPostBackTrigger();
        trigger_up_Msg8.EventName = "Click";
        trigger_up_Msg8.ControlID = this.btnCancel.UniqueID;
        this.up_Msg.Triggers.Add(trigger_up_Msg8);

        AsyncPostBackTrigger trigger_up_Msg9 = new AsyncPostBackTrigger();
        trigger_up_Msg9.EventName = "Click";
        trigger_up_Msg9.ControlID = this.btnAdd.UniqueID;
        this.UpdatePanel2.Triggers.Add(trigger_up_Msg9);

        AsyncPostBackTrigger trigger_up_Msg10 = new AsyncPostBackTrigger();
        trigger_up_Msg10.EventName = "Click";
        trigger_up_Msg10.ControlID = this.btnSave.UniqueID;
        this.UpdatePanel2.Triggers.Add(trigger_up_Msg10);

        AsyncPostBackTrigger trigger_up_Msg11 = new AsyncPostBackTrigger();
        trigger_up_Msg11.EventName = "Click";
        trigger_up_Msg11.ControlID = this.btnCancel.UniqueID;
        this.UpdatePanel2.Triggers.Add(trigger_up_Msg11);

        PostBackTrigger triggerExport = new PostBackTrigger();
        triggerExport.ControlID = this.btnExport.ID;
        this.UpdatePanelQuery.Triggers.Add(triggerExport);

        #endregion
    }//Page_Init
Exemplo n.º 28
0
    /// <summary>
    /// Page預設起始作業
    /// </summary>
    private void Page_Init(object sender, System.EventArgs e)
    {
        AsyncPostBackTrigger trigger1 = new AsyncPostBackTrigger();
        trigger1.EventName = "Click";
        trigger1.ControlID = this.btnExec.UniqueID;
        this.up_Msg.Triggers.Add(trigger1);

        AsyncPostBackTrigger trigger2 = new AsyncPostBackTrigger();
        trigger2.EventName = "Click";
        trigger2.ControlID = this.btnExec.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger2);
    }
Exemplo n.º 29
0
 /// <summary>
 /// Adds an update trigger for when the block instance properties are updated.
 /// </summary>
 /// <param name="updatePanel">The update panel.</param>
 public void AddAttributeUpdateTrigger( UpdatePanel updatePanel )
 {
     if ( BlockInstance.Authorized( "Configure", CurrentUser ) )
     {
         AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
         trigger.ControlID = string.Format( "blck-cnfg-trggr-{0}", BlockInstance.Id );
         trigger.EventName = "Click";
         updatePanel.Triggers.Add( trigger );
     }
 }
Exemplo n.º 30
0
    protected void Page_Init(object sender, EventArgs e)
    {
        #region 設定 Trigger

        AsyncPostBackTrigger trigger1 = new AsyncPostBackTrigger();
        trigger1.EventName = "Click";
        trigger1.ControlID = this.btn_PatternSelect.UniqueID;
        this.UpdatePanel1.Triggers.Add(trigger1);
        #endregion

        #region For SpecType RadioButtonList
        //SLP控制類別選取事件
        SLP_EnumBase1.RadioButtonListControl.SelectedIndexChanged += new EventHandler(rBtnListSpecType_SelectedIndexChanged);
        SLP_EnumBase1.RadioButtonListControl.AutoPostBack = true;
        #endregion
    }
Exemplo n.º 31
0
 private void Page_Init(object sender, System.EventArgs e)
 {
     AsyncPostBackTrigger t = new AsyncPostBackTrigger();
     UpdatePanel1.Triggers.Add(t);
     t.ControlID = btnQuery.UniqueID;
 }