Exemplo n.º 1
0
        public void loadForm()
        {
            {
                var withBlock = cboStorageType;
                withBlock.DataSource    = StorageTypeService.GetAll();
                withBlock.DisplayMember = "StorageTypeName";
                withBlock.ValueMember   = "StorageTypeId";
                withBlock.SelectedIndex = 0;
            }

            {
                var withBlock1     = cboStorage;
                var delegationList = new List <string>();
                delegationList.Add("STORAGE");
                delegationList.Add("UNASSIGNED");
                withBlock1.DataSource    = ContainerService.GetByFilters("", "", "", "", "", "", delegationList, "");
                withBlock1.DisplayMember = "ContainerNumber";
                withBlock1.ValueMember   = "ContainerId";
                withBlock1.SelectedIndex = 0;
            }

            nudBagQty.Value = 0m;
            tbLocation.Text = "";
            lblWarning.Text = "";
        }
Exemplo n.º 2
0
        private void cboLocationType_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboStorageType.Text.Equals("CONTAINER"))
            {
                {
                    var withBlock      = cboStorage;
                    var delegationList = new List <string>();
                    delegationList.Add("STORAGE");
                    delegationList.Add("UNASSIGNED");
                    withBlock.DataSource    = ContainerService.GetByFilters("", "", "", "", "", "", delegationList, "");
                    withBlock.DisplayMember = "ContainerNumber";
                    withBlock.ValueMember   = "ContainerId";
                }

                cboStorage.SelectedValue = 0;
            }
            else if (cboStorageType.Text.Equals("BAGGER"))
            {
                {
                    var withBlock2 = cboStorage;
                    withBlock2.DataSource    = BaggerService.GetAll();
                    withBlock2.DisplayMember = "BaggerName";
                    withBlock2.ValueMember   = "BaggerId";
                }
            }
            else
            {
                {
                    var withBlock1 = cboStorage;
                    withBlock1.DataSource    = PalletService.GetAll();
                    withBlock1.DisplayMember = "PalletName";
                    withBlock1.ValueMember   = "PalletId";
                }
            }
        }
Exemplo n.º 3
0
        public void loadForm()
        {
            {
                var withBlock = cboStorageType;
                withBlock.DataSource    = StorageTypeService.GetAll();
                withBlock.DisplayMember = "StorageTypeName";
                withBlock.ValueMember   = "StorageTypeId";
                withBlock.SelectedIndex = 0;
            }

            {
                var withBlock1     = cboStorage;
                var delegationList = new List <string>();
                delegationList.Add("STORAGE");
                delegationList.Add("UNASSIGNED");
                withBlock1.DataSource    = ContainerService.GetByFilters("", "", "", "", "", "", delegationList, "");
                withBlock1.DisplayMember = "ContainerNumber";
                withBlock1.ValueMember   = "ContainerId";
                withBlock1.SelectedIndex = 0;
            }

            nudBagQty.Value = 0m;
            if (My.MyProject.Forms.FrmAddEditGrainInventory.UnitObj.CargoType.Equals("BAG"))
            {
                nudBagQty.DecimalPlaces = 0;
            }
            else
            {
                nudBagQty.DecimalPlaces = 3;
            }

            lblWarning.Text = "";
        }
Exemplo n.º 4
0
        private void FrmEmptyBagInvList_Load(object sender, EventArgs e)
        {
            firstLoad = true;
            var bagInventory = BagInventoryService.GetAllInventory(true);
            var listCan      = new List <VW_Container>();
            var listBagger   = new List <Bagger>();
            var locationList = new List <string>();

            using (var db = new WTCCeresEntities())
            {
                {
                    var withBlock  = cboCustomer;
                    var categories = new List <int>();
                    categories.Add((int)MdlEnum.CompanyCategory.CUSTOMER);
                    categories.Add((int)MdlEnum.CompanyCategory.CUSTOMER_VENDOR);
                    withBlock.DataSource    = CompanyService.GetByCompanyCategoryId(categories, db);
                    withBlock.DisplayMember = "CompanyName";
                    withBlock.ValueMember   = "CompanyId";
                    withBlock.SelectedItem  = "CompanyId";
                }

                {
                    var withBlock1 = cboBagSize;
                    var bagSizes   = BagInventoryService.GetAllBagSize();
                    withBlock1.DataSource    = bagSizes;
                    withBlock1.DisplayMember = "BagSizeName";
                    withBlock1.ValueMember   = "BagSizeId";
                    withBlock1.SelectedValue = 0;
                }

                {
                    var withBlock2 = cboBagColor;
                    withBlock2.DataSource    = BagInventoryService.GetAllColors();
                    withBlock2.DisplayMember = "ColorName";
                    withBlock2.ValueMember   = "ColorId";
                    withBlock2.SelectedValue = 0;
                }

                var delegationList = new List <string>();
                delegationList.Add("STORAGE");
                delegationList.Add("UNASSIGNED");
                listCan    = ContainerService.GetByFilters("", "", "", "", "", "", delegationList, "").Where(c => !string.IsNullOrEmpty(c.ContainerNumber)).ToList();
                listBagger = BagInventoryService.GetAllBaggers().ToList();
                dgvInventory.DataSource = BagInventoryService.GetInventoryByFilters(cboCustomer.Text, tbBagName.Text, cboBagColor.Text, cboBagSize.Text);
                firstLoad = false;
            }
        }