Пример #1
0
        /// <summary>
        /// Load Detail form/list in master detail. Triggered by user's change in Grid's Row.
        /// When row change, load "DetailForm" or "Detail List" (need to be configured)
        /// </summary>
        /// <param name="selectedItem"></param>
        private void LoadDetail(ModelNotifiedForCustomers selectedItem)
        {
            if (selectedItem == null)
            {
                return;
            }


            if (DetailListCustomerCustomerDemo != null)
            {
                DetailListCustomerCustomerDemo.LoadGrid(x => x.CustomerID == selectedItem.CustomerID);
            }
            if (DetailListOrders != null)
            {
                DetailListOrders.LoadGrid(x => x.CustomerID == selectedItem.CustomerID);
            }

/* Note: the detail form can load only ONE row from 'CustomerCustomerDemo'. It's necessary to inform DetailForm primary key here or create a custom Form.Load().
 * if (DetailForm{0} != null)
 * {
 * //DetailFormCustomerCustomerDemo.LoadForm(selectedItem.CustomerID);
 * }
 */
/* Note: the detail form can load only ONE row from 'Orders'. It's necessary to inform DetailForm primary key here or create a custom Form.Load().
 * if (DetailForm{0} != null)
 * {
 * //DetailFormOrders.LoadForm(selectedItem.CustomerID);
 * }
 */
        }
Пример #2
0
        /// <summary>
        /// Load Detail form/list in master detail. Triggered by user's change in Grid's Row.
        /// When row change, load "DetailForm" or "Detail List" (need to be configured)
        /// </summary>
        /// <param name="selectedItem"></param>
        private void LoadDetail(ModelNotifiedForEmployees selectedItem)
        {
            if (selectedItem == null)
            {
                return;
            }


            if (DetailListEmployeeTerritories != null)
            {
                DetailListEmployeeTerritories.LoadGrid(x => x.EmployeeID == selectedItem.EmployeeID);
            }
            if (DetailListOrders != null)
            {
                DetailListOrders.LoadGrid(x => x.EmployeeID == selectedItem.EmployeeID);
            }
            if (DetailListTagEmployee != null)
            {
                DetailListTagEmployee.LoadGrid(x => x.EmployeeIDFK == selectedItem.EmployeeID);
            }

/* Note: the detail form can load only ONE row from 'EmployeeTerritories'. It's necessary to inform DetailForm primary key here or create a custom Form.Load().
 * if (DetailForm{0} != null)
 * {
 * //DetailFormEmployeeTerritories.LoadForm(selectedItem.EmployeeID);
 * }
 */
/* Note: the detail form can load only ONE row from 'Orders'. It's necessary to inform DetailForm primary key here or create a custom Form.Load().
 * if (DetailForm{0} != null)
 * {
 * //DetailFormOrders.LoadForm(selectedItem.EmployeeID);
 * }
 */
/* Note: the detail form can load only ONE row from 'TagEmployee'. It's necessary to inform DetailForm primary key here or create a custom Form.Load().
 * if (DetailForm{0} != null)
 * {
 * //DetailFormTagEmployee.LoadForm(selectedItem.EmployeeID);
 * }
 */
        }