Fix ADM gest nuovi articoli
This commit is contained in:
@@ -4,6 +4,7 @@ using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MP_ADM.WebUserControls
|
||||
@@ -108,9 +109,17 @@ namespace MP_ADM.WebUserControls
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
// recupero codAzienda corrente...
|
||||
string CodAzienda = "*";
|
||||
var listConf = DataLayerObj.taConfig.GetData();
|
||||
var recAzienda = listConf.Where(x => x.chiave == "Azienda").FirstOrDefault();
|
||||
if (recAzienda != null)
|
||||
{
|
||||
CodAzienda = recAzienda.valore != "*" ? recAzienda.valore : recAzienda.valoreStd;
|
||||
}
|
||||
string tempCode = string.Format("_{0:yyyyMMdd-HHmmss}", DateTime.Now);
|
||||
string tempName = string.Format("Nuovo articolo creato {0:dd/MM/yyyy HH:mm:ss}", DateTime.Now);
|
||||
DataLayerObj.taAnagArt.Insert(tempCode, tempName, "", "", "", "ART");
|
||||
DataLayerObj.taAnagArt.insert(tempCode, tempName, "", "", "ART", CodAzienda);
|
||||
// reset!
|
||||
resetSelezione();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user