Ejemplo n.º 1
0
        private void frmShipmentFromWH_FormClosing(object sender, FormClosingEventArgs e)
        {
            //sSetting.Save();
            sSetting = null;

            fromWH = null;
        }
Ejemplo n.º 2
0
        private void frmShipmentFromWH_Load(object sender, EventArgs e)
        {
            session = new Session();
            XPCollection<Customer> customers = new XPCollection<Customer>(session);
            cboCustomer.Properties.DataSource = customers;

            if (customers.Count > 0)
                cboCustomer.EditValue = customers[0].Oid;

            XPCollection<WareHouse> warehouses = new XPCollection<WareHouse>(session);
            lueWarehouse.Properties.DataSource = warehouses;

            if (warehouses.Count > 0)
                lueWarehouse.EditValue = warehouses[0].Oid;

            cboSortBy.Properties.Items.Add("先交期, 后优先");
            cboSortBy.Properties.Items.Add("先优先, 后交期");

            sSetting = ShipmentSetting.GetInstance(session);
            fromWH = new Shipment_FromWH();
            dateLastNeedDate.DateTime = DateTime.Today.AddDays(sSetting.NoOfDay);

            if (sSetting.SortBy == ShipmentSetting.SortType.DatePriority)
                cboSortBy.SelectedIndex = 0;
            else
                cboSortBy.SelectedIndex = 1;

            chkSSTK.Checked = sSetting.IncludeSSTK;
        }