Update gestioen ricetta
This commit is contained in:
@@ -92,11 +92,15 @@ namespace MP.Data.Controllers
|
||||
/// <summary>
|
||||
/// Init ricetta dato PODL + conf
|
||||
/// </summary>
|
||||
/// <param name=""></param>
|
||||
/// <param name="confPath"></param>
|
||||
/// <param name="idxPODL"></param>
|
||||
/// <param name="CalcArgs"></param>
|
||||
/// <returns></returns>
|
||||
public RecipeModel InitRecipe(int idxPODL, string confPath)
|
||||
public RecipeModel InitRecipe(string confPath, int idxPODL, Dictionary<string, string> CalcArgs)
|
||||
{
|
||||
RecipeModel answ = new RecipeModel();
|
||||
// recupero dati da PODL...
|
||||
|
||||
// per prima cosa leggo file di conf x inizializzare ricetta...
|
||||
string fullPath = RecipePath(confPath);
|
||||
bool fileOk = File.Exists(fullPath);
|
||||
@@ -104,36 +108,8 @@ namespace MP.Data.Controllers
|
||||
{
|
||||
string rawData = File.ReadAllText(fullPath);
|
||||
var currRecipe = JsonConvert.DeserializeObject<RecipeConfig>(rawData);
|
||||
// copio la mia ricetta come conf...
|
||||
answ = new RecipeModel(idxPODL, currRecipe);
|
||||
|
||||
//answ = new RecipeModel()
|
||||
//{
|
||||
// IdxPODL = idxPODL,
|
||||
// TemplateFile = currRecipe.TemplateFile,
|
||||
// HeadConf = currRecipe.HeadConf,
|
||||
// RowsConf = currRecipe.RowsConf,
|
||||
// //HeadVal = currRecipe.HeadConf.ListKeys,
|
||||
// HeadVal = RecipeModel.ConvertToValues(currRecipe.HeadConf.ListKeys),
|
||||
// // aggiungo 1 riga...
|
||||
// RowsVal = new Dictionary<string, Dictionary<string, string>>()
|
||||
// {
|
||||
// { "1", currRecipe.RowsConf.ListKeys}
|
||||
// }
|
||||
|
||||
// //IdxPODL = idxPODL,
|
||||
// //TemplateFile = currRecipe.TemplateFile,
|
||||
// //HeadConf = currRecipe.HeadConf,
|
||||
// //RowsConf = currRecipe.RowsConf,
|
||||
// ////HeadVal = currRecipe.HeadConf.ListKeys,
|
||||
// //HeadVal = RecipeModel.ConvertToObj(currRecipe.HeadConf.ListKeys),
|
||||
// //// aggiungo 1 riga...
|
||||
// //RowsVal = new Dictionary<string, Dictionary<string, Element>>()
|
||||
// //{
|
||||
// // //{ "1", rigaBase }
|
||||
// // { "1", RecipeModel.ConvertToObj(currRecipe.RowsConf.ListKeys)}
|
||||
// //}
|
||||
//};
|
||||
// inizializzo dalla conf...
|
||||
answ = new RecipeModel(idxPODL, currRecipe, CalcArgs);
|
||||
}
|
||||
|
||||
return answ;
|
||||
|
||||
@@ -1034,6 +1034,7 @@ namespace MP.Data.Controllers
|
||||
.DbSetPODL
|
||||
.AsNoTracking()
|
||||
.Where(x => x.IdxPromessa == idxPODL)
|
||||
.Include(a => a.ArticoloNav)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
catch (Exception exc)
|
||||
|
||||
Reference in New Issue
Block a user