Exemplo n.º 1
0
        private void txtTradeNo_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var vw = new SendedTradeView();

            if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.Trade = vw.Trade;

                txtReceiverName.Text      = this.Trade.ReceiverName;
                dateDeliveryDate.DateTime = this.Trade.DeliveryDate ?? DateTime.Now;
                txtMobile.Text            = this.Trade.ReceiverMobile;
                txtReceiverAddress.Text   = this.Trade.ReceiverAddress;
                txtTradeNo.Text           = this.Trade.TradeNo;

                using (var db = new Database()) {
                    var retodrs = db.Fetch <t_retorder>("select * from v_retorder where tradeno=@0", vw.Trade.TradeNo);
                    retodrs.ForEach(k => k.RetNum = k.Num);
                    gcOrder.DataSource            = retodrs;
                }
            }
        }
Exemplo n.º 2
0
        private void txtTradeNo_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var vw = new SendedTradeView();
            if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
                this.Trade = vw.Trade;

                txtReceiverName.Text = this.Trade.ReceiverName;
                dateDeliveryDate.DateTime = this.Trade.DeliveryDate ?? DateTime.Now;
                txtMobile.Text = this.Trade.ReceiverMobile;
                txtReceiverAddress.Text = this.Trade.ReceiverAddress;
                txtTradeNo.Text = this.Trade.TradeNo;

                using (var db = new Database()) {
                    var retodrs = db.Fetch<t_retorder>("select * from v_retorder where tradeno=@0", vw.Trade.TradeNo);
                    retodrs.ForEach(k=>k.RetNum=k.Num);
                    gcOrder.DataSource = retodrs;
                }
            }
        }
Exemplo n.º 3
0
        private void txtMemberName_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            var vw = new SendedTradeView();
            if (vw.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
                this.Trade = vw.Trade;

                dateDeliveryDate.DateTime = this.Trade.DeliveryDate ?? DateTime.Now;
                txtMobile.Text = this.Trade.ReceiverMobile;
                txtReceiverAddress.Text = this.Trade.ReceiverAddress;

                using (var db = new Database()) {
                    gcOrder.DataSource = db.Fetch<t_order>("select * from t_order");
                }
            }
        }