当前位置: 首页>>代码示例>>C#>>正文


C# CommandParameters.ToString方法代码示例

本文整理汇总了C#中CommandParameters.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# CommandParameters.ToString方法的具体用法?C# CommandParameters.ToString怎么用?C# CommandParameters.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CommandParameters的用法示例。


在下文中一共展示了CommandParameters.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OkButton_Click

        protected void OkButton_Click(object sender, EventArgs e)
        {
            string refreshCommand = Mediachase.Ibn.Web.UI.WebControls.CommandHandler.GetRefreshCommand(this.Page);
            string paramString = String.Empty;

            if (!String.IsNullOrEmpty(refreshCommand))
            {
                CommandParameters cp = new CommandParameters(refreshCommand);
                cp.CommandArguments = new Dictionary<string, string>();
                cp.AddCommandArgument("DeleteType", DeleteTypeList.SelectedValue);

                if (ObjectId != PrimaryKeyId.Empty)
                {
                    cp.AddCommandArgument("ObjectId", ObjectId.ToString());
                    paramString = cp.ToString();
                }
                else if (Request.QueryString["GridId"] != null)
                {
                    cp.AddCommandArgument("GridId", Request.QueryString["GridId"]);
                    paramString = cp.ToString();
                }
                else
                {
                    paramString = String.Empty;
                }
            }
            Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, paramString);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:28,代码来源:OrgItemsDeleteConfirm.ascx.cs

示例2: SaveButton_Click

        protected void SaveButton_Click(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(ClassName))
            {
                MetaClass mc = MetaDataWrapper.GetMetaClassByName(ClassName);

                HistoryMetaClassInfo historyInfo = HistoryManager.GetInfo(mc);
                historyInfo.SelectedFields.Add(FieldList.SelectedValue);
                HistoryManager.SetInfo(mc, historyInfo);

                ListViewProfile[] mas = ListViewProfile.GetSystemProfiles(HistoryManager.GetHistoryMetaClassName(ClassName), "ItemHistoryList");
                if (mas.Length == 0)
                {
                    CHelper.GetHistorySystemListViewProfile(HistoryManager.GetHistoryMetaClassName(ClassName), "ItemHistoryList");
                    mas = ListViewProfile.GetSystemProfiles(HistoryManager.GetHistoryMetaClassName(ClassName), "ItemHistoryList");
                }
                if (!mas[0].FieldSet.Contains(FieldList.SelectedValue))
                {
                    mas[0].FieldSet.Add(FieldList.SelectedValue);
                    mas[0].ColumnsUI.Add(new ColumnProperties(FieldList.SelectedValue, "150px", String.Empty));
                    ListViewProfile.SaveSystemProfile(HistoryManager.GetHistoryMetaClassName(ClassName), "ItemHistoryList", Mediachase.IBN.Business.Security.CurrentUser.UserID, mas[0]);
                }

                CommandParameters cp = new CommandParameters(CommandName);
                Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
                //CHelper.UpdateModalPopupContainer(this, ContainerId);
                //CHelper.RequireDataBind();
            }
        }
开发者ID:0anion0,项目名称:IBN,代码行数:29,代码来源:HistoryFieldAdd.ascx.cs

示例3: btnCancel_Click

 void btnCancel_Click(object sender, EventArgs e)
 {
     CommandParameters cp = new CommandParameters(Request["CommandName"]);
     cp.CommandArguments = new Dictionary<string, string>();
     cp.AddCommandArgument("Uid", "null");
     CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
 }
开发者ID:0anion0,项目名称:IBN,代码行数:7,代码来源:UpdateConfirmation.ascx.cs

示例4: Invoke

        public void Invoke(object sender, object element)
        {
            if (element is CommandParameters)
            {
                CommandParameters cp = (CommandParameters)element;
                //if (!cp.CommandArguments.ContainsKey("ControlId"))
                //    throw new ArgumentNullException("CommandParameters.ControlId @ GoogleGadgetRefresh");

                //string _cid = cp.CommandArguments["ControlId"];
                if (HttpContext.Current.Session["ControlId"] == null)
                    throw new ArgumentNullException("Session.ControlId @ GoogleGadgetRefresh");

                string _cid = HttpContext.Current.Session["ControlId"].ToString();
                string id = MetaViewGroupUtil.GetIdFromUniqueKey(cp.CommandArguments["primaryKeyId"]);
                HttpRequest request = HttpContext.Current.Request;

                if (request != null)
                {
                    GoogleGadgetEntity gge = (GoogleGadgetEntity)BusinessManager.Load("GoogleGadget", PrimaryKeyId.Parse(id));
                    ControlProperties.Provider.SaveValue(_cid, "PageSource", id);

                    if (gge != null)
                        ControlProperties.Provider.SaveValue(_cid, ControlProperties._titleKey, CHelper.GetResFileString(gge.Title));

                    CommandParameters cp2 = new CommandParameters("MC_GG_SelectItem");
                    Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(((CommandManager)sender).Page, cp2.ToString());
                    //((CommandManager)sender).Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "", true);

                }
            }
        }
开发者ID:0anion0,项目名称:IBN,代码行数:31,代码来源:GoogleGadgetRefresh.cs

示例5: AddButton_Click

 protected void AddButton_Click(object sender, EventArgs e)
 {
     if (Process())
     {
         CommandParameters cp = new CommandParameters("MC_TimeTracking_QuickAddManagerFrame");
         Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterRefreshParentFromFrameScript(this.Page, cp.ToString());
     }
 }
开发者ID:0anion0,项目名称:IBN,代码行数:8,代码来源:QuickAddManager.ascx.cs

示例6: btnExport_Click

 protected void btnExport_Click(object sender, EventArgs e)
 {
     CommandParameters cp = new CommandParameters(_refreshCommand);
     cp.CommandArguments = new System.Collections.Generic.Dictionary<string, string>();
     cp.AddCommandArgument("Type", _type);
     cp.AddCommandArgument("Variant", rbList.SelectedValue);
     Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
 }
开发者ID:0anion0,项目名称:IBN,代码行数:8,代码来源:IncidentListExport.ascx.cs

示例7: btnOnlyThis_Click

 void btnOnlyThis_Click(object sender, EventArgs e)
 {
     PrimaryKeyId pKey = PrimaryKeyId.Parse(Request["ObjectId"]);
     CommandParameters cp = new CommandParameters(Request["CommandName"]);
     cp.CommandArguments = new Dictionary<string, string>();
     cp.AddCommandArgument("Uid", pKey.ToString());
     CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
 }
开发者ID:0anion0,项目名称:IBN,代码行数:8,代码来源:UpdateConfirmation.ascx.cs

示例8: btnSave_ServerClick

        void btnSave_ServerClick(object sender, EventArgs e)
        {
            Mediachase.IBN.Business.PortalConfig.MdsDeliveryTimeout = int.Parse(txtDeliveryTimeout.Text) * 24 * 60;
            Mediachase.IBN.Business.PortalConfig.MdsMaxDeliveryAttempts = int.Parse(txtAttempts.Text);
            Mediachase.IBN.Business.PortalConfig.MdsDeleteOlderMoreThan = int.Parse(txtLogPeriod.Text) * 24 * 60;

            CommandParameters cp = new CommandParameters("MC_MUI_ChangeSettings");
            CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
        }
开发者ID:0anion0,项目名称:IBN,代码行数:9,代码来源:OutgoingEmailLogSettings.ascx.cs

示例9: Add_Click

        protected void Add_Click(object sender, System.EventArgs e)
        {
            int RelProjectId = int.Parse(hdnProjectId.Value);
            if (ProjectId > 0 && ProjectId != RelProjectId)
                Project2.AddRelation(ProjectId, RelProjectId);

            CommandParameters cp = new CommandParameters("MC_PM_Redirect");
            Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
        }
开发者ID:0anion0,项目名称:IBN,代码行数:9,代码来源:AddRelFromClip.aspx.cs

示例10: btnSave_ServerClick

        protected void btnSave_ServerClick(object sender, System.EventArgs e)
        {
            if (ddGroups.SelectedItem != null)
            {
                int PTodoID = int.Parse(ddGroups.SelectedValue);

                Mediachase.IBN.Business.ToDo.CreateToDoLink(ToDoID, PTodoID);
            }
            CommandParameters cp = new CommandParameters("MC_PM_ToDoRedirect");
            Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
        }
开发者ID:0anion0,项目名称:IBN,代码行数:11,代码来源:AddSuccessor.ascx.cs

示例11: TransitionButton_Click

        /// <summary>
        /// Handles the Click event of the TransitionButton 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 TransitionButton_Click(object sender, EventArgs e)
        {
            if (BlockId > 0 && TransitionList.Items.Count > 0 && TransitionList.SelectedItem != null)
            {
                string selectedTransition = TransitionList.SelectedValue;
                TimeTrackingManager.MakeTransitionWithComment(BlockId, new Guid(selectedTransition), TTBlockComment.Value);

                string cmd = String.Empty;
                if (Request["cmd"] != null)
                    cmd = Request["cmd"];
                CommandParameters cp = new CommandParameters(cmd);
                Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
            }
        }
开发者ID:0anion0,项目名称:IBN,代码行数:19,代码来源:GridPopupChangeState.ascx.cs

示例12: btnSaveBlock_Click

        /// <summary>
        /// Handles the Click event of the btnSaveBlock 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 btnSaveBlock_Click(object sender, EventArgs e)
        {
            using (TransactionScope tran = DataContext.Current.BeginTransaction())
            {
                TimeTrackingBlock ttb = MetaObjectActivator.CreateInstance<TimeTrackingBlock>(TimeTrackingBlock.GetAssignedMetaClass(), this.ObjectId);

                ProcessCollection(this.frmViewBlock.Controls, ttb);

                ttb.Save();

                tran.Commit();
            }

            CommandParameters cp = new CommandParameters("MC_TimeTracking_EditGridFrame");
            Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
        }
开发者ID:0anion0,项目名称:IBN,代码行数:21,代码来源:GridPopupEditEntry.ascx.cs

示例13: btnSave_ServerClick

        protected void btnSave_ServerClick(object sender, System.EventArgs e)
        {
            if (ddGroups.SelectedItem!=null)
            {
                int PTaskID = int.Parse(ddGroups.SelectedItem.Value);

                int lag;
                if (tbH.Text.Trim().StartsWith("-"))
                    lag = int.Parse(tbH.Text) * 60 - int.Parse(tbMin.Text);
                else
                    lag = int.Parse(tbH.Text) * 60 + int.Parse(tbMin.Text);
                Task.CreatePredecessor(TaskID,PTaskID,lag);
            }
            //Response.Redirect("../Tasks/TaskView.aspx?TaskID=" + TaskID);
            CommandParameters cp = new CommandParameters("MC_PM_TaskRedirect");
            Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
        }
开发者ID:0anion0,项目名称:IBN,代码行数:17,代码来源:AddSuccessor.ascx.cs

示例14: btnSave_Click

        protected void btnSave_Click(object sender, System.EventArgs e)
        {
            DataTable dt = (DataTable)ViewState["Participants"];
            Hashtable ht = new Hashtable();
            foreach (DataRow dr in dt.Rows)
                ht.Add((int)dr["EMailIssueExternalRecipientId"], dr["EMail"].ToString());
            EMailIssueExternalRecipient.Update(IncidentID, ht);

            if (Request["closeFramePopup"] != null)
            {
                CommandParameters cp = new CommandParameters("MC_HDM_RecipEdit");
                Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
            }
            else
                Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(),
                      "<script language=javascript>" +
                      "try {window.opener.location.href='IncidentView.aspx?IncidentId=" + IncidentID + "';}" +
                      "catch (e){}window.close();</script>");
        }
开发者ID:0anion0,项目名称:IBN,代码行数:19,代码来源:RecipientsEditor2.ascx.cs

示例15: AddButton_Click

        protected void AddButton_Click(object sender, EventArgs e)
        {
            DateTime startDate = DateTime.Parse(Request["uid"], CultureInfo.InvariantCulture);
            DateTime destStartDate = CHelper.GetWeekStartByDate(DTCWeek.SelectedDate);

            if (startDate.Date != destStartDate.Date)
            {
                TimeTrackingEntry[] mas = TimeTrackingEntry.List(FilterElement.EqualElement("OwnerId", Mediachase.IBN.Business.Security.CurrentUser.UserID), FilterElement.EqualElement("StartDate", startDate));
                List<int> entryIds = new List<int>();
                foreach (TimeTrackingEntry tte in mas)
                    entryIds.Add((int)tte.PrimaryKeyId.Value);
                if (entryIds.Count > 0)
                    TimeTrackingManager.AddEntries(destStartDate, Mediachase.IBN.Business.Security.CurrentUser.UserID, entryIds);
            }

            // Refresh parent window
            CommandParameters cp = new CommandParameters("MC_TT_CloneWeek");
            Mediachase.Ibn.Web.UI.WebControls.CommandHandler.RegisterCloseOpenedFrameScript(this.Page, cp.ToString());
        }
开发者ID:0anion0,项目名称:IBN,代码行数:19,代码来源:SelectWeekForClone.ascx.cs


注:本文中的CommandParameters.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。