Пример #1
0
 private void btnNewSalesOrder_Click(object sender, EventArgs e)
 {
     SalesForm salesForm = new SalesForm();
     ((IDialogForm)salesForm).RegisterCaller(this);
     salesForm.ShowDialog();
 }
Пример #2
0
        /// <summary>
        /// Shows the sales order add edit form.
        /// </summary>
        /// <param name="rowIndex">Index of the row.</param>
        void ShowSalesOrderAddEditForm(int rowIndex, string mode)
        {
            if (rowIndex > -1)
            {
                int salesOrderId = Convert.ToInt32(dgSalesOrder.Rows[rowIndex].Cells[COLUMN_INDEX_SALESORDERID].Value);

                SalesForm salesForm = new SalesForm();
                ((IDialogForm)salesForm).RegisterCaller(this);
                salesForm.SalesOrderId = salesOrderId;
                salesForm.Mode = mode;
                salesForm.ShowDialog();
            }
        }