private void PrintConfigurationPacklist(Packlist packlist) { switch (packlist.ShippingConfiguration.PacklistAllocationMethod) { case PacklistAllocation.MultipleOrders: if (packlist.ShippingConfiguration.ShopfloorlineProgram == "LPN") { DellLpnPacklistReport report = new DellLpnPacklistReport(); Parameter param = report.Parameters["packlistId"]; param.Value = packlist.PacklistId; report.ShowPreview(); break; } else { DellPoPacklistReport report = new DellPoPacklistReport(); Parameter param = report.Parameters["packlistId"]; param.Value = packlist.PacklistId; report.ShowPreview(); break; } case PacklistAllocation.SingleOrder: PacklistController controller = new StsPacklistController(); controller.LoadReport(packlist.PacklistId); break; } }
public Packlist ChangePacklist(Packlist packlist) { // Delete empty packlists if (CurrentPacklist != null && !CurrentPacklist.IsDeleted) { if (CurrentPacklist.Shipments.Count == 0) { CurrentPacklist.Delete(); } } // Verify append to packlist that has already been printed if (packlist != null) { if (packlist.PrintDate != DateTime.MinValue) { if (Scout.Core.UserInteraction.Dialog .AskQuestion("This packlist has already been printed. Do you still want to append to it?") == DialogResult.No) { return(CurrentPacklist); } } } // Set current packlist CurrentPacklist = packlist; if (PacklistChanged != null) { PacklistChanged(CurrentPacklist); } return(CurrentPacklist); }
public void Print(Packlist packlist) { if (packlist.ShippingConfiguration != null) { PrintConfigurationPacklist(packlist); } }
public void GetNewPacklist() { Packlist packlist = new Packlist(m_uow as XpoUnitOfWork); packlist.PacklistId = IDs.Generate(char.Parse("P")); packlist.ShipDate = DateTime.Now; packlist.ShipToAddress = CurrentConfiguration.ShipToAddress; ChangePacklist(packlist); }
public PacklistsContentsTransferView(Packlist packlist1, Packlist packlist2) { InitializeComponent(); m_packlist1 = packlist1; m_packlist2 = packlist2; Init(); Bind(); WireEvents(); }
private void ManagePacklist() { // Create a new packlist if the user does not want to append // to an existing packlist for the day. Packlist packlist = m_salesOrder.GetTodaysPacklist(); if (packlist != null) { string msg = "Packlist: " + packlist.PacklistId; msg += " exists for today. Would you like to append?"; if (Scout.Core.UserInteraction.Dialog.AskQuestion(msg) == DialogResult.No) { m_salesOrder.NewPacklistUponShipment = true; } } }
private void ChangePacklist(Packlist packlist) { if (packlist != null) { if (packlist.IsClosed) { Scout.Core.UserInteraction.Dialog.ShowMessage("This packlist is closed.", UserMessageType.Error); return; } if (Scout.Core.UserInteraction.Dialog .AskQuestion("Would you like to change to this packlist?") == DialogResult.Yes) { Session.ChangePacklist(packlist); } } }
private void Session_PacklistChanged(Packlist packlist) { if (packlist == null) { packlistIdText.Text = ""; packlistQtyText.Text = ""; packlistContentsGrid.DataSource = null; waybillText.Text = ""; } else { packlistQtyText.Text = packlist.Shipments.Count.ToString(); packlistIdText.Text = packlist.PacklistId; packlistContentsGrid.DataSource = packlist.Shipments; waybillText.Text = packlist.Waybill; } }
private void ShowPacklist() { PacklistController controller = packlistFormatEditor.EditValue as PacklistController; if (controller == null) { Scout.Core.UserInteraction.Dialog.ShowMessage("Select packlist type:", UserMessageType.Error); return; } Packlist packlist = packlistView.GetFocusedRow() as Packlist; if (packlist != null) { controller.LoadReport(packlist.PacklistId); } }
public IActionResult Index() { var allPacklists = Packlist.GetPacklists(); return(View(allPacklists)); }
public void Put(int id, [FromBody] Packlist packlist) { packlist.PacklistId = id; _db.Entry(packlist).State = EntityState.Modified; _db.SaveChanges(); }
public void Post([FromBody] Packlist packlist) { _db.Packlists.Add(packlist); _db.SaveChanges(); }
private void ButtonSearch_Click(object sender, EventArgs e) { this.GridResults.ClearSelection(); this.GridResults.Rows.Clear(); string uri = String.Format("http://xdcc.horriblesubs.info/search.php?t={0}", Uri.EscapeUriString(this.TextSearch.Text)); string javascript = this.Get(uri); string[] lines = javascript.Split(new string[] { "\r\n", "\r", "\n" }, StringSplitOptions.None); List <Packlist> packlists = new List <Packlist>(); foreach (string line in lines) { string[] parts = line.Split(new string[] { "," }, StringSplitOptions.None); Packlist packlist = new Packlist(); int i = 0; foreach (string part in parts) { if (part.Length < 5) { continue; } // Bot if (i == 0) { packlist.Bot = part.Substring(part.IndexOf("b:") + 3); packlist.Bot = packlist.Bot.Substring(0, packlist.Bot.Length - 1); } // Pack if (i == 1) { packlist.Pack = part.Substring(part.IndexOf("n:") + 2); } // Size if (i == 2) { packlist.Size = part.Substring(part.IndexOf("s:") + 2); } // File if (i == 3) { packlist.Filename = part.Substring(part.IndexOf("f:") + 3); packlist.Filename = packlist.Filename.Substring(0, packlist.Filename.Length - 3); } i++; } packlists.Add(packlist); } foreach (Packlist packlist in packlists) { if (packlist.Filename == null) { continue; } this.GridResults.Rows.Add(new string[] { packlist.Bot, packlist.Filename, packlist.Pack, String.Format("{0} Mb", packlist.Size) }); } }