Exemplo n.º 1
0
    private void DisplayProperties()
    {
        if (c.qsId == 0)
        {
            return;
        }

        PropertyArea.Visible = true;

        if (levelNumOfThis >= maxLevelNum)
        {
            PropertyDivider.Visible = false;
        }

        OperationForBackend op = empAuth.GetOperationData(c.qsId);

        if (op != null)
        {
            string iconImageFile = op.IconImageFile;

            if (iconImageFile != "")
            {
                imgIcon.Src = "BPimages/icon/" + iconImageFile;
            }

            ltrLinkUrl.Text = op.LinkUrl;

            bool isNewWindow = op.IsNewWindow;
            ltrIsNewWindow.Text = isNewWindow ? Resources.Lang.IsNewWindow_Yes : Resources.Lang.IsNewWindow_No;

            bool isHideSelf = op.IsHideSelf;
            ltrIsHideSelf.Text = isHideSelf ? Resources.Lang.IsHideSelf_Hide : Resources.Lang.IsHideSelf_Show;

            ltrCommonClass.Text = op.CommonClass;

            string   mdfAccount = op.MdfAccount;
            DateTime mdfDate;

            if (!op.MdfDate.HasValue)
            {
                mdfAccount = op.PostAccount;
                mdfDate    = op.PostDate.Value;
            }
            else
            {
                mdfDate = op.MdfDate.Value;
            }

            ltrMdfAccount.Text = mdfAccount;
            ltrMdfDate.Text    = mdfDate.ToString("yyyy-MM-dd HH:mm:ss");
        }
    }
Exemplo n.º 2
0
    private void DisplayOperationData()
    {
        if (c.qsAct == ConfigFormAction.edit)
        {
            OperationForBackend op = empAuth.GetOperationData(c.qsId);

            if (op != null)
            {
                txtSortNo.Text         = op.SortNo.Value.ToString();
                txtOpSubject.Text      = op.OpSubject;
                txtEnglishSubject.Text = op.EnglishSubject;
                txtIconImageFile.Text  = op.IconImageFile;
                txtLinkUrl.Text        = op.LinkUrl;
                chkIsNewWindow.Checked = op.IsNewWindow;
                chkIsHideSelf.Checked  = op.IsHideSelf;
                txtCommonClass.Text    = op.CommonClass;

                if (txtCommonClass.Text != "")
                {
                    ddlCommonClasses.SelectedValue = txtCommonClass.Text;
                }

                //modification info
                ltrPostAccount.Text = op.PostAccount;
                ltrPostDate.Text    = string.Format("{0:yyyy-MM-dd HH:mm:ss}", op.PostDate);

                if (op.MdfDate.HasValue)
                {
                    ltrMdfAccount.Text = op.MdfAccount;
                    ltrMdfDate.Text    = string.Format("{0:yyyy-MM-dd HH:mm:ss}", op.MdfDate.Value);
                }

                btnSave.Visible = true;
            }
        }
        else if (c.qsAct == ConfigFormAction.add)
        {
            int newSortNo = empAuth.GetOperationMaxSortNo(c.qsId) + 10;
            txtSortNo.Text = newSortNo.ToString();

            btnSave.Visible = true;
        }
    }