Пример #1
0
        void ReleaseDesignerOutlets()
        {
            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (TaskDescription != null)
            {
                TaskDescription.Dispose();
                TaskDescription = null;
            }

            if (TaskType != null)
            {
                TaskType.Dispose();
                TaskType = null;
            }

            if (TaskTypeIcon != null)
            {
                TaskTypeIcon.Dispose();
                TaskTypeIcon = null;
            }

            if (ManageChildrenButton != null)
            {
                ManageChildrenButton.Dispose();
                ManageChildrenButton = null;
            }
        }
Пример #2
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            Page.RegisterRequiresControlState(this);

            listTextBox = new List <ASPxButtonEdit>();
            string code = null;

            for (int i = 0; i < iSabayaContext.Languages.Count; i++)
            {
                code = iSabayaContext.Languages[i].Code;
                ASPxButtonEdit txt = new ASPxButtonEdit();
                txt.ID = code.Replace('-', '_');
                txt.ClientInstanceName = this.ClientID + txt.ID;
                txt.Width = Width;
                txt.ButtonStyle.Font.Bold = true;
                EditButton btn = new EditButton();
                btn.Width   = Unit.Pixel(24);
                btn.Text    = code.Substring(0, code.IndexOf('-')).ToUpper();
                btn.Enabled = false;
                btn.ToolTip = iSabayaContext.Languages[i].Title;
                txt.ButtonStyle.Border.BorderWidth = Unit.Pixel(0);
                txt.ButtonStyle.Paddings.Padding   = Unit.Pixel(0);
                txt.Buttons.Add(btn);
                //txt.ButtonTemplate = new ButtonFlagImage(iSabayaContext.Languages[i].Code, iSabayaContext.Languages[i].SmallImageBytes);
                listTextBox.Add(txt);
            }
            tbControl = new Table()
            {
                CellPadding = 0, CellSpacing = 0
            };
            hddID = new HiddenField();
        }
        void ReleaseDesignerOutlets()
        {
            if (AppraisedContainerView != null)
            {
                AppraisedContainerView.Dispose();
                AppraisedContainerView = null;
            }

            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (SubmitBtn != null)
            {
                SubmitBtn.Dispose();
                SubmitBtn = null;
            }

            if (SummaryContainerView != null)
            {
                SummaryContainerView.Dispose();
                SummaryContainerView = null;
            }

            if (valuemytrade != null)
            {
                valuemytrade.Dispose();
                valuemytrade = null;
            }
        }
Пример #4
0
        void ReleaseDesignerOutlets()
        {
            if (Addbutton != null)
            {
                Addbutton.Dispose();
                Addbutton = null;
            }

            if (DeleteButton != null)
            {
                DeleteButton.Dispose();
                DeleteButton = null;
            }

            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (Search != null)
            {
                Search.Dispose();
                Search = null;
            }
        }
        protected override void OnButtonClick(EditButton editButton)
        {
            bool hasPinpointed = Pinpoint(Village) || Pinpoint(Player);

            if (!hasPinpointed)
            {
                int kingdom;
                if (Tribe != null)
                {
                    _map.SetCenter(Tribe);
                    _map.EventPublisher.SelectTribe(this, Tribe, VillageTools.PinPoint);
                }
                else if (TryParseKingdom(out kingdom))
                {
                    _map.SetCenterContinent(kingdom);
                }
                else if (AllowCoordinates)
                {
                    Point?point = World.Default.GetCoordinates(Text);
                    if (point.HasValue)
                    {
                        if (_showButton && _map != null)
                        {
                            _map.SetCenter(point.Value);
                        }
                    }
                }
                else
                {
                    _tooltip.ToolTipTitle = string.Empty;
                    _tooltip.SetToolTip(this, GetEmptyTooltip());
                }
            }
        }
Пример #6
0
 private void EditAddPanel_MouseHover(object sender, EventArgs e)
 {
     Size = new Size(459, 316);
     EditAddPanel.Show();
     Adddetails.Show();
     EditButton.Show();
 }
Пример #7
0
        private void checkDataChanged(int ID)
        {
            SqlConnection con = new SqlConnection("Data Source=luxefood.database.windows.net;Initial Catalog=LuxeFoods;User ID=Klees;Password=Johnny69;Connect Timeout=60;Encrypt=True;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False");
            DataSet       ds  = new DataSet();

            con.Open();
            SqlCommand     read  = new SqlCommand($"SELECT * from [restaurant] WHERE id='{ID}'", con);
            SqlDataAdapter adapt = new SqlDataAdapter(read);

            adapt.FillSchema(ds, SchemaType.Source, "Restauranten");
            adapt.Fill(ds, "Restauranten");
            con.Close();

            DataTable tblRestauranten = ds.Tables["Restauranten"];

            foreach (DataRow x in tblRestauranten.Rows)
            {
                if (textBox1.Text != "" && textBox1.Text != x["naam"].ToString())
                {
                    EditButton.Show();
                }
                else
                {
                    EditButton.Hide();
                }
            }
        }
    private void InitializeControls()
    {
        cbTest.ClientInstanceName                   = this.cbTest.ID.ToString() + Name;
        cbpTxtMFAccountNo.ClientInstanceName        = cbpTxtMFAccountNo.ClientID + this.ClientID;
        cboAccountNo.ClientInstanceName             = String.IsNullOrEmpty(ComboName) ? this.ClientID + cboAccountNo.ClientID : ComboName;
        CallbacklikeCustomerName.ClientInstanceName = this.ClientID + CallbacklikeCustomerName.ClientID;
        GridCustomer.ClientInstanceName             = this.ClientID + GridCustomer.ClientID;
        txtFirstName.ClientInstanceName             = this.ClientID + txtFirstName.ClientID;
        btnFindName.ClientInstanceName              = this.ClientID + btnFindName.ClientID;
        lblMFCustomerName.ClientInstanceName        = lblMFCustomerName.ClientID + this.ClientID;
        cboAccountNo.ClientInstanceName             = cboAccountNo.ClientID + this.ClientID;
        cbCheckOwner.ClientInstanceName             = cbCheckOwner.ClientID + this.ClientID;
        popupAccount.ClientInstanceName             = popupAccount.ClientID + this.ClientID;
        cbpViewSignature.ClientInstanceName         = string.Format("{0}_{1}", this.ClientID, cbpViewSignature.ID);
        btnViewSignature.ClientInstanceName         = string.Format("{0}_{1}", this.ClientID, btnViewSignature.ID);
        popupViewSignature.ClientInstanceName       = string.Format("{0}_{1}", this.ClientID, popupViewSignature.ID);

        //game
        imgIsEmployee.ClientInstanceName = this.ClientID + imgIsEmployee.ClientID;

        EditButton btn = new EditButton();

        btn.Image.Url = ResImageURL.Detail;
        btn.Position  = ButtonsPosition.Left;
        btn.ToolTip   = "Browse";
        cboAccountNo.Buttons.Add(btn);
    }
Пример #9
0
        private void AddGame_FormClosing(object sender, FormClosingEventArgs e)
        {
            if ((!string.IsNullOrEmpty(nameTextBox.Text)) && (!Compl))
            {
                var SV = new SaveNotSaveDialog();
                switch (SV.ShowDialog())
                {
                case DialogResult.OK:
                    if (AddingGame.ID_Game > 0)
                    {
                        EditButton.PerformClick();
                    }
                    else
                    {
                        AddBut.PerformClick();
                    }
                    break;

                case DialogResult.No:
                    _context.RejectChanges(AddingGame);
                    break;

                case DialogResult.Cancel:
                    e.Cancel = true;
                    break;
                }
            }
            else
            {
                _context.RejectChanges(AddingGame);
            }
        }
Пример #10
0
        protected override WebControl CreateEditModeControlCore()
        {
            WebControl         control = base.CreateEditModeControlCore();
            ASPxButtonEditBase buttonEdit;

            if (UseFindEdit())
            {
                buttonEdit = FindEdit.Editor;
            }
            else
            {
                buttonEdit = DropDownEdit.DropDown;
            }
            if (editObjectAction == null)
            {
                editObjectAction = new PopupWindowShowAction(null, MemberInfo.Name + "_ASPxLookupEditor_EditObject", PredefinedCategory.Unspecified);
                editObjectAction.CustomizePopupWindowParams += editObjectAction_CustomizePopupWindowParams;
                editObjectAction.Application = application;
            }
            EditButton editButton = new EditButton();

            ASPxImageHelper.SetImageProperties(editButton.Image, "Editor_Edit", 16, 16);
            buttonEdit.Buttons.Add(editButton);
            buttonEdit.Load += new EventHandler(buttonEdit_Load);
            return(control);
        }
Пример #11
0
 private void Adddetails_MouseMove(object sender, MouseEventArgs e)
 {
     Size = new Size(459, 316);
     EditAddPanel.Show();
     Adddetails.Show();
     EditButton.Show();
 }
Пример #12
0
        void ReleaseDesignerOutlets()
        {
            if (ContentView != null)
            {
                ContentView.Dispose();
                ContentView = null;
            }

            if (DeleteButton != null)
            {
                DeleteButton.Dispose();
                DeleteButton = null;
            }

            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (OkButton != null)
            {
                OkButton.Dispose();
                OkButton = null;
            }

            if (Text != null)
            {
                Text.Dispose();
                Text = null;
            }
        }
Пример #13
0
 private void LstBairro_DoubleClick(object sender, EventArgs e)
 {
     if (BairroListBox.SelectedItem == null)
     {
         return;
     }
     EditButton.PerformClick();
 }
Пример #14
0
 public override void _Ready()
 {
     editor     = GetNode <TextEdit>("/root/Window/VB/MainHB/Editor");
     preview    = GetNode <TextPreview>("/root/Window/VB/MainHB/TextPreview");
     window     = GetNode <Window>("/root/Window");
     editButton = GetNode <EditButton>("/root/Window/VB/BottomHB/EditButton");
     addButton  = GetNode <AddButton>("/root/Window/VB/BottomHB/AddButton");
 }
        public bool ClickSave()
        {
            Save.Click();

            EditButton.WaitTilIsVisible();

            return(true);
        }
Пример #16
0
 public static void AddFavButton4Cmb(ASPxComboBox cmb)
 {
     var btnFav = new EditButton { Position = ButtonsPosition.Left };
     btnFav.Image.Url = "~/img/btnico/star.png";
     btnFav.Image.Width = Unit.Pixel(16);
     btnFav.ToolTip = "Nhấn vào đây để chọn mục này là mặc định cho lần sau.";
     cmb.Buttons.Add(btnFav);
 }
Пример #17
0
        private void EditButton_Click(object sender, EventArgs e)
        {
            EditButton.ImageKey = "PanelDropDown_Down.bmp";

            Rectangle rect = EditButton.RectangleToScreen(EditButton.ClientRectangle);

            EditMenu.Show(rect.X - (EditMenu.Width - EditButton.Width) - 4, rect.Y + (EditButton.Height - 6));
        }
        private void checkDataChanged(int ID)
        {
            SqlConnection con = new SqlConnection("Data Source=luxefood.database.windows.net;Initial Catalog=LuxeFoods;User ID=Klees;Password=Johnny69;Connect Timeout=60;Encrypt=True;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False");
            DataSet       ds  = new DataSet();

            con.Open();
            SqlCommand     read  = new SqlCommand($"SELECT * from [reservering] WHERE Id='{ID}'", con);
            SqlDataAdapter adapt = new SqlDataAdapter(read);

            adapt.FillSchema(ds, SchemaType.Source, "Reservering");
            adapt.Fill(ds, "Reservering");
            con.Close();

            DataTable tblReservering = ds.Tables["Reservering"];

            int seatNr = 0;

            if (availableSeatsListBox.SelectedItem != null)
            {
                if (availableSeatsListBox.SelectedItem.ToString() != "Current Seat")
                {
                    string strSource = availableSeatsListBox.SelectedItem.ToString();
                    string strStart  = "Seat nr: ";
                    if (strSource.Contains(strStart))
                    {
                        int start, end;
                        start = strSource.IndexOf(strStart, 0) + strStart.Length;
                        end   = strSource.Length;
                        string reservationID = strSource.Substring(start, end - start);

                        string seatNrStr = string.Empty;

                        for (int i = 0; i < reservationID.Length; i++)
                        {
                            if (Char.IsDigit(reservationID[i]))
                            {
                                seatNrStr += reservationID[i];
                            }
                        }

                        seatNr = Int32.Parse(seatNrStr);
                    }
                }
            }


            foreach (DataRow x in tblReservering.Rows)
            {
                if (((int)x["restaurantId"] != (int)RestaurantPicker.SelectedValue) || ((DateTime)x["datum"] != dateTimePicker1.Value) || ((int)x["tafelNummer"] != seatNr && (DateTime)x["datum"] == dateTimePicker1.Value && seatNr != 0))
                {
                    EditButton.Show();
                }
                else
                {
                    EditButton.Hide();
                }
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AnimatedImageView != null)
            {
                AnimatedImageView.Dispose();
                AnimatedImageView = null;
            }

            if (LivePhotoView != null)
            {
                LivePhotoView.Dispose();
                LivePhotoView = null;
            }

#if __TVOS__
            if (LivePhotoPlayButton != null)
            {
                LivePhotoPlayButton.Dispose();
                LivePhotoPlayButton = null;
            }
#endif

            if (ImageView != null)
            {
                ImageView.Dispose();
                ImageView = null;
            }

            if (Space != null)
            {
                Space.Dispose();
                Space = null;
            }

            if (TrashButton != null)
            {
                TrashButton.Dispose();
                TrashButton = null;
            }

            if (PlayButton != null)
            {
                PlayButton.Dispose();
                PlayButton = null;
            }

            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (ProgressView != null)
            {
                ProgressView.Dispose();
                ProgressView = null;
            }
        }
Пример #20
0
    /*
     <dx:EditButton Position="Left" ToolTip="<%$ Resources:Control, DefaultButton.Tooltip %>">
                                <Image Height="16px" Url="~/img/btnico/star.png" Width="16px">
                                </Image>
                            </dx:EditButton>
                            <dx:EditButton ToolTip="<%$ Resources:Control, AddButton.Tooltip %>">
                                <Image Url="~/img/common/Add.png" Width="16px">
                                </Image>
                            </dx:EditButton>
     */
    public static void AddNewButton4Cmb(ASPxComboBox cmb)
    {
        var btnNew = new EditButton { Position = ButtonsPosition.Right };
        btnNew.Image.Url = "~/img/common/Add.png";
        btnNew.Image.Width = Unit.Pixel(16);
        btnNew.ToolTip = "Nhấn vào đây để tạo mới thêm danh mục này";

        cmb.Buttons.Add(btnNew);
    }
Пример #21
0
 public LiveCardDataPreview()
 {
     InitializeComponent();
     EditAddPanel.Hide();
     //_instanceOfForm2 = new LiveCardInputForm();
     Adddetails.Hide();
     EditButton.Hide();
     /* bunifuImageButton1.Hide();*/
 }
Пример #22
0
        private EditButton CreateEditButton(DevExpress.Web.ASPxEditors.ButtonsPosition position, string cssClass, string disabledCssClass)
        {
            EditButton btn = new EditButton();

            btn.Position = position;
            btn.Image.SpriteProperties.CssClass         = cssClass + "_" + this.CssPostfix;
            btn.Image.SpriteProperties.DisabledCssClass = disabledCssClass + "_" + this.CssPostfix;
            return(btn);
        }
Пример #23
0
 public void UpdateContextMenus()
 {
     EditButton
     .GetBindingExpression(VisibilityProperty)?
     .UpdateTarget();
     DeleteButton
     .GetBindingExpression(VisibilityProperty)?
     .UpdateTarget();
 }
Пример #24
0
 void preview_Closed(object sender, EventArgs e)
 {
     GetProjectDetails(id);
     if (Controllers.User != "admin")
     {
         EditButton.Hide();
     }
     GetTasks(id);
 }
Пример #25
0
        // Lưu chỉnh sửa độc giả
        private void SaveEditButton_Click(object sender, EventArgs e)
        {
            DocGiaDTO DgDTO = new DocGiaDTO();

            if (radioButton5.Checked == true)
            {
                DgDTO.Madocgia   = textBox6.Text;
                DgDTO.Hoten      = textBox9.Text;
                DgDTO.Ngaysinh   = dateTimePicker4.Value;
                DgDTO.Diachi     = textBox8.Text;
                DgDTO.Email      = textBox7.Text;
                DgDTO.Loaidocgia = radioButton5.Text;
                DgDTO.Ngaylapthe = dateTimePicker5.Value;
                DgDTO.Cogiatri   = dateTimePicker3.Value;
            }
            else
            {
                DgDTO.Madocgia   = textBox6.Text;
                DgDTO.Hoten      = textBox9.Text;
                DgDTO.Ngaysinh   = dateTimePicker4.Value;
                DgDTO.Diachi     = textBox8.Text;
                DgDTO.Email      = textBox7.Text;
                DgDTO.Loaidocgia = radioButton6.Text;
                DgDTO.Ngaylapthe = dateTimePicker5.Value;
                DgDTO.Cogiatri   = dateTimePicker3.Value;
            }

            bool kq = DgBUS.Sua(DgDTO);

            if (kq == false)
            {
                MessageBox.Show("Sửa độc giả thất bại. Vui lòng kiểm tra lại dũ liệu");
            }
            else
            {
                MessageBox.Show("Sửa độc giả thành công");
                DgBUS.Getlistreader(dataGridView1);
            }


            SaveEditButton.Hide();
            CancelEdit.Hide();
            AddBt.Show();
            EditButton.Show();
            DeleteButton.Show();

            textBox6.Enabled        = false;
            textBox9.Enabled        = false;
            textBox8.Enabled        = false;
            textBox7.Enabled        = false;
            radioButton5.Enabled    = false;
            radioButton6.Enabled    = false;
            dateTimePicker4.Enabled = false;
            dateTimePicker5.Enabled = false;
            dateTimePicker6.Enabled = false;
        }
        void ReleaseDesignerOutlets()
        {
            if (ButtonsView != null)
            {
                ButtonsView.Dispose();
                ButtonsView = null;
            }

            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (DeleteButton != null)
            {
                DeleteButton.Dispose();
                DeleteButton = null;
            }

            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (ProductDetailsView != null)
            {
                ProductDetailsView.Dispose();
                ProductDetailsView = null;
            }

            if (ProductImageView != null)
            {
                ProductImageView.Dispose();
                ProductImageView = null;
            }

            if (ProductTitleLabel != null)
            {
                ProductTitleLabel.Dispose();
                ProductTitleLabel = null;
            }

            if (ScoreContainerView != null)
            {
                ScoreContainerView.Dispose();
                ScoreContainerView = null;
            }

            if (TextLabel != null)
            {
                TextLabel.Dispose();
                TextLabel = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AttachmentContentView != null)
            {
                AttachmentContentView.Dispose();
                AttachmentContentView = null;
            }

            if (AutorLabel != null)
            {
                AutorLabel.Dispose();
                AutorLabel = null;
            }

            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (DetailLabel != null)
            {
                DetailLabel.Dispose();
                DetailLabel = null;
            }

            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (HeightAttachmentConstraint != null)
            {
                HeightAttachmentConstraint.Dispose();
                HeightAttachmentConstraint = null;
            }

            if (SectionTextField != null)
            {
                SectionTextField.Dispose();
                SectionTextField = null;
            }

            if (TitleEventLabel != null)
            {
                TitleEventLabel.Dispose();
                TitleEventLabel = null;
            }

            if (TopAttachmentContentConstraint != null)
            {
                TopAttachmentContentConstraint.Dispose();
                TopAttachmentContentConstraint = null;
            }
        }
Пример #28
0
 public MenuDashboardGerechtOverview(int menuId, int adminID, string previous = "")
 {
     globalMenuId   = menuId;
     globalAdminID  = adminID;
     globalPrevious = previous;
     InitializeComponent();
     CenterToScreen();
     FillDashboard();
     EditButton.Hide();
 }
Пример #29
0
        private void PreviewCard_MouseHover(object sender, EventArgs e)
        {
            Adddetails.Show();
            EditButton.Show();
            Size = new Size(459, 316);
            EditAddPanel.Show();

            /* bunifuImageButton1.Show();
             * panel1.BackColor = Color.FromArgb(25, Color.Transparent);*/
        }
Пример #30
0
 public ProjectPreview(int id)
 {
     this.id = id;
     InitializeComponent();
     GetProjectDetails(id);
     if (Controllers.User != "admin")
     {
         EditButton.Hide();
     }
     GetTasks(id);
 }
Пример #31
0
 public void BudgetAmount()
 {
     if (ScenarioContext.Current.ScenarioInfo.Title == "TC5-Activating the new Package")
     {
         EditButton.SendKeys(ExcelOperation.GetData[5]);
     }
     else
     {
         EditButton.SendKeys(ExcelOperation.GetData[4]);
     }
 }
        internal void EditManageListings()
        {
            //Click on the Manage Listings Tab
            ManageListingsTab.Click();
            Thread.Sleep(2000);

            // Click on the Edit Icon
            EditButton.Click();
            Thread.Sleep(2000);
            ShareSkill ShareSkillPage = new ShareSkill();

            ShareSkillPage.EditShareSkill();
        }
Пример #33
0
        /// <summary>
        /// Constructor</summary>
        public PropertyEditingControl()
        {
            m_editButton = new EditButton();
            m_textBox = new TextBox();

            // force creation of the window handles on the GUI thread
            // see http://forums.msdn.microsoft.com/en-US/clr/thread/fa033425-0149-4b9a-9c8b-bcd2196d5471/
            #pragma warning disable 219
            IntPtr handle;
            #pragma warning restore 219
            handle = m_editButton.Handle;
            handle = m_textBox.Handle;

            base.SuspendLayout();

            m_editButton.Left = base.Right - 18;
            m_editButton.Size = new Size(18, 18);
            m_editButton.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            m_editButton.Visible = false;

            m_editButton.Click += editButton_Click;
            m_editButton.MouseDown += editButton_MouseDown;

            m_textBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom;
            m_textBox.BorderStyle = BorderStyle.None;

            m_textBox.LostFocus += textBox_LostFocus;

            // forward textbox events as if they originated with this control
            m_textBox.DragOver += textBox_DragOver;
            m_textBox.DragDrop += textBox_DragDrop;
            m_textBox.MouseHover += textBox_MouseHover;
            m_textBox.MouseLeave += textBox_MouseLeave;

            m_textBox.Visible = false;

            Controls.Add(m_editButton);
            Controls.Add(m_textBox);

            base.ResumeLayout();
            m_textBox.SizeChanged += (sender, e) => Height = m_textBox.Height + 1;
            m_dropDownForm = new DropDownForm(this);
        }
Пример #34
0
 protected override void OnButtonClick(EditButton editButton)
 {
     bool hasPinpointed = Pinpoint(Village) || Pinpoint(Player);
     if (!hasPinpointed)
     {
         int kingdom;
         if (Tribe != null)
         {
             _map.SetCenter(Tribe);
             _map.EventPublisher.SelectTribe(this, Tribe, VillageTools.PinPoint);
         }
         else if (TryParseKingdom(out kingdom))
         {
             _map.SetCenterContinent(kingdom);
         }
         else if (AllowCoordinates)
         {
             Point? point = World.Default.GetCoordinates(Text);
             if (point.HasValue)
             {
                 if (_showButton && _map != null)
                 {
                     _map.SetCenter(point.Value);
                 }
             }
         }
         else
         {
             _tooltip.ToolTipTitle = string.Empty;
             _tooltip.SetToolTip(this, GetEmptyTooltip());
         }
     }
 }
		/// <summary>
		/// Constructor
		/// Creates a FormularioBonitoTieneEditButtons link in the same Partition as the given Formulario
		/// </summary>
		/// <param name="source">Formulario to use as the source of the relationship.</param>
		/// <param name="target">EditButton to use as the target of the relationship.</param>
		public FormularioBonitoTieneEditButtons(Formulario source, EditButton target)
			: base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(FormularioBonitoTieneEditButtons.FormularioDomainRoleId, source), new DslModeling::RoleAssignment(FormularioBonitoTieneEditButtons.EditButtonDomainRoleId, target)}, null)
		{
		}
		public static Formulario GetFormulario(EditButton element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, EditButtonDomainRoleId) as Formulario;
		}
Пример #37
0
        public ASPxSearchDropDownEdit(WebLookupEditorHelper helper, string emptyValue, string displayFormat) {
            Helper = helper;
            EmptyValue = emptyValue;
            DisplayFormat = displayFormat;

            dropDown = RenderHelper.CreateASPxComboBox();
            dropDown.ID = "DD";
            dropDown.Width = Unit.Percentage(100);
            dropDown.CssClass = "xafLookupEditor";

            // the following properties would be nice to be read from the model
            dropDown.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
            dropDown.FilterMinLength = 3;

            dropDown.DropDownButton.Visible = false;
            dropDown.EnableCallbackMode = true;
            dropDown.CallbackPageSize = 10;
            dropDown.ItemRequestedByValue += dropDown_ItemRequestedByValue;
            dropDown.ItemsRequestedByFilterCondition += dropDown_ItemsRequestedByFilterCondition;

            dropDown.TextField = Helper.DisplayMember.Name;
            dropDown.ValueField = Helper.LookupObjectTypeInfo.KeyMember.Name;
            dropDown.Columns.Add(Helper.LookupObjectTypeInfo.DefaultMember.BindingName);
            /*if (Helper.LookupObjectTypeInfo.Type.FullName == "MainDemo.Module.BusinessObjects.Contact")
            {
                dropDown.Columns.Add("FullName", "FullName", 300);
                dropDown.Columns.Add("SpouseName", "SpouseName", 300);
                dropDown.TextFormatString = "{0} {1}";
            }*/

            newButton = dropDown.Buttons.Add();
            clearButton = dropDown.Buttons.Add();
            ASPxImageHelper.SetImageProperties(newButton.Image, "Action_New_12x12");
            ASPxImageHelper.SetImageProperties(clearButton.Image, "Editor_Clear");

            InitTable();
        }
		public static void SetFormulario(EditButton element, Formulario newFormulario)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, EditButtonDomainRoleId, newFormulario);
		}
Пример #39
0
    private void buildAddBtn(ASPxGridLookup cmb, string popupCode, int moduleID, int width, int height, string title, string param)
    {
        EditButton btnAdd = new EditButton();
        btnAdd.Image.IconID = "actions_add_16x16";
        btnAdd.Image.Height = Unit.Pixel(16);
        btnAdd.ToolTip = "Thêm mới";
        cmb.Buttons.Add(btnAdd);

        string cmbClientName = cmb.ClientInstanceName;

        cmb.ClientSideEvents.ButtonClick = string.Format("function(s,e){{btnCmbAdd('{0}','{1}',{2},{3},{4},'{5}','{6}');}}", popupCode, cmbClientName, moduleID, width, height, title, param);
        cmb.ClientSideEvents.KeyPress = string.Format("function(s,e){{if(event.ctrlKey && event.keyCode==13)btnCmbAdd('{0}','{1}',{2},{3},{4},'{5}','{6}');}}", popupCode, cmbClientName, moduleID, width, height, title, param);
    }
Пример #40
0
    private void buildFavAddBtn(ASPxGridLookup cmb, string popupCode, int ModulePage, int moduleID, int width, int height, string title, string param)
    {
        EditButton btnAdd = new EditButton();
        btnAdd.Image.IconID = "actions_add_16x16";
        btnAdd.Image.Height = Unit.Pixel(16);
        btnAdd.ToolTip = "Thêm mới";
        cmb.Buttons.Add(btnAdd);

        string cmbClientName = cmb.ClientInstanceName;
        string cmbClientID = cmb.ClientID + "_B1Img";

        EditButton btnFav = new EditButton();
        btnFav.Image.Url = "~/img/nonstar.png";
        btnFav.Image.Height = Unit.Pixel(16);
        btnFav.ToolTip = "Chọn làm giá trị mặc định";
        cmb.Buttons.Add(btnFav);

        cmb.ClientSideEvents.Init = string.Format("function(s,e){{cmbFavAddInit(s,'{0}','{1}',{2});}}", cmbClientName, cmbClientID, ModulePage);
        cmb.ClientSideEvents.ButtonClick = string.Format("function(s,e){{cmbFavAddClick(s,e,'{0}','{1}','{2}',{3},{4},{5},{6},'{7}','{8}');}}", popupCode, cmbClientName, cmbClientID, ModulePage, moduleID, width, height, title, param);
        cmb.ClientSideEvents.KeyPress = string.Format("function(s,e){{if(event.ctrlKey && event.keyCode==13)btnCmbAdd('{0}','{1}',{2},{3},{4},'{5}','{6}');}}", popupCode, cmbClientName, moduleID, width, height, title, param);
    }
Пример #41
0
    private void buildFavBtn(ASPxComboBox cmb, int ModulePage)
    {
        EditButton btnFav = new EditButton();
        btnFav.Image.Url = "~/img/nonstar.png";
        btnFav.Image.Height = Unit.Pixel(16);
        btnFav.ToolTip = "Chọn làm giá trị mặc định";
        cmb.Buttons.Add(btnFav);

        string cmbClientName = cmb.ClientInstanceName;
        string cmbClientID = cmb.ClientID + "_B0Img";

        cmb.ClientSideEvents.Init = string.Format("function(s,e){{cmbFavInit(s,'{0}','{1}',{2});}}", cmbClientName, cmbClientID, ModulePage);
        cmb.ClientSideEvents.ButtonClick = string.Format("function(s,e){{cmbFavClick(s,'{0}','{1}',{2});}}", cmbClientName, cmbClientID, ModulePage);
    }
Пример #42
0
 private void buildRefreshBtn(ASPxGridLookup cmb)
 {
     string cmbClientName = cmb.ClientInstanceName;
     EditButton btnRefresh = new EditButton();
     btnRefresh.Image.IconID = "actions_refresh_16x16";
     btnRefresh.Image.Height = Unit.Pixel(16);
     btnRefresh.ToolTip = "Load lại dữ liệu";
     cmb.Buttons.Add(btnRefresh);
     cmb.ClientSideEvents.ButtonClick = string.Format("function(s,e){{cmbRefreshClick('{0}');}}", cmbClientName);
 }
Пример #43
0
    private void buildFavRefresh(ASPxGridLookup cmb, int ModulePage)
    {
        EditButton btnFav = new EditButton();
        btnFav.Image.Url = "~/img/nonstar.png";
        btnFav.Image.Height = Unit.Pixel(16);
        btnFav.ToolTip = "Chọn làm giá trị mặc định";
        cmb.Buttons.Add(btnFav);

        EditButton btnRefresh = new EditButton();
        btnRefresh.Image.IconID = "actions_refresh_16x16";
        btnRefresh.Image.Height = Unit.Pixel(16);
        btnRefresh.ToolTip = "Load lại dữ liệu";
        cmb.Buttons.Add(btnRefresh);

        string cmbClientName = cmb.ClientInstanceName;
        string cmbClientID = cmb.ClientID + "_B0Img";

        cmb.ClientSideEvents.Init = string.Format("function(s,e){{cmbFavInit(s,'{0}','{1}',{2});}}", cmbClientName, cmbClientID, ModulePage);
        cmb.ClientSideEvents.ButtonClick = string.Format("function(s,e){{cmbFavRefClick(s,e,'{0}','{1}',{2});}}", cmbClientName, cmbClientID, ModulePage);
    }