private void Delete()
        {
            ProductDim oDim = ProductDim.Load(this.CombinId);

            if (oDim != null)
            {
                DeleteDetails(oDim.DimensionId);
                oDim.Delete();
            }
        }
        private void LoadCombinationList()
        {
            ProductDim oDim = ProductDim.Load(this.CombinId);

            if (oDim != null)
            {
                txtCombinNumber.Text = oDim.DimCode;
            }

            BindAppendixList();
        }
        private bool Save()
        {
            if (!Verify())
            {
                return(false);
            }

            ProductDim oDim = ProductDim.Load(this.CombinId);

            if (oDim == null)
            {
                oDim         = new ProductDim();
                oDim.DimCode = txtCombinNumber.Text;

                switch (this.FormType)
                {
                case FormLayoutType.Appendix1:
                    oDim.DimType = "A1";
                    break;

                case FormLayoutType.Appendix2:
                    oDim.DimType = "A2";
                    break;

                case FormLayoutType.Appendix3:
                    oDim.DimType = "A3";
                    break;

                case FormLayoutType.All:
                default:
                    oDim.DimType = "";
                    break;
                }

                oDim.CreatedBy = DAL.Common.Config.CurrentUserId;
                oDim.CreatedOn = DateTime.Now;
            }
            oDim.ModifiedBy = DAL.Common.Config.CurrentUserId;
            oDim.ModifiedOn = DateTime.Now;
            oDim.Save();

            this.CombinId = oDim.DimensionId;
            SaveDetails(oDim.DimensionId);

            return(this.CombinId != System.Guid.Empty);
        }