Пример #1
0
        private void dgvInventory_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
        {
            int percentRemaining;

            try
            {
                foreach (DataGridViewRow row in dgvInventory.Rows)
                {
                    VW_BagInventory rowInv = (VW_BagInventory)dgvInventory.Rows[row.Index].DataBoundItem;

                    row.Cells["btnEditQtyCol"].Style.BackColor          = Color.Sienna;
                    row.Cells["btnEditQtyCol"].Style.ForeColor          = Color.White;
                    row.Cells["btnEditQtyCol"].Style.SelectionBackColor = Color.Sienna;
                    row.Cells["btnEditQtyCol"].Style.SelectionForeColor = Color.White;
                    row.Cells["btnEditQtyCol"].Style.Font = new Font("Microsoft Sans Serif", 12.0f, FontStyle.Bold);
                    percentRemaining = Convert.ToInt32(rowInv.LeftPercentage.Replace("%", ""));
                    var img = new Bitmap(dgpp.Width, dgpp.Height);
                    img = (Bitmap)generateApp(percentRemaining);
                    row.Cells["percentagePicture"].Value = img;
                    row.Cells["btnEditQtyCol"].Value     = "Adjust";
                }
            }
            catch (Exception ex)
            {
            }
        }
Пример #2
0
        /* TODO ERROR: Skipped EndRegionDirectiveTrivia */
        /* TODO ERROR: Skipped RegionDirectiveTrivia */
        public void PopulateInventoryInfo(VW_BagInventory InvInfo)
        {
            selectedInventory = InvInfo;
            var mdlFtp = new MdlFtp();

            lblCustomer.Text           = InvInfo.CustomerName;
            lblQuantity.Text           = InvInfo.TotalQuantity.ToString();
            lblRemaining.Text          = InvInfo.Remaining.ToString();
            lblStorageDate.Text        = InvInfo.StorageDate.ToString();
            dgvBagLocations.DataSource = BagInventoryService.GetBagLocationsByInvId((int)InvInfo.BagInventoryId);
            lblBagSize.Text            = InvInfo.BagSizeName;
            lblBagWeight.Text          = InvInfo.BagWeightName + " " + InvInfo.BagUnit;
            lblBagColor.Text           = InvInfo.BagColor;
            lblColorType.Text          = InvInfo.ColorType;
            lblBagDescription.Text     = InvInfo.BagDescription;
            lblLogoDescription.Text    = InvInfo.LogoDescription;
            lblLogoYear.Text           = InvInfo.BagYear;
            try
            {
                pbBagImage.Image = mdlFtp.GetFTPImage(InvInfo.ImagePath);
                if (!Information.IsNothing(pbBagImage.Image))
                {
                    // pbBagImage.Image.RotateFlip(RotateFlipType.Rotate90FlipNone)
                }
            }
            catch
            {
                if (!InvInfo.ImagePath.Equals("N/A"))
                {
                    My.MyProject.Forms.MessageBoxCeresOK.ShowDialog("Error loading bag image", "The bag image is not accessible or does not exist on the ftp server.", My.MyProject.Forms.FrmParentScreen);
                }
            }
        }
Пример #3
0
 private void dgvInventory_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     focusedRow = (VW_BagInventory)dgvInventory.Rows[e.RowIndex].DataBoundItem;
     if (e.ColumnIndex == 8)
     {
         MdlLoadingSetting.showDialogForm(My.MyProject.Forms.FrmAdjustBagsInventoryQty, this);
     }
 }
Пример #4
0
 private void dgv_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         VW_BagInventory rowInv = (VW_BagInventory)dgvInventory.Rows[dgvInventory.CurrentRow.Index].DataBoundItem;
         My.MyProject.Forms.FrmInvenotryDetail.PopulateInventoryInfo(rowInv);
         MdlLoadingSetting.showDialogForm(My.MyProject.Forms.FrmInvenotryDetail, this);
     }
     catch (Exception ex)
     {
     }
 }
Пример #5
0
        private void FrmAdjustBagsInventoryQty_Load(object sender, EventArgs e)
        {
            {
                var withBlock = cboAjustmentTyoe;
                withBlock.DataSource    = BagInventoryService.GetAllTransactionsType(); // .Where(Function(b) ({"USE", "ADJUST", "SEND"}).Contains(b.TransactionTypeName)).ToList
                withBlock.DisplayMember = "TransactionTypeName";
                withBlock.ValueMember   = "TransactionTypeId";
            }

            focusedRow = (VW_BagInventory)My.MyProject.Forms.FrmEmptyBagInvList.dgvInventory.Rows[My.MyProject.Forms.FrmEmptyBagInvList.dgvInventory.CurrentRow.Index].DataBoundItem;
            {
                var withBlock1 = cboBagLocation;
                withBlock1.DataSource    = BagInventoryService.GetBagLocationsByInvId((int)focusedRow.BagInventoryId);
                withBlock1.DisplayMember = "LocationStorageName";
                withBlock1.ValueMember   = "BagLocationId";
            }

            btnSave.Enabled = false;
        }
Пример #6
0
        public void LoadEditInfo(VW_BagInventory BagInfo)
        {
            FocusedBagInv             = BagInfo;
            cboCustomer.SelectedValue = BagInfo.CustomerId;
            cboBagSize.SelectedValue  = BagInfo.BagSizeId;
            cboBagColor.SelectedValue = BagInfo.ColorId;

            // cboLocation.SelectedValue = BagInfo.StorageId

            lblTotalBags.Text = BagInfo.TotalQuantity.ToString();
            dtpStorage.Value  = (DateTime)BagInfo.StorageDate;

            // tbLocation.Text = BagInfo.LocationTag

            dgvBags.DataSource = BagInventoryService.GetAllBags();
            SelectedBag        = BagInventoryService.GetBagVWById(BagInfo.BagId);
            var bagsLocations = BagInventoryService.GetBagLocationsByInvId((int)BagInfo.BagInventoryId);

            dgvBagLocations.DataSource = bagsLocations;
            BagLocationList            = bagsLocations;
            populateBagInfoLbls();
        }
Пример #7
0
 private void dgv_SelectionChanged(object sender, EventArgs e)
 {
     focusedRow            = (VW_BagInventory)dgvInventory.Rows[dgvInventory.CurrentRow.Index].DataBoundItem;
     dgvDetails.DataSource = BagInventoryService.GetInventoryTransactionById((int)focusedRow.BagInventoryId);
 }