FindById() public method

public FindById ( id ) : PostProperty
return PostProperty
Exemplo n.º 1
0
        private void SetPostPropertiesControl(string postid)
        {
            string       postId       = postid;
            PostProperty postProperty = postProperties.FindById(postId);

            if (postProperty != null)
            {
                tbPostName.Text           = postProperty.Name;
                tbPostId.Text             = postProperty.Id;
                tbPostCaption.Text        = postProperty.Caption;
                chkPostEnabled.Checked    = postProperty.Enabled;
                tbPostBtnImgOn.Text       = postProperty.BtnImageOn;
                tbPostBtnImgOff.Text      = postProperty.BtnImageOff;
                pickPostPrintCopies.Value = (decimal)postProperty.PrintCopies;
                tbPostTicketHeader.Text   = postProperty.PrintHeader;

                if (postProperty.Index == 0 || postProperty.Index == 1 || postProperty.Index == 2 ||
                    postProperty.Index == 5 || postProperty.Index == 6 || postProperty.Index == 7)
                {
                    chkPostVisible.Checked = true;
                    chkPostVisible.Enabled = false;
                }
                else
                {
                    chkPostVisible.Checked = postProperty.Visible;
                    chkPostVisible.Enabled = true;
                }
            }
        }
Exemplo n.º 2
0
        private void SetPostPropertiesControl(string postid)
        {
            string       postId = postid;
            PostProperty prop   = _postProperties.FindById(postId);

            if (prop != null)
            {
                tbPostName.Text          = prop.Name;
                tbPostId.Text            = prop.Id;
                tbPostCaption.Text       = prop.Caption;
                chkPostPlayAudio.Checked = prop.PlayAudio;
                tbPostRunText.Text       = prop.RunText;

                if (prop.Id == _settings.StationPost)
                {
                    chkPostPlayAudio.Checked = true;
                }

                if (prop.Index == 0 || prop.Index == 1 || prop.Index == 2 ||
                    prop.Index == 5 || prop.Index == 6 || prop.Index == 7)
                {
                    chkPostVisible.Checked = true;
                    chkPostVisible.Enabled = false;
                }
                else
                {
                    chkPostVisible.Checked = prop.Visible;
                    chkPostVisible.Enabled = true;
                }
            }
        }