void gvwRole_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            AspRole newItem = new AspRole();

            newItem.IsChanged = true;
            e.NewObject       = newItem;
        }
 private void radGridUnit_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     //HSProductUnit lunit = new HSProductUnit();
     //lunit.ProductId = 1;
     //lunit.UnitId = 1;
     //e.NewObject = lunit;
 }
Beispiel #3
0
 private void DataGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     CurrentColumn              = NameColumn;
     NameColumn.IsReadOnly      = false;
     IndiceIniColumn.IsReadOnly = false;
     IndiceFinColumn.IsReadOnly = false;
 }
Beispiel #4
0
 private void DataGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     CaseColumn.IsReadOnly      = false;
     SegmentColumn.IsReadOnly   = false;
     ReservoirColumn.IsReadOnly = false;
     CurrentColumn         = NameColumn;
     NameColumn.IsReadOnly = false;
 }
Beispiel #5
0
        private void RadGridView1_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            var employee = new EditableAccDocumentItem();

            employee.AccDocumentHeaderId = _viewModel.AccDocumentHeader.AccDocumentHeaderId;
            employee.Description1        = "dddddddddddddd";
            e.NewObject = employee;
        }
Beispiel #6
0
        void gvwSiteGroup_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            SiteGroup newItem = new SiteGroup();

            newItem.CreatedBy = newItem.UpdatedBy = Globals.UserLogin.UserName;
            newItem.IsChanged = true;
            newItem.Sites     = new List <Site>();
            e.NewObject       = newItem;
        }
Beispiel #7
0
 private void DataGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     CurrentColumn              = NameColumn;
     NameColumn.IsReadOnly      = false;
     BlockColumn.IsReadOnly     = false;
     ReductionFactor.IsReadOnly = false;
     Case.IsReadOnly            = false;
     Id.IsReadOnly              = false;
 }
        void gvwServices_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            Service newItem = new Service();

            newItem.RecordId       = null;
            newItem.CreatedBy      = Globals.UserLogin.UserName;
            newItem.OrganisationId = Globals.UserLogin.UserOrganisationId;
            newItem.IsChanged      = true;
            e.NewObject            = newItem;
        }
Beispiel #9
0
        private void DataGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            CurrentColumn         = Contrato;
            NameColumn.IsReadOnly = false;
            Contrato.IsReadOnly   = false;
            LLenarContratos();


            //CurrentColumn = NameColumn;
            //NameColumn.IsReadOnly = false;
        }
        private void OnAddingNewDetail(object obj)
        {
            Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e = obj as Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs;
            if (e == null)
            {
                return;
            }
            EmployeePaymentDetail newDetail      = new EmployeePaymentDetail();
            EmployeePayment       currentPayment = ListOfCurrentPayments.CurrentItem as EmployeePayment;

            newDetail.EmployeeId = currentPayment.EmployeeId;
            e.NewObject          = newDetail;
        }
 void gvwEquipmentDetails_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     if (_bookingRoomEquipmentItem != null)
     {
         BookingRoomEquipmentDetail newItem = new BookingRoomEquipmentDetail();
         newItem.BookingRoomEquipmentId = this.BookingEquipmentId;
         newItem.Unit       = _bookingRoomEquipmentItem.Unit;
         newItem.Price      = _bookingRoomEquipmentItem.Price;
         newItem.Quantity   = 0;
         newItem.TotalPrice = 0;
         newItem.IsChanged  = true;
         e.NewObject        = newItem;
     }
 }
Beispiel #12
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
        }
        private void localidadesGridView_NewItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            LocalidadesViewModel viewModel = (LocalidadesViewModel)this.DataContext;

            // it should never happen!
            if (viewModel == null)
            {
                return;
            }

            e.NewObject = new Localidad()
            {
                paisId = viewModel.GetPaisId, provinciaId = viewModel.GetProvinciaId
            };
        }
        //void gvwCustomers_BeginningEdit(object sender, Telerik.Windows.Controls.GridViewBeginningEditRoutedEventArgs e)
        //{
        //    if (e.Cell.Column.UniqueName == "NumberOfRooms")
        //    {
        //        e.Cancel = true;
        //    }
        //}

        void gvwCustomers_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            Customer newItem = new Customer();

            newItem.RecordId                         = null;
            newItem.OrganisationId                   = Globals.UserLogin.UserOrganisationId;
            newItem.CreatedBy                        = Globals.UserLogin.UserName;
            newItem.DateCreated                      = Globals.Now;
            newItem.ContactInformation               = new ContactInformation();
            newItem.ContactInformation.CountryId     = _defaultCountryId;
            newItem.ContactInformation.ContactTypeId = (int)ContactType.Customer;
            newItem.IsChanged                        = newItem.ContactInformation.IsChanged = true;
            e.NewObject = newItem;

            gridDetails.Visibility = ucCntactInfoPanel.Visibility = System.Windows.Visibility.Collapsed;
        }
        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;
        }
        private async void gvSchemas_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            string strErrorMsg = string.Empty;

            if (gvClassTypes.SelectedItem == null)
            {
                await DialogManager.ShowMessageAsync(this.GetMainWindow(), UIResources.MsgInfo, "请选择需要添加schemas的班级类型!", MessageDialogStyle.Affirmative, null);

                return;
            }
            try
            {
                EditSchemasWindow newSchemasWindow = new EditSchemasWindow();
                newSchemasWindow.Om          = OperationMode.AddMode;
                newSchemasWindow.ClassTypeId = this.selectClassType.Id;

                if (newSchemasWindow.ShowDialog() == true)
                {
                    await bindSchemasList();
                }
            }
            catch (TimeoutException timeProblem)
            {
                strErrorMsg = timeProblem.Message + UIResources.TimeOut + timeProblem.Message;
            }
            catch (FaultException <LCFault> af)
            {
                strErrorMsg = af.Detail.Message;
            }
            catch (FaultException unknownFault)
            {
                strErrorMsg = UIResources.UnKnowFault + unknownFault.Message;
            }
            catch (CommunicationException commProblem)
            {
                strErrorMsg = UIResources.ConProblem + commProblem.Message + commProblem.StackTrace;
            }
            catch (Exception ex)
            {
                strErrorMsg = ex.Message;
            }
            if (strErrorMsg != string.Empty)
            {
                await DialogManager.ShowMessageAsync(this.GetMainWindow(), UIResources.MsgError, "添加班级失败!原因:" + strErrorMsg, MessageDialogStyle.Affirmative, null);
            }
        }
Beispiel #17
0
        //void gvwSites_BeginningEdit(object sender, Telerik.Windows.Controls.GridViewBeginningEditRoutedEventArgs e)
        //{
        //    if (e.Cell.Column.UniqueName == "NumberOfRooms")
        //    {
        //        e.Cancel = true;
        //    }
        //}

        void gvwSites_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            Site newItem = new Site();

            newItem.RecordId           = null;
            newItem.CreatedBy          = Globals.UserLogin.UserName;
            newItem.OrganisationId     = Globals.UserLogin.UserOrganisationId;
            newItem.ContactInformation = new ContactInformation();
            newItem.ContactInformation.ContactTypeId = (int)ContactType.Site;
            if (_originalItemSource.Count() > 0)
            {
                newItem.DisplayIndex = _originalItemSource.Max(d => d.DisplayIndex) + 1;
            }
            newItem.IsChanged = true;
            e.NewObject       = newItem;

            gridContactAccount.Visibility = System.Windows.Visibility.Collapsed;
        }
Beispiel #18
0
        private async void gvConsultant_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {
            string strErrorMsg = string.Empty;

            try
            {
                EditConsultantWindow newConsultantWindow = new EditConsultantWindow();
                newConsultantWindow.Om = OperationMode.AddMode;

                if (newConsultantWindow.ShowDialog() == true)
                {
                    await bindConsultantList();
                }
            }
            catch (TimeoutException timeProblem)
            {
                strErrorMsg = timeProblem.Message + UIResources.TimeOut + timeProblem.Message;
            }
            catch (FaultException <LCFault> af)
            {
                strErrorMsg = af.Detail.Message;
            }
            catch (FaultException unknownFault)
            {
                strErrorMsg = UIResources.UnKnowFault + unknownFault.Message;
            }
            catch (CommunicationException commProblem)
            {
                strErrorMsg = UIResources.ConProblem + commProblem.Message + commProblem.StackTrace;
            }
            catch (Exception ex)
            {
                strErrorMsg = ex.Message;
                //AisinoMessageBox.Show(ex.Message, UIResources.MsgInfo, MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK);
            }
            if (strErrorMsg != string.Empty)
            {
                await DialogManager.ShowMessageAsync(this.GetMainWindow(), UIResources.MsgError, "添加会籍顾问信息失败!原因:" + strErrorMsg, MessageDialogStyle.Affirmative, null);
            }
        }
 private void relatedPersonDataGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     //relatedPersonDataForm.AddNewItem();
 }
Beispiel #20
0
 private void DataGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     CurrentColumn    = Barra;
     Barra.IsReadOnly = false;
 }
Beispiel #21
0
 private void RiversMappingDataGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     RiversMappingDataGrid.CurrentColumn = RiversMappingNameColumn;
     RiversMappingNameColumn.IsReadOnly  = false;
 }
 private void accDocumentHeaderDataGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     //_uow.AccDocumentHeaders.Add((AccDocumentHeader)e.NewObject);
     AccDocumentAccDocumentHeaderDataForm.AddNewItem();
 }
Beispiel #23
0
 private void productBrandDataGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
 }