示例#1
0
        private void btnComplete_Click(object sender, EventArgs e)
        {
            ReleaseDistributionRequest RelDistReq;

            if (isNewRecord)
            {
                RelDistReq                 = new ReleaseDistributionRequest();
                RelDistReq.RequestDate     = DateAndTime.Now;
                RelDistReq.RequestStatusId = (int)MdlEnum.RequestStatus.PENDING_REPLY;
                RelDistReq.RelOrderPickUpDropOffLocationId = SelRelPUDO.RelOrderPickUpDropOffLocationId;
            }
            else
            {
                RelDistReq = ReleaseDistributionRequestService.GetById(RelDistReqVW.ReleaseDistributionRequestId);
            }

            RelDistReq.QtyRequested = (int)Math.Round(nudQtyCans.Value);
            RelDistReq.CarrierId    = Conversions.ToInteger(cboCarrier.SelectedValue);
            if (RelDistService.AddOrUpdate(RelDistReq) == true)
            {
                Close();
            }
            else
            {
                My.MyProject.Forms.MessageBoxCeresOK.ShowDialog("Information not saved.", "Something went wrong and the information was not saved. Please try again.", this);
            }
        }
示例#2
0
        public void LoadForm(VW_ReleaseDistributionRequest r)
        {
            RequestStatusList          = RequestStatusService.GetByFlowType("INBOUND");
            focusedReleaseDistribution = ReleaseDistributionRequestService.GetById(r.ReleaseDistributionRequestId);
            {
                var withBlock = cboDistReqStatus;
                withBlock.DataSource    = RequestStatusList;
                withBlock.DisplayMember = "StatusName";
                withBlock.ValueMember   = "RequestStatusId";
            }

            tbNotes.Text = "";
            var list = RelDistChangeSchRequestedService.GetByRelDistRequestId(r.ReleaseDistributionRequestId);

            VWRelDistChangeSchRequestedBindingSource.DataSource = null;
            VWRelDistChangeSchRequestedBindingSource.DataSource = list;
            sch        = new RelDistRequestSchedule();
            focusedRow = (VW_RelDistChangeSchRequested)dgvProposedChange.CurrentRow.DataBoundItem;
            sch        = RelDistRequestScheduleService.GetById(focusedRow.RelDistRequestScheduleId);
            cboDistReqStatus.SelectedValue = r.RequestStatusId;
            tbNotes.Text         = list[0].WTCMessage;
            lblCarrierNotes.Text = list[0].CarrierMessage;
            AddComboBoxCol();
        }