public CalculationWorker(CalculationInstance instance) { _mode = 2; calculationInstance = instance; LoadEnviroment(); ImportFromJSON(); }
public CalculationForm(CalculationInstance instance) { InitializeComponent(); _instance = instance; worker = new CalculationWorker(_instance); LoadCalculation(); }
public void CreateInstance(int typeID, string name, int agentID, int agentID2) { if (_mode != 1) { return; } var instance = new CalculationInstance { CalculationTypeID = typeID, CreateDate = DateTime.Today, Name = name, ContrAgentID = agentID, ContrAgentID2 = agentID2, Status = 1 }; using (UserContext db = new UserContext(Settings.constr)) { db.CalculationInsctInstances.Add(instance); db.SaveChanges(); calculationInstance = instance; } LoadEnviroment(); }
public Page3(CalculationInstance instance) { InitializeComponent(); _instance = instance; GetManualConstatns(); }