Files
C2P/C2P/ExistingProductOffer.aspx.cs
T
2014-07-14 19:11:19 +02:00

56 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace C2P
{
public partial class ExistingProductOffer : SteamWare.UserPage
{
protected void Page_Load(object sender, EventArgs e)
{
repView.Visible = (acArticolo.valore != "");
acArticolo.eh_reset += acArticolo_eh_reset;
acArticolo.eh_valSelezionato += acArticolo_eh_valSelezionato;
}
void acArticolo_eh_valSelezionato(object sender, EventArgs e)
{
repView.Visible = (acArticolo.valore != "");
}
void acArticolo_eh_reset(object sender, EventArgs e)
{
repView.Visible = false;
}
/// <summary>
/// url x rimbalzo offerta
/// </summary>
/// <param name="_isNew">indica se nuovo prodotto o esistente</param>
/// <param name="_rawMat">codice lega</param>
/// <returns></returns>
public string getUrl(object _isNew, object _rawMat)
{
string answ = "";
bool isNew = false;
try
{
isNew = Convert.ToBoolean(_isNew);
}
catch
{ }
string product = acArticolo.valore;
if (isNew)
{
answ = string.Format("~/NewProductOffer?RawMat={0}&CodItem={1}", _rawMat, product);
}
else
{
answ = string.Format("~/Quote?RawMat={0}&CodItem={1}", _rawMat, product);
}
return answ;
}
}
}