Exemplo n.º 1
0
	protected void GridView_PopupMenuClick(object sender, BXPopupMenuClickEventArgs e)
	{
		BXGridView grid = sender as BXGridView;
		DataKey drv = grid.DataKeys[e.EventRowIndex];
		if (drv == null)
			return;

		switch (e.CommandName)
		{
			case "copy":
				if (currentUserCanModify)
				{
					string sourceDirectory = BXPath.Combine(BXConfigurationUtility.Constants.TemplatesFolderPath, drv["ID"].ToString());
					string targetDirectory = BXPath.Combine(BXConfigurationUtility.Constants.TemplatesFolderPath, drv["ID"] + "_copy");
					
					while (BXSecureIO.FileOrDirectoryExists(targetDirectory))
						targetDirectory += "_copy";
					BXSecureIO.DirectoryCopy(sourceDirectory, targetDirectory);
					GridView.MarkAsChanged();
				}
				break;
			case "edit":
				Response.Redirect(string.Format("TemplateEdit.aspx?id={0}", drv["ID"]));
				break;
			default:
				break;
		}
	}
Exemplo n.º 2
0
	protected void MailerGridView_PopupMenuClick(object sender, BXPopupMenuClickEventArgs e)
	{
		BXGridView grid = (BXGridView)sender;
		switch (e.CommandName)
		{
			case "copy":
				Response.Redirect("MailerEdit.aspx?action=add&id=" + (int)grid.DataKeys[e.EventRowIndex]["Id"]);
				break;
		}
	}
Exemplo n.º 3
0
	protected void GridView_PopupMenuClick(object sender, BXPopupMenuClickEventArgs e)
	{
		BXGridView grid = sender as BXGridView;
		DataKey drv = grid.DataKeys[e.EventRowIndex];
		if (drv == null)
			return;

		switch (e.CommandName)
		{
			case "copy":
				Response.Redirect(string.Format("LanguageEdit.aspx?copy={0}", drv.Value));
				break;
			case "edit":
				Response.Redirect(string.Format("LanguageEdit.aspx?id={0}", drv.Value));
				break;
		}
	}
Exemplo n.º 4
0
	protected void GridView_PopupMenuClick(object sender, BXPopupMenuClickEventArgs e)
	{
		if (e.CommandName != "install")
			return;

		AddOnPreRenderCompleteAsync(BeginAsyncOperation, EndAsyncOperation, GridView.DataKeys[e.EventRowIndex].Value);
	}
 protected void BXGridView1_PopupMenuClick1(object sender, BXPopupMenuClickEventArgs e)
 {
     if(string.Equals(e.CommandName.ToUpperInvariant(), "EDIT", StringComparison.InvariantCulture))
         Response.Redirect(
             string.Format(
                 "~/bitrix/admin/CustomFieldEdit.aspx?id={0}&{1}={2}", 
                 BXGridView1.DataKeys[e.EventRowIndex].Value, 
                 BXConfigurationUtility.Constants.BackUrl, 
                 Request.RawUrl
                 )
         );
 }
Exemplo n.º 6
0
	protected void BXGridView1_PopupMenuClick1(object sender, BXPopupMenuClickEventArgs e)
	{
		switch (e.CommandName.ToLower())
		{
			case "edit":
				Response.Redirect(string.Format("~/bitrix/admin/CustomFieldEdit.aspx?id={0}&{1}={2}", BXGridView1.DataKeys[e.EventRowIndex].Value, BXConfigurationUtility.Constants.BackUrl, Request.RawUrl));
				break;
		}
	}
Exemplo n.º 7
0
	protected void GridView_PopupMenuClick(object sender, BXPopupMenuClickEventArgs e)
	{
		if (!canManageSettings)
			return;

		string moduleId = (string)GridView.DataKeys[e.EventRowIndex].Value;

		if (e.CommandName.ToLower() == "install")
			Response.Redirect("~/bitrix/admin/modulesinstall.aspx?action=install&module=" + moduleId + "&" + BXCsrfToken.BuildQueryStringPair());
		else
			Response.Redirect("~/bitrix/admin/modulesinstall.aspx?action=uninstall&module=" + moduleId + "&" + BXCsrfToken.BuildQueryStringPair());
	}