private void Save()
        {
            txtName.Focus();
            Atend.Base.Equipment.EPhotoCell photocell = new Atend.Base.Equipment.EPhotoCell();
            photocell.ProductCode = Atend.Control.Common.selectedProductCode;
            photocell.Type        = txtType.Text;
            photocell.Comment     = txtComment.Text;
            photocell.Name        = txtName.Text;
            photocell.IsDefault   = IsDefault;
            photocell.Code        = Code;

            //Equipment
            ArrayList EPackageProduct = new ArrayList();

            for (int j = 0; j < gvSelectedEquipment.Rows.Count; j++)
            {
                Atend.Base.Equipment.EProductPackage _EProductPackage = new Atend.Base.Equipment.EProductPackage();
                _EProductPackage.XCode     = new Guid(gvSelectedEquipment.Rows[j].Cells[0].Value.ToString());
                _EProductPackage.Count     = Convert.ToInt32(gvSelectedEquipment.Rows[j].Cells[2].Value.ToString());
                _EProductPackage.TableType = Convert.ToInt16(gvSelectedEquipment.Rows[j].Cells[3].Value.ToString());
                EPackageProduct.Add(_EProductPackage);
            }
            photocell.EquipmentList = EPackageProduct;

            //Operation
            ArrayList EOperation = new ArrayList();

            for (int i = 0; i < gvOperation.Rows.Count; i++)
            {
                Atend.Base.Equipment.EOperation _EOperation = new Atend.Base.Equipment.EOperation();
                _EOperation.ProductID = Convert.ToInt32(gvOperation.Rows[i].Cells[0].Value);
                _EOperation.Count     = Convert.ToDouble(gvOperation.Rows[i].Cells[3].Value);
                EOperation.Add(_EOperation);
            }
            photocell.OperationList = EOperation;
            if (selectedPhotoCellCode == Guid.Empty)
            {
                if (photocell.InsertX())
                {
                    Reset();
                }
                else
                {
                    MessageBox.Show("امکان ثبت اطلاعات نمی باشد", "خطا");
                }
            }
            else
            {
                photocell.XCode = selectedPhotoCellCode;
                if (photocell.UpdateX())
                {
                    Reset();
                }
                else
                {
                    MessageBox.Show("امکان ذخیره سازی اطلاعات نمی باشد", "خطا");
                }
            }
        }