Example #1
0
 private void gridView1_InitNewRow_1(object sender, InitNewRowEventArgs e)
 {
     var view = (GridView)sender;
     if (view.DataRowCount == 0)
         view.SetRowCellValue(e.RowHandle, view.Columns["ISPRIMARY"], true);
     else
     {
         view.SetRowCellValue(e.RowHandle, view.Columns["ISPRIMARY"], false);
     }
 }
 private void gridViewData_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     if (LUEMem.EditValue == null)
     {
         gridViewData.DeleteRow(e.RowHandle);
         return;
     }
     DataSources.dsTeachersUnion.TBLMemberEsalatRow row = (DataSources.dsTeachersUnion.TBLMemberEsalatRow)gridViewData.GetDataRow(e.RowHandle);
     row.MemberId = Convert.ToInt32(LUEMem.EditValue);
     row.datein = SQLProvider.GetServerDateTime();
     row.userin = Program.UserInfo.UserId;
 }
Example #3
0
        private void pipesSizeListGridView_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            viewModel.ModifiableView.UpdateState();
            GridView v = sender as GridView;
            CurrentPipeMillSizeType = v.GetRow(e.RowHandle) as PipeMillSizeType;
            CurrentPipeMillSizeType.IsActive = true;
            CurrentPipeMillSizeType.IsNative = true;
            CurrentPipeMillSizeType.Project = viewModel.CurrentProjectSettings;
            CurrentPipeMillSizeType.SeamType = new SeamType() { IsNative = true, Project = viewModel.CurrentProjectSettings };

            if (CurrentPipeMillSizeType != null)
            {
                viewModel.UpdatePipeTests(CurrentPipeMillSizeType);
            }

            foreach (Prizm.Domain.Entity.Mill.Category c in viewModel.CategoryTypes)
            {
                if (c.Fixed && c.Type == FixedCategory.Length)
                {
                    CurrentPipeMillSizeType.PipeTests.Add(new PipeTest { Category = c, ResultType = PipeTestResultType.Diapason, pipeType = CurrentPipeMillSizeType, FrequencyType = InspectionFrequencyType.R });
                }
            }
        }
 private void GridView_OnInitNewRow(object sender, InitNewRowEventArgs e)
 {
     newRowAdded = true;
 }
Example #5
0
 private void inspectionView_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     GridView v = sender as GridView;
     PipeTest pipeTest = v.GetRow(e.RowHandle) as PipeTest;
     pipeTest.IsActive = true;
     pipeTest.pipeType = CurrentPipeMillSizeType;
     foreach (PipeTest t in CurrentPipeMillSizeType.PipeTests)
     {
         t.pipeType = CurrentPipeMillSizeType;
     }
     CurrentPipeMillSizeType.PipeTests.Add(pipeTest);
 }
Example #6
0
        private void gdvType_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            try
            {
                GridView view = (GridView)sender;
                MaterialTypeObject type = (MaterialTypeObject)view.GetRow(e.RowHandle);
                MaterialCategoryObject category = (MaterialCategoryObject)gdvCategory.GetRow(gdvCategory.FocusedRowHandle);
                type.Type = " ";
                type.MaterialCategory = category;
                type.SubTypes = new DL.Internal.MaterialSubType.MaterialSubTypeObjectCollection();

                new BL.Internal.MaterialType().Save(type);
            }
            catch (System.Exception exception1)
            {
                System.Exception thisException = exception1;
                Management.ShowException(thisException);
            }
        }
 private void gvPurchasingDetail_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     gvPurchasingDetail.SetRowCellValue(e.RowHandle, "Qty", 0);
     gvPurchasingDetail.SetRowCellValue(e.RowHandle, "Price", 0);
 }
Example #8
0
        private void gridViewRole_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            var view = sender as GridView;

            if (view.IsValidRowHandle(e.RowHandle))
            {
                Role role = view.GetRow(e.RowHandle) as Role;

            }
        }
Example #9
0
        private void gdvCategory_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            try
            {
                GridView view = (GridView)sender;
                MaterialCategoryObject category = (MaterialCategoryObject)view.GetRow(e.RowHandle);
                category.Types = new DL.Internal.MaterialType.MaterialTypeObjectCollection();
                category.Revisions = new DL.Internal.Revision.RevisionObjectCollection();
                category.Category = " ";

                new BL.Internal.MaterialCategory().Save(category);
            }
            catch (System.Exception exception1)
            {
                System.Exception thisException = exception1;
                Management.ShowException(thisException);
            }
        }
 private void gridViewDetails_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     DataSources.dsTeachersUnion.TBLMazroofRow row = (DataSources.dsTeachersUnion.TBLMazroofRow)gridViewDetails.GetDataRow(e.RowHandle);
     row.ReceiptNo = _row.ReceiptNo;
     row.userwork = Program.UserInfo.UserId;
     row.datework = (DateTime)new DataSources.dsTeachersUnionQueryTableAdapters.ServerDateTimeTableAdapter().ScalarQueryServerDateTime();
 }
Example #11
0
 private void gridViewData_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     DataSources.dsDataCenter.UsersRow row = (DataSources.dsDataCenter.UsersRow)gridViewData.GetDataRow(e.RowHandle);
     row.UserLevelId = (int)nsLib.Utilities.Types.UserLevelType.User;
     row.IsActive = true;
 }
        private void gridViewRole_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            GridView GV = (GridView)gridControlRole.MainView;
            DataSources.dsDataCenter.CategoryRoleRow row = (DataSources.dsDataCenter.CategoryRoleRow)GV.GetDataRow(e.RowHandle);

            row.CategoryId = _row.CategoryId;
            row.UserLevelId = (int)nsLib.Utilities.Types.UserLevelType.User;
            row.CanRead = false; row.CanWrite = false; row.CanDelete = false;
            row.CanInsert = false; row.Inheritance = false; row.GrantId = 1;
        }
Example #13
0
 private void TableView_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     //gridFactor.SetCellValue(e.RowHandle, "Factor", "Factor");
     //gridFactor.SetCellValue(e.RowHandle, "DailyReturn", 0);
     //gridFactor.SetCellValue(e.RowHandle, "DailySigma", 0);
 }
Example #14
0
 private void ViewDetailInitNewRow(object sender, InitNewRowEventArgs e)
 {
     viewDetail.SetFocusedRowCellValue(colFkDetailDescription, FocusedRow.Identity);
       viewDetail.SetFocusedRowCellValue(colArrange, viewDetail.DataRowCount);
 }
Example #15
0
        private void ViewDescriptionInitNewRow(object sender, InitNewRowEventArgs e)
        {
            viewDescription.SetFocusedRowCellValue(colArrange, viewDescription.DataRowCount);

              if (!IsPredefinedMode)
              {
            viewDescription.SetFocusedRowCellValue(colFkDescriptionOrder, Order.Identity);
              }
              else
              {
            viewDescription.SetFocusedRowCellValue(colPredefinedDescription, true);
              }
        }
 private void gridView1_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     gridView1.SetRowCellValue(e.RowHandle, "Maestro", sName);
     gridView1.SetRowCellValue(e.RowHandle, "IndexClave", nIndexClave);
 }
Example #17
0
        private void inspectorCertificateGridView_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            var inspc = gridViewInspectors.GetFocusedRow() as InspectorViewType;
            var view = sender as GridView; //cert Grid
            if (inspc != null)
            {
                if (view.IsValidRowHandle(e.RowHandle))
                {
                    var insp = gridViewInspectors.GetFocusedRow() as InspectorViewType; // inspector from InspectorGrid
                    InspectorCertificate cert = view.GetRow(e.RowHandle) as InspectorCertificate; //certif from certif grid 
                    if (cert != null)
                    {
                        cert.Inspector = insp.Inspector;
                        cert.IsActive = true;
                        cert.Certificate = new Certificate { ExpirationDate = DateTime.Now };
                    }
                }
            }
            else
            {

                inspectorCertificateGridView.SetColumnError(inspectorCertificateGridView.Columns[0],
                    Program.LanguageManager.GetString(StringResources.Settings_ValidateInspectorSertificate));

            }
        }
Example #18
0
 private void jointsOperationsGridView_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     GridView v = sender as GridView;
     JointOperation jointOperation = v.GetRow(e.RowHandle) as JointOperation;
     jointOperation.IsActive = true;
     jointOperation.IsRequired = true;
 }
Example #19
0
        private void categoryGridView_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            GridView v = sender as GridView;
            Prizm.Domain.Entity.Mill.Category category
                = v.GetRow(e.RowHandle) as Prizm.Domain.Entity.Mill.Category;

            category.IsActive = true;
        }
Example #20
0
 private void componentryTypeGridView_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     GridView v = sender as GridView;
     ComponentType componentType = v.GetRow(e.RowHandle) as ComponentType;
     componentType.IsActive = true;
     componentType.IsNative = true;
     componentType.Project = viewModel.CurrentProjectSettings;
     componentType.ConnectorsCount = 2;
 }
Example #21
0
 private void gridViewUsers_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     var view = sender as GridView;
     if (view.IsValidRowHandle(e.RowHandle))
     {
         User user = view.GetRow(e.RowHandle) as User;
         if (user != null)
         {
             user.IsActive = true;
         }
     }
 }
Example #22
0
 private void certificateTypesView_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     GridView v = sender as GridView;
     InspectorCertificateType certificateType = v.GetRow(e.RowHandle) as InspectorCertificateType;
     certificateType.IsActive = true;
 }
Example #23
0
        private void gdvSubTypes_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            try
            {
                GridView view = (GridView)sender;

                MaterialSubTypeObject subType = (MaterialSubTypeObject)view.GetRow(e.RowHandle);
                MaterialTypeObject type = (MaterialTypeObject)view.ParentView.GetRow(view.SourceRowHandle);
                subType.SubType = " ";
                subType.MaterialType = type;
                new BL.Internal.MaterialSubType().Save(subType);
            }
            catch (System.Exception exception1)
            {
                System.Exception thisException = exception1;
                Management.ShowException(thisException);
            }
        }
 private void gridViewTBLHafzaTasleem_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     DataSources.dsTeachersUnion.TBLHafzaTasleemDeyailsRow row = (DataSources.dsTeachersUnion.TBLHafzaTasleemDeyailsRow)gridViewData.GetDataRow(e.RowHandle);
     row.HafzaId = _row.HafzaId;
 }
Example #25
0
 protected override void RaiseInitNewRow(InitNewRowEventArgs e)
 {
     base.RaiseInitNewRow(e);
     if (this.DefaultNewRow != null)
     {
         DataRow dr = this.GetDataRow(e.RowHandle);
         DefaultNewRow(dr);
     }
 }
 private void gridViewSadad_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     DataSources.dsTeachersUnion.TBLSadadWebRow row = (DataSources.dsTeachersUnion.TBLSadadWebRow)gridViewSadad.GetDataRow(e.RowHandle);
     row.MemberId = _row.MemberId;
     row.userin = Program.UserInfo.UserId;
     row.datein = (DateTime)new DataSources.dsTeachersUnionQueryTableAdapters.ServerDateTimeTableAdapter().ScalarQueryServerDateTime();
 }
Example #27
0
 private void seemTypeGridView_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     GridView v = sender as GridView;
     SeamType seemType = v.GetRow(e.RowHandle) as SeamType;
     seemType.IsActive = true;
     seemType.IsNative = true;
     seemType.Project = viewModel.CurrentProjectSettings;
 }
Example #28
0
 private void LayoutView_InitNewRow(object sender, InitNewRowEventArgs e) {
     OnNewObjectCreated();
 }
 private void gridView1_InitNewRow(object sender, InitNewRowEventArgs e)
 {
     gridView1.SetRowCellValue(e.RowHandle, "Maestro",sName);
     gridView1.Columns["Materia"].OptionsColumn.AllowEdit = true;
         
 }
Example #30
0
        private void plateManufacturersListView_InitNewRow(object sender, InitNewRowEventArgs e)
        {
            GridView gv = sender as GridView;
            PlateManufacturer plateManufacturer
                = gv.GetRow(e.RowHandle) as PlateManufacturer;

            plateManufacturer.IsActive = true;
            plateManufacturer.IsNative = true;
            plateManufacturer.Project = viewModel.CurrentProjectSettings;
        }