Exemplo n.º 1
0
 private void FillSuppliers()
 {
     listSupplier = Suppliers.CreateObjects();
     comboSupplier.Items.Clear();
     //comboSupplier.Items.Add(Lan.g(this,"All"));//just too complicated
     for (int i = 0; i < listSupplier.Count; i++)
     {
         comboSupplier.Items.Add(listSupplier[i].Name);
     }
 }
Exemplo n.º 2
0
 private void FillComboSupplier()
 {
     ListSuppliers = Suppliers.CreateObjects();
     comboSupplier.Items.Clear();
     comboSupplier.Items.Add(Lan.g(this, "All"));           //add all to begining of list for composite listings.
     comboSupplier.SelectedIndex = 0;
     for (int i = 0; i < ListSuppliers.Count; i++)
     {
         comboSupplier.Items.Add(ListSuppliers[i].Name);
     }
 }
Exemplo n.º 3
0
 private void FormSupplyOrders_Load(object sender, EventArgs e)
 {
     Height        = SystemInformation.WorkingArea.Height; //max height
     Location      = new Point(Location.X, 0);             //move to top of screen
     ListSuppliers = Suppliers.CreateObjects();
     ListOrdersAll = SupplyOrders.GetAll();
     ListOrders    = new List <SupplyOrder>();
     FillComboSupplier();
     FillGridOrders();
     gridOrders.ScrollToEnd();
 }
Exemplo n.º 4
0
 private void FormSupplies_Load(object sender, EventArgs e)
 {
     Height        = SystemInformation.WorkingArea.Height; //max height
     Location      = new Point(Location.X, 0);             //move to top of screen
     ListSupplier  = Suppliers.CreateObjects();
     ListSupplyAll = Supplies.GetAll();                    //Seperate GetAll() function call so that we do not copy by reference.
     fillComboSupplier();
     FillGrid();
     if (IsSelectMode)
     {
         comboSupplier.Enabled = false;
         //gridMain.SelectionMode=GridSelectionMode.One;//we now support multi select to add
     }
 }
Exemplo n.º 5
0
        private void gridOrderItem_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            FormSupplyOrderItemEdit FormSOIE = new FormSupplyOrderItemEdit();

            FormSOIE.ItemCur      = SupplyOrderItems.CreateObject((long)tableOrderItems.Rows[e.Row]["SupplyOrderItemNum"]);
            FormSOIE.ListSupplier = Suppliers.CreateObjects();
            FormSOIE.ShowDialog();
            if (FormSOIE.DialogResult != DialogResult.OK)
            {
                return;
            }
            SupplyOrderItems.Update(FormSOIE.ItemCur);
            ListOrdersAll = SupplyOrders.GetAll();            //force refresh because total might have changed.
            int gridSelect = gridOrders.SelectedIndices[0];

            FillGridOrders();
            gridOrders.SetSelected(gridSelect, true);
            FillGridOrderItem();
        }
Exemplo n.º 6
0
        private void FillGrid()
        {
            listSuppliers = Suppliers.CreateObjects();
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g(this, "Name"), 110);

            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Phone"), 90);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "CustomerID"), 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Website"), 180);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "UserName"), 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Password"), 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn(Lan.g(this, "Note"), 150);
            gridMain.Columns.Add(col);
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < listSuppliers.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(listSuppliers[i].Name);
                row.Cells.Add(listSuppliers[i].Phone);
                row.Cells.Add(listSuppliers[i].CustomerId);
                row.Cells.Add(listSuppliers[i].Website);
                row.Cells.Add(listSuppliers[i].UserName);
                row.Cells.Add(listSuppliers[i].Password);
                row.Cells.Add(listSuppliers[i].Note);
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
        }