private void NewRowManual(ref PPartnerAttributeCategoryRow ARow)
        {
            string NewName        = Catalog.GetString("NEWCATEGORY");
            Int32  CountNewDetail = 0;

            if (FMainDS.PPartnerAttributeCategory.Rows.Find(new object[] { NewName }) != null)
            {
                while (FMainDS.PPartnerAttributeCategory.Rows.Find(new object[] { NewName + CountNewDetail.ToString() }) != null)
                {
                    CountNewDetail++;
                }

                NewName += CountNewDetail.ToString();
            }

            ARow.CategoryCode           = NewName;
            ARow.PartnerContactCategory = true;
            ARow.Deletable = true;  // all manually created Contact Categories are deletable

            // Determine and set the 'Index' (ARow.Index in this case) of the new Row
            FIndexedGridRowsHelper.DetermineIndexForNewRow(ARow);
        }
Esempio n. 2
0
        private void NewRowManual(ref PPartnerAttributeTypeRow ARow)
        {
            string NewName        = Catalog.GetString("NEWTYPE");
            Int32  CountNewDetail = 0;

            if (FMainDS.PPartnerAttributeType.Rows.Find(new object[] { NewName }) != null)
            {
                while (FMainDS.PPartnerAttributeType.Rows.Find(new object[] { NewName + CountNewDetail.ToString() }) != null)
                {
                    CountNewDetail++;
                }

                NewName += CountNewDetail.ToString();
            }

            ARow.AttributeType          = NewName;
            ARow.SpecialLabel           = "PLEASE ENTER LABEL";
            ARow.CategoryCode           = FContactCategory;
            ARow.AttributeTypeValueKind = "CONTACTDETAIL_GENERAL";
            ARow.Deletable = true;  // all manually created Contact Types are deletable

            // Determine and set the 'Index' (ARow.Index in this case) of the new Row
            FIndexedGridRowsHelper.DetermineIndexForNewRow(ARow);
        }