public void Inflate(FMSC.ORM.Core.Datastore datastore)
 {
     foreach (TallyAction action in this)
     {
         Inflate(datastore, action);
     }
 }
        public void Initialize(FMSC.ORM.Core.Datastore datastore, CuttingUnit cuttingUnit)
        {
            if (!String.IsNullOrEmpty(cuttingUnit.TallyHistory))
            {
                var array = Deserialize(cuttingUnit.TallyHistory);
                _list = new List <TallyAction>(array);
                Inflate(datastore);

                OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
            }
        }
Пример #3
0
        public static IEnumerable <string> ReadUnitLevelCruisers(FMSC.ORM.Core.Datastore datastore)
        {
            var initialsStr = datastore.ExecuteScalar <string>("SELECT group_concat(Initials, ',') FROM (SELECT Trim(Initials) AS Initials FROM Tree WHERE Initials IS NOT NULL AND trim(Initials) != '' GROUP BY Initials);");

            if (!string.IsNullOrEmpty(initialsStr))
            {
                var initialsArray = initialsStr.Split(',');
                return(initialsArray);
            }
            else
            {
                return(Enumerable.Empty <string>());
            }
        }
 public static void Inflate(FMSC.ORM.Core.Datastore datastore, TallyAction action)
 {
     if (action.CountCN != 0L)
     {
         action.Count = datastore.ReadSingleRow <CountTree>(action.CountCN);
     }
     if (action.TreeCN != 0L)
     {
         action.TreeRecord = datastore.ReadSingleRow <Tree>(action.TreeCN);
     }
     if (action.TreeEstimateCN != 0L)
     {
         action.TreeEstimate = datastore.ReadSingleRow <TreeEstimateDO>(action.TreeEstimateCN);
     }
 }
Пример #5
0
        public FormEditTreeDefault(FMSC.ORM.Core.Datastore dataStore)
        {
            Datastore = dataStore;
            InitializeComponent();
            this.PProd.DataSource = FSCruiser.Constants.PRODUCT_CODES;

            if (ViewController.PlatformType == FMSC.Controls.PlatformType.WinCE)
            {
                this.WindowState            = FormWindowState.Maximized;
                this._ceDialogPanel.Visible = true;
            }
            else
            {
                this._ceDialogPanel.Visible = false;
            }
        }