コード例 #1
0
 public CalculationWorker(CalculationInstance instance)
 {
     _mode = 2;
     calculationInstance = instance;
     LoadEnviroment();
     ImportFromJSON();
 }
コード例 #2
0
ファイル: CalculationForm.cs プロジェクト: ivladokk/myorders
 public CalculationForm(CalculationInstance instance)
 {
     InitializeComponent();
     _instance = instance;
     worker    = new CalculationWorker(_instance);
     LoadCalculation();
 }
コード例 #3
0
        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();
        }
コード例 #4
0
 public Page3(CalculationInstance instance)
 {
     InitializeComponent();
     _instance = instance;
     GetManualConstatns();
 }