private void BindFormElements()
        {
            //Bind the Region Lookup (Zone and Woredas will be bind after selection Region)
            lkRegion.Properties.DataSource = BLL.Region.GetAllRegions().DefaultView;
            lkRegion.EditValue = regionId;

            //Bind the Receiving units Types Lookup
            InstitutionType institutionsTypes = new InstitutionType();
            institutionsTypes.LoadAll();
            institutionsTypes.Sort = "Name ASC";
            lkType.Properties.DataSource = institutionsTypes.DefaultView;
            lkType.EditValue = ruType;

            //Bind the Ownership Type Lookup
            OwnershipType ownershipTypes = new OwnershipType();
            ownershipTypes.LoadAll();
            ownershipTypes.Sort = "Name ASC";
            lkOwnership.Properties.DataSource = ownershipTypes.DefaultView;
            lkOwnership.EditValue = OwnershipType.Constants.Public;

            //Bind the Active lookup
            lkActive.Properties.ValueMember = lkActive.Properties.DisplayMember = "Column";
            lkActive.Properties.DataSource = new string[3] { "All", "Active", "InActive" };
            lkActive.ItemIndex = 0;

            //Bind the others
            LoadZones();
            lkZone.EditValue = zoneID;

            LoadWoredas();
            lkWoreda.EditValue = woredaID;

            LoadReceivingUnits();
        }
コード例 #2
0
        private void ReceiveingForm_Load(object sender, EventArgs e)
        {
            SetPermissions();
            LoadDecimalFormatings();
            //Bind ReceiptType
            cboReceiveType.Properties.DataSource = ReceiptType.GetAllReceiptTypesForReceive();
            cboReceiveType.EditValue = ReceiptType.CONSTANTS.STANDARD_RECEIPT;

            //Bind the Receiving units Types Lookup
            InstitutionType institutionsTypes = new InstitutionType();
            institutionsTypes.LoadAll();
            institutionsTypes.Sort = "Name ASC";
            lkType.Properties.DataSource = institutionsTypes.DefaultView;
            lkType.EditValue = InstitutionType.Constants.HEALTH_CENTER;
            //---

            //Bind the Ownership Type Lookup
            LoadOwnershipType();
            lkOwnership.EditValue = OwnershipType.Constants.Public;
            LoadReceivingUnits();
            //----------------------------
            // reset the receiving date
            dtRecDate.Value = DateTimeHelper.ServerDateTime;
            // Load the logical stores and populate the combo boxes
            //lkStoreType.Properties.DataSource = BLL.StoreType.GetStoreTypesForAUser(NewMainWindow.UserId).DefaultView;
            lkAccounts.SetupActivityEditor().SetDefaultActivity();

            // Load the possible suppliers and populate

            // Load all occupied Pallet location list for the consolidate lookup editManuf2
            repoLKConsolidate.DataSource = PalletLocation.GetAllOccupied();

            // load the receiving unit's to the combo box
            Institution rus = new Institution();
            rus.LoadAll();
            lkFacilitySelection.Properties.DataSource = rus.DefaultView;

            lkStorageType.DataSource = StorageType.AllStorageTypes;

            // bulkPalletLocationLookup.DataSource = PalletLocation.GetAllFree(StorageType.BulkStore);
            nonBulkPalletLocationLookup.DataSource = PalletLocation.GetAllFreeNonBulk();
            //OnSelectedFilterChanged(new object(), new DevExpress.XtraEditors.Controls.ChangingEventArgs(null,"Drug"));

            // load all item Units
            ItemUnit itemUnit = new ItemUnit();
            itemUnit.LoadAll();
            editUnits.DataSource = itemUnit.DefaultView;

            lkCategories.Properties.DataSource = BLL.CommodityType.GetAllTypes();
            lkCategories.ItemIndex = 0;

            // Get the default who's receiving this
            txtReceivedBy.Text = CurrentContext.LoggedInUserName;

            // for RDF, Hide the packs column on receipt
            if (BLL.Settings.IsRdfMode)
            {
                colPacks.Visible = false;
            }

            //lcDeliveryNoteCheck.Visibility = BLL.Settings.HandleDeliveryNotes ? DevExpress.XtraLayout.Utils.LayoutVisibility.Always : DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            colPricePerPack.Visible = !BLL.Settings.HandleGRV && srm != true;
            lcRefNoInput.Visibility =
                lcRefNo.Visibility =
                    BLL.Settings.HandleGRV
                        ? DevExpress.XtraLayout.Utils.LayoutVisibility.Never
                        : DevExpress.XtraLayout.Utils.LayoutVisibility.Always;

            if (BLL.Settings.IsCenter)
            {
                colShipper.Visible = false;
                colPercentReceived.Visible = true;
                colPrintedDate.Visible = false;
                PalletizeTab.PageVisible = false;
                txtPassCode.Enabled = false;
                lcPassCode .Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                tabReceiveTabs.TabPages[3].Text = "Step Three - Store Selection";
            }

            //Load the allowed Warehouses
            DataView PossibleWarehouses = BLL.Warehouse.getActiveWarehouseWithCluster(CurrentContext.UserId);
            lkWarehouse.Properties.DataSource = PossibleWarehouses;
            if (PossibleWarehouses.Count > 0)
            {
                lkWarehouse.EditValue = ((DataView)lkWarehouse.Properties.DataSource)[0]["ID"];
            }

            //Load IsElectronicReceiveOnly Setting
            LoadIsPOElectronicSetting();
        }
コード例 #3
0
        private void BindFormElements()
        {
            // Find the next order number and write it on the order ID Field
            // The order ID is generated here in code

            DataTable tbl = BLL.CommodityType.GetAllTypes();
            tbl.Rows.Add(0, "All");
            lkCategoires.Properties.DataSource = tbl;
            //lkCategoires.ItemIndex = 0;
            lkCategoires.EditValue = 0;
            lkRequisitionType.EditValue = RequisitionType.Demand;
            // lkPeriod.Visible = false;

            //Bind the Region Lookup (Zone and Woredas will be bind after selection Region)
            lkRegion.Properties.DataSource = BLL.Region.GetAllRegions().DefaultView;
            if (!GeneralInfo.Current.IsColumnNull("Region"))
            {
                lkRegion.EditValue = GeneralInfo.Current.Region;
            }
            else
            {
                lkRegion.Properties.NullText = "Select Region";
            }
            //Bind the Receiving units Types Lookup
            InstitutionType institutionsTypes = new InstitutionType();
            institutionsTypes.LoadAll();
            institutionsTypes.Sort = "Name ASC";
            lkType.Properties.DataSource = institutionsTypes.DefaultView;
            lkType.EditValue = InstitutionType.Constants.HEALTH_CENTER;

            //Bind the Ownership Type Lookup
            LoadOwnershipType();
            lkOwnership.EditValue = OwnershipType.Constants.Public;
            LoadReceivingUnits();

            // txtRefNo.Text = Order.GetNextOrderReference();

            // bind the selected data table to the hidden grid on the CDR request screen

            LoadReceivingUnits();
            // load all the logical stores that exist in the system.
            lkModes.SetupModeEditor().SetDefaultMode();
            //if (BLL.Stores.GetDefaultStore(NewMainWindow.UserId).RowCount > 0 && !BLL.Stores.GetDefaultStore(NewMainWindow.UserId).IsColumnNull("ID"))
            //{
            //    lkModes.EditValue = BLL.Stores.GetDefaultStore(NewMainWindow.UserId).ID;
            //}
            //else
            //{
            //    lkModes.ItemIndex = 0;
            //    //lkModes.EditValue = null;
            //}
            //lkModes_EditValueChanged(null, null);
            boxSizedList.DataSource = BLL.ItemManufacturer.PackageLevelKeys;

            // Load all RRF Period
            var periods = BLL.Period.GetAllPeriods();
            lkPeriod.Properties.DataSource = periods.DefaultView;

               // requisition Type: for the Time being it is hard coded
            var requisitionTypes = Enum.GetValues(typeof(RequisitionType)).Cast<RequisitionType>()
                           .Select(e => new { Value = (int)e, Description = e.ToString() })
                           .ToList();
            //For this release - Mrach-20 remove consumption Type
            requisitionTypes.RemoveAt(requisitionTypes.IndexOf(new { Value = (int)RequisitionType.Consumption, Description = "Consumption" }));
            lkRequisitionType.Properties.DataSource = requisitionTypes;
        }