예제 #1
0
            public YdOrderListViewItem(YdOrder ydOrder)
            {
                _ydOrder = ydOrder;

                this.Text = string.Format("{0}\n{1}", _ydOrder.OrderId, _ydOrder.ProductsInfo);
                this.SubItems.Add(_ydOrder.RecipientName);
                this.SubItems.Add(_ydOrder.RecipientPhone);
                this.SubItems.Add(_ydOrder.RecipientMobile);
                this.SubItems.Add(_ydOrder.RecipientFullAddress);
            }
예제 #2
0
        private void tsbtnExportYdExcel_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;


            SaveFileDialog sfd = new SaveFileDialog();

            sfd.FileName        = string.Format("yd_orders_{0}.xls", DateTime.Now.ToString("yyyyMMddHHmmss"));
            sfd.Filter          = "Excel Files (*.xls)|*.xls|All Files (*.*)|*.*";
            sfd.OverwritePrompt = true;
            if (DialogResult.OK == sfd.ShowDialog(this))
            {
                YdOrder.ExportYundaOrders(_ydOrders, Path.Combine(Directory.GetParent(Application.ExecutablePath).FullName, "template_dr.xls"), sfd.FileName);
            }

            Cursor.Current = Cursors.Default;
        }