コード例 #1
0
        private void gridSalesItem_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            HSOrderItem lNewItem = new HSOrderItem();

            HSSales lCurrentItem = myRadDataForm.CurrentItem as HSSales;

            lNewItem.SalesId = lCurrentItem.Id;
            // lNewItem.VatRate = lCurrentItem.SelectedVatRate;
            lNewItem.SalesStatusId = 1;

            e.NewObject = lNewItem;

            //myRadDataForm
        }
コード例 #2
0
        private void gridSalesItem_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            HSOrderItem lNewItem = new HSOrderItem();

            if (comboCustomer.SelectedItem == null)
            {
                MessageBox.Show("Please Select Customer...");
                e.Cancel = true;
                return;
            }

            lNewItem.CustomerId    = (comboCustomer.SelectedItem as DataSource.Customer).Id;
            lNewItem.SalesStatusId = 1;
            lNewItem.Quantity      = 0;

            e.NewObject = lNewItem;
        }