public void PopulateInfo(VW_RelOrderPickUpDropOffLocation relPudo, VW_ReleaseDistributionRequest relDistReq) { RelDistReqVW = relDistReq; lblReleaseNumb.Text = relDistReq.ReleaseNumber; nudQtyCans.Maximum = Conversions.ToDecimal(Operators.SubtractObject(relPudo.QtyPickUpDropOff, GetSumCansCarriers())); nudQtyCans.Value = relDistReq.QtyRequested; cboCarrier.SelectedValue = relDistReq.CarrierId; }
public void PopulateInfo(VW_RelOrderPickUpDropOffLocation relDistReq) { LoadForm(); relPuDol = relDistReq; cbPickUp.SelectedValue = relDistReq.PickUpTerminalId; cbDropOff.SelectedValue = relDistReq.DropOffYardLocationId; nudQtyCans.Value = relDistReq.QtyPickUpDropOff; lblRelOrder.Text = relDistReq.ReleaseNumber; }
private void btnAddCarrier_Click(object sender, EventArgs e) { SelectedRelPUDORow = (VW_RelOrderPickUpDropOffLocation)dgvReleases.CurrentRow.DataBoundItem; My.MyProject.Forms.FrmAddEditCarrierReqDist.isNewRecord = true; My.MyProject.Forms.FrmAddEditCarrierReqDist.LoadForm(SelectedRelPUDORow); MdlLoadingSetting.showDialogForm(My.MyProject.Forms.FrmAddEditCarrierReqDist, this); RefreshList(1); CheckButtons(); }
private void btnEditPuDo_Click(object sender, EventArgs e) { VW_RelOrderPickUpDropOffLocation relDistReq = (VW_RelOrderPickUpDropOffLocation)dgvPickUpDropOf.CurrentRow.DataBoundItem; My.MyProject.Forms.FrmAddEditReleasePickUpDropOff.PopulateInfo(relDistReq); MdlLoadingSetting.showDialogForm(My.MyProject.Forms.FrmAddEditReleasePickUpDropOff, this); var list = RelOrderPickUpDropOffLocationService.GetByReleaseOrderId(SelectedReleaseOrder.ReleaseOrderId); var PickUpList = new SortableBindingList <VW_RelOrderPickUpDropOffLocation>(list); VWRelOrderPickUpDropOffLocationBindingSource.DataSource = PickUpList; }
private void btnRmPickUpDropOff_Click(object sender, EventArgs e) { VW_RelOrderPickUpDropOffLocation selecPudo = (VW_RelOrderPickUpDropOffLocation)dgvPickUpDropOff.CurrentRow.DataBoundItem; if (pudoService.Delete(selecPudo.RelOrderPickUpDropOffLocationId)) { PickUpDropOffLocations.Remove(selecPudo); dgvPickUpDropOff.DataSource = null; dgvPickUpDropOff.DataSource = PickUpDropOffLocations; CalculateQtys(); } }
public void LoadForm(VW_RelOrderPickUpDropOffLocation relPudo) { { var withBlock = cboCarrier; withBlock.DataSource = CompanyService.GetAllByCompanyTypeId((int)MdlEnum.CompanyType.Drayage_Provider, new WTCCeresEntities()); withBlock.DisplayMember = "CompanyName"; withBlock.ValueMember = "CompanyId"; } lblReleaseNumb.Text = relPudo.ReleaseNumber; SelRelPUDO = relPudo; nudQtyCans.Maximum = Conversions.ToDecimal(Operators.SubtractObject(SelRelPUDO.QtyPickUpDropOff, GetSumCansCarriers())); nudQtyCans.Value = Conversions.ToDecimal(Operators.SubtractObject(SelRelPUDO.QtyPickUpDropOff, GetSumCansCarriers())); }
private void btnDelPuDo_Click(object sender, EventArgs e) { if (dgvPickUpDropOf.Rows.Count > 0) { var pudoSevice = new RelOrderPickUpDropOffLocationService(); VW_RelOrderPickUpDropOffLocation selRow = (VW_RelOrderPickUpDropOffLocation)dgvPickUpDropOf.CurrentRow.DataBoundItem; var result = My.MyProject.Forms.MessageBoxCeresYesNo.ShowDialog("Are you sure of this?", "Pick up: " + selRow.PickUpTerminalName + Constants.vbNewLine + "Drop off: " + selRow.YardName + Constants.vbNewLine + "Are you sure you want to delete this location? This can not be undone", My.Resources.Resources.warning, this); if (result == DialogResult.Yes) { if (pudoSevice.Delete(selRow.RelOrderPickUpDropOffLocationId)) { VWRelOrderPickUpDropOffLocationBindingSource.DataSource = RelOrderPickUpDropOffLocationService.GetByReleaseOrderId(SelectedReleaseOrder.ReleaseOrderId); Close(); } else { My.MyProject.Forms.MessageBoxCeresOK.ShowDialog("Location not deleted.", "Something went wrong and the location was not deleted. Please try again.", this); } } CheckButtons(); } }
private void dgvReleases_SelectionChanged(object sender, EventArgs e) { if (!firstLoad) { if (dgvReleases.Rows.Count > 0) { SelectedRelPUDORow = (VW_RelOrderPickUpDropOffLocation)dgvReleases.CurrentRow.DataBoundItem; lblPickUpCode.Text = SelectedRelPUDORow.PickUpTerminalCode; lblDropOff.Text = SelectedRelPUDORow.YardName; RefreshList(1); btnAddCarrier.Enabled = true; } else { lblPickUpCode.Text = ""; lblDropOff.Text = ""; VWReleaseDistributionRequestBindingSource.DataSource = null; btnAddCarrier.Enabled = false; } CheckButtons(); CalculateTotals(); } }