private void BindLookUps()
        {
            var movingAverageGroup = new MovingAverageGroup();

            movingAverageGroup.LoadByUser(CurrentContext.UserId);
            lkAccount.Properties.DataSource = movingAverageGroup.DefaultView;
        }
コード例 #2
0
        private void BindLookUps()
        {
            var movingAverageGroup = new MovingAverageGroup();

            movingAverageGroup.LoadByUser(CurrentContext.UserId);
            lkAccount.Properties.DataSource  = movingAverageGroup.DefaultView;
            lkCategory.Properties.DataSource = CommodityType.GetAllTypes();
        }
コード例 #3
0
        private void PriceSettings_Load(object sender, EventArgs e)
        {
            SetPermission();
            LoadDecimalFormatings();
            var movingAverageGroup = new MovingAverageGroup();

            movingAverageGroup.LoadByUser(CurrentContext.UserId);
            lkAccount.Properties.DataSource = movingAverageGroup.DefaultView;
            ChangeLayoutByMode();
            ChangeLayoutByItemListedtype();
            if (BLL.Settings.IsCenter)
            {
                XtraMessageBox.Show("This Costing Page is Only Applicable For Hub Costing", "User Management Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                this.Enabled = false;
                return;
            }
        }
コード例 #4
0
        private void btnload_Click(object sender, EventArgs e)
        {
            DateTime sdate   = (DateTime)lkstartdate.EditValue;
            DateTime enddate = (DateTime)lkenddate.EditValue;

            _datasource = Receipt.GetItemPriceHistoryCostTierByDate(sdate, enddate, _useriD);
            gridPriceHistory.DataSource = _datasource.DefaultView;

            //extract Distinct Activites from the datasource
            List <int> ActivityIDList = new List <int>();

            foreach (DataRow row in _datasource.Rows)
            {
                if (!ActivityIDList.Contains((int)row["StoreID"]))
                {
                    ActivityIDList.Add((int)row["StoreID"]);
                }
            }
            _allActivityIDs = ActivityIDList;

            //get all activities from database
            var movingAverageGroup = new MovingAverageGroup();

            movingAverageGroup.LoadByUserForPriceHistory(CurrentContext.UserId);
            DataTable allStoreGroup      = movingAverageGroup.DefaultView.Table;
            DataTable filteredStoreGroup = allStoreGroup.Clone();

            //filter the activities
            foreach (DataRow row in allStoreGroup.Rows)
            {
                DataRow newRow = filteredStoreGroup.NewRow();

                if (ActivityIDList.Contains((int)row["MovingAverageID"]))
                {
                    filteredStoreGroup.Rows.Add(row.ItemArray);
                    ActivityIDList.Remove((int)row["MovingAverageID"]);
                }
            }

            lkAccount.Properties.DataSource = filteredStoreGroup;
        }