亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? projectcustomfields.ascx.cs

?? BugNET is an issue tracking and project issue management solution built using the ASP.NET web applic
?? CS
?? 第 1 頁 / 共 2 頁
字號:
namespace BugNET.Administration.Projects.UserControls
{
    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using BugNET.BusinessLogicLayer;
    using BugNET.UserInterfaceLayer;

    /// <summary>
    /// 
    /// </summary>
    public partial class ProjectCustomFields : System.Web.UI.UserControl, IEditProjectControl
    {
        protected System.Web.UI.WebControls.DataGrid grdSelectionValues;

        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        #region Web Form Designer generated code
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init"></see> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"></see> object that contains the event data.</param>
        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.
            //
            InitializeComponent();
            base.OnInit(e);
        }

        /// <summary>
        ///		Required method for Designer support - do not modify
        ///		the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.grdCustomFields.DeleteCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.DeleteCustomField);
            this.grdCustomFields.ItemDataBound += new System.Web.UI.WebControls.DataGridItemEventHandler(this.grdCustomFields_ItemDataBound);
            this.grdCustomFields.ItemCommand += new DataGridCommandEventHandler(grdCustomFields_ItemCommand);
        }

        /// <summary>
        /// Handles the ItemCreated event of the grdCustomFields control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Web.UI.WebControls.DataGridItemEventArgs"/> instance containing the event data.</param>
        protected void grdCustomFields_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
        {
            grdSelectionValues = (DataGrid)e.Item.FindControl("grdSelectionValues");
            if (null != grdSelectionValues)
            {
                grdSelectionValues.ItemDataBound += new DataGridItemEventHandler(this.grdSelectionValues_ItemDataBound);
                grdSelectionValues.ItemCommand += new DataGridCommandEventHandler(this.grdSelectionValues_ItemCommand);
                grdSelectionValues.CancelCommand += new DataGridCommandEventHandler(this.grdSelectionValues_CancelCommand);
                grdSelectionValues.EditCommand += new DataGridCommandEventHandler(this.grdSelectionValues_Edit);
                grdSelectionValues.UpdateCommand += new DataGridCommandEventHandler(this.grdSelectionValues_Update);
            }
        }

        /// <summary>
        /// Handles the ItemCommand event of the grdCustomFields control.
        /// </summary>
        /// <param name="source">The source of the event.</param>
        /// <param name="e">The <see cref="System.Web.UI.WebControls.DataGridCommandEventArgs"/> instance containing the event data.</param>
        protected void grdCustomFields_ItemCommand(object source, DataGridCommandEventArgs e)
        {
            //switch(e.CommandName)
            //{
            //    case "Expand":
            //        PlaceHolder ChildRows = (PlaceHolder)e.Item.Cells[grdCustomFields.Columns.Count - 1].FindControl("ChildRows");
                    
            //        ImageButton imgbtnExpand = (ImageButton)e.Item.Cells[0].FindControl("imgbtnExpand");

            //        if (imgbtnExpand.ImageUrl == "~/images/plus.gif")
            //        {
            //            imgbtnExpand.ImageUrl = "~/images/minus.gif";
            //            ChildRows.Visible = true;
            //        }
            //        else
            //        {
            //            imgbtnExpand.ImageUrl = "~/images/plus.gif";
            //            ChildRows.Visible = false;
            //        }

            //        break;
            //}
        }

        #endregion

        private int _ProjectId = -1;


        /// <summary>
        /// Gets or sets the project id.
        /// </summary>
        /// <value>The project id.</value>
        public int ProjectId
        {
            get { return _ProjectId; }
            set { _ProjectId = value; }
        }


        /// <summary>
        /// Updates this instance.
        /// </summary>
        /// <returns></returns>
        public bool Update()
        {
            return true;
        }

        /// <summary>
        /// Initializes this instance.
        /// </summary>
        public void Initialize()
        {
            dropDataType.DataSource = Enum.GetNames(typeof(ValidationDataType));
            dropDataType.DataBind();
            BindCustomFields();
        }

        /// <summary>
        /// Binds the custom fields.
        /// </summary>
        void BindCustomFields()
        {
            //check if we are editing the subgrid - needed to fire updatecommand on the nested grid.
            if (ViewState["EditingSubGrid"] == null)
            {
                grdCustomFields.DataSource = CustomField.GetCustomFieldsByProjectId(ProjectId);
                grdCustomFields.DataKeyField = "Id";
                grdCustomFields.DataBind();

                if (grdCustomFields.Items.Count == 0)
                    grdCustomFields.Visible = false;
                else
                    grdCustomFields.Visible = true;
            }
        }


        /// <summary>
        /// Handles the ItemDataBound event of the grdSelectionValues control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Web.UI.WebControls.DataGridItemEventArgs"/> instance containing the event data.</param>
        protected void grdSelectionValues_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
        {
            Control container = e.Item;
            ListItemType itemType = e.Item.ItemType;

            if (itemType == ListItemType.Item || itemType == ListItemType.AlternatingItem)
            {
                if (e.Item.DataItem == null)
                {
                    return;
                }

                System.Web.UI.WebControls.Button btnDelete;
                btnDelete = (System.Web.UI.WebControls.Button)e.Item.FindControl("btnDelete");
                if (btnDelete != null)
                {
                    btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?')");
                }
            }
            else if (itemType == ListItemType.Footer)
            {
                if (this.ViewState["CustomFieldId"] != null)
                {
                    Button btnAddSelectionValue = (Button)e.Item.FindControl("btnAddSelectionValue");

                    if (btnAddSelectionValue != null)
                    {
                        btnAddSelectionValue.CommandArgument =this.ViewState["CustomFieldId"].ToString();
                    }
                }
                this.ViewState["CustomFieldId"] = null;
            }
           
        }

        /// <summary>
        /// Handles the Edit event of the dg2 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Web.UI.WebControls.DataGridCommandEventArgs"/> instance containing the event data.</param>
        protected void grdSelectionValues_Edit(object sender, DataGridCommandEventArgs e)
        {
            lblError.Text = String.Empty;
            Label lblCustomFieldId = (Label)e.Item.FindControl("lblCustomFieldId");

            if (lblCustomFieldId != null)
            {
                foreach (DataGridItem item in grdCustomFields.Items)
                {
                    DataGrid grdSelectionValues = (DataGrid)item.FindControl("grdSelectionValues");
                    grdSelectionValues.ShowFooter = false;
                    grdSelectionValues.EditItemIndex = -1;
                    if (lblCustomFieldId.Text == item.Cells[0].Text)
                    {
                        if (null != grdSelectionValues)
                        {
                            grdSelectionValues.EditItemIndex = e.Item.ItemIndex;
                            //set a property to say we are editing the subgrid,
                            //rebinding the master grid will not fire the update command
                            ViewState["EditingSubGrid"] = true;
                        }
                    }
                    
                }
            }
       
            BindCustomFieldSelections();

        }

        /// <summary>
        /// Handles the ItemCommand event of the grdSelectionValues control.
        /// </summary>
        /// <param name="source">The source of the event.</param>
        /// <param name="e">The <see cref="System.Web.UI.WebControls.DataGridCommandEventArgs"/> instance containing the event data.</param>
        protected void grdSelectionValues_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
        {
            CustomFieldSelection  cfs;
            int itemIndex = e.Item.ItemIndex;
            int itemId;
            switch (e.CommandName)
            {
                case "up":
                    //move row up
                    if (itemIndex == 0)
                        return;
                    itemId = Convert.ToInt32(e.Item.Cells[0].Text);
                    cfs = CustomFieldSelection.GetCustomFieldSelectionById(itemId);
                    cfs.SortOrder -= 1;
                    cfs.Save();
                    break;
                case "down":
                    //move row down
                    if (itemIndex == ((DataGrid)source).Items.Count - 1)
                        return;
                    itemId = Convert.ToInt32(e.Item.Cells[0].Text);
                    cfs = CustomFieldSelection.GetCustomFieldSelectionById(itemId);
                    cfs.SortOrder += 1;
                    cfs.Save();
                    break;
                case "add":
                    TextBox txtAddSelectionName = (TextBox)e.Item.FindControl("txtAddSelectionName");
                    TextBox txtAddSelectionValue = (TextBox)e.Item.FindControl("txtAddSelectionValue");
                    if (txtAddSelectionName.Text.Trim() == String.Empty)
                    {
                        lblError.Text = "Selection name can not be blank";
                        return;
                    }
                    if (txtAddSelectionValue.Text.Trim() == String.Empty)
                    {
                        lblError.Text = "Selection value can not be blank";
                        return;
                    }

                     cfs = new CustomFieldSelection(Convert.ToInt32(e.CommandArgument),
                        txtAddSelectionName.Text.Trim(), 
                        txtAddSelectionValue.Text.Trim());
                    cfs.Save();                  
                    break;
            }
            BindCustomFieldSelections();
        }

        /// <summary>
        /// Handles the CancelCommand event of the grdSelectionValues control.
        /// </summary>
        /// <param name="source">The source of the event.</param>
        /// <param name="e">The <see cref="System.Web.UI.WebControls.DataGridCommandEventArgs"/> instance containing the event data.</param>
        protected void grdSelectionValues_CancelCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
        {
            lblError.Text = String.Empty;
            foreach (DataGridItem item in grdCustomFields.Items)
            {
                DataGrid grdSelectionValues = (DataGrid)item.FindControl("grdSelectionValues");
                if (null != grdSelectionValues)
                {
                    grdSelectionValues.ShowFooter = true;
                    grdSelectionValues.EditItemIndex = -1;
                }
            }
            ViewState["EditingSubGrid"] = null;
            BindCustomFieldSelections();
            BindCustomFields();
        }

        /// <summary>
        /// Handles the UpdateCommand event of the grdSelectionValues control.
        /// </summary>
        /// <param name="source">The source of the event.</param>
        /// <param name="e">The <see cref="System.Web.UI.WebControls.DataGridCommandEventArgs"/> instance containing the event data.</param>
        protected void grdSelectionValues_Update(object source, DataGridCommandEventArgs e)
        {
            lblError.Text = String.Empty;
            if (ListItemType.EditItem == e.Item.ItemType)
            {
                TextBox txtName =  ((TextBox)e.Item.Cells[2].Controls[0]);
                TextBox txtValue =  ((TextBox)e.Item.Cells[3].Controls[0]);
                if (txtName != null && txtValue != null)
                {
                    if (txtName.Text.Trim() == String.Empty)
                    {
                        lblError.Text = "Selection name can not be blank";
                        return;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品成人免费| 人人爽香蕉精品| 亚洲色图制服诱惑 | 精品久久久影院| 欧美日韩国产经典色站一区二区三区 | 一区二区三区电影在线播| 国产精品久久久久aaaa樱花| 国产欧美精品国产国产专区| 日本一区二区三区四区| 国产午夜精品久久久久久免费视| 国产亚洲欧洲997久久综合| 久久久精品天堂| 欧美高清在线视频| 日韩一区在线看| 亚洲精品视频免费观看| 一区二区三区免费| 日韩精品一二区| 精品一区二区三区在线播放| 国内久久婷婷综合| 国产成人综合在线| 99久久精品免费看| 色婷婷综合激情| 综合色中文字幕| 亚洲九九爱视频| 亚洲国产成人porn| 久久99精品国产.久久久久| 国产成人精品亚洲午夜麻豆| 色一区在线观看| 欧美二区在线观看| 久久九九99视频| 亚洲欧美日韩综合aⅴ视频| 亚洲aⅴ怡春院| 国产精品一区二区免费不卡| www.66久久| 欧美日韩精品专区| 精品第一国产综合精品aⅴ| 国产精品丝袜黑色高跟| 亚洲一级二级在线| 国产一区二区在线观看视频| 99国产精品久久久| 91精品国产aⅴ一区二区| 国产婷婷色一区二区三区四区| 自拍偷拍亚洲欧美日韩| 日韩国产在线一| 国产成人精品一区二区三区网站观看| 91国内精品野花午夜精品| 欧美一区二区精品久久911| 国产精品美日韩| 天天亚洲美女在线视频| 国产成人精品三级| 欧美伦理影视网| 中文字幕精品一区二区三区精品| 亚洲综合网站在线观看| 国产综合一区二区| 欧美日韩久久一区| 国产精品久久久久久亚洲毛片 | 亚洲精品videosex极品| 美腿丝袜亚洲三区| 91在线国内视频| 精品99999| 午夜精品久久久久影视| 成人激情电影免费在线观看| 欧美一级免费大片| 亚洲精品福利视频网站| 国产精品一区二区久久不卡| 欧美伦理电影网| 亚洲人精品午夜| 国产精品一区二区不卡| 日韩欧美在线不卡| 亚洲综合av网| 99riav久久精品riav| 精品粉嫩超白一线天av| 香蕉久久夜色精品国产使用方法| www.日韩精品| 国产午夜精品一区二区三区视频 | 美女在线一区二区| 在线看不卡av| 日韩一区在线免费观看| 国产成人福利片| 精品少妇一区二区| 日韩电影在线观看电影| 色综合久久综合网欧美综合网| 国产亚洲女人久久久久毛片| 蜜桃一区二区三区四区| 欧美另类久久久品| 亚洲一区二区精品3399| 99国产精品视频免费观看| 亚洲国产成人私人影院tom| 精品综合免费视频观看| 欧美一区二区三区免费大片| 亚洲国产欧美日韩另类综合 | 欧美日韩一区小说| 亚洲美女在线一区| caoporn国产精品| 欧美国产精品中文字幕| 国产 日韩 欧美大片| 久久在线免费观看| 国产一区二区三区精品视频| 欧美成人三级在线| 久久99国产乱子伦精品免费| 日韩视频免费观看高清完整版在线观看 | 国产偷国产偷精品高清尤物| 国产一区二区精品久久| 久久久国际精品| 国产麻豆午夜三级精品| 久久久高清一区二区三区| 国内不卡的二区三区中文字幕| 日韩亚洲欧美在线| 久久精品国产一区二区| 欧美成人r级一区二区三区| 久久国产精品99久久人人澡| 欧美大片免费久久精品三p| 美女久久久精品| 精品国产99国产精品| 精品国产免费久久| 国产精品亚洲一区二区三区妖精| 久久人人爽爽爽人久久久| 国产传媒久久文化传媒| 亚洲欧美中日韩| 在线视频综合导航| 丝袜美腿亚洲色图| 精品日韩在线一区| 风间由美性色一区二区三区| 中文字幕一区在线| 欧美性猛交xxxx乱大交退制版| 亚洲福利一二三区| 精品福利二区三区| www.久久精品| 亚洲成av人片在线观看无码| 欧美一区二区在线播放| 国产美女主播视频一区| 中文字幕中文在线不卡住| 欧美中文字幕一区二区三区亚洲| 全国精品久久少妇| 国产欧美日韩在线视频| 日本高清不卡一区| 久久精品国产第一区二区三区| 国产色一区二区| 在线观看中文字幕不卡| 蜜芽一区二区三区| 欧美国产日韩a欧美在线观看| 色综合av在线| 美国毛片一区二区| 中文字幕在线观看一区| 欧美一区二区三区喷汁尤物| 国产成人精品三级| 亚洲不卡av一区二区三区| 2023国产精品自拍| 91福利社在线观看| 精品一区二区精品| 一卡二卡三卡日韩欧美| 精品捆绑美女sm三区| 91麻豆福利精品推荐| 免费观看在线色综合| 中文字幕在线不卡一区二区三区| 欧美一区二区观看视频| 99这里都是精品| 蜜臀a∨国产成人精品| 亚洲精品免费在线播放| 精品国产91久久久久久久妲己| 色婷婷狠狠综合| 国产成人aaa| 石原莉奈在线亚洲二区| 国产精品久久久久久亚洲毛片 | 亚洲超丰满肉感bbw| 中文字幕+乱码+中文字幕一区| 欧美群妇大交群中文字幕| 成人美女在线观看| 久国产精品韩国三级视频| 亚洲一区二区在线免费看| 欧美国产欧美综合| 精品国产91亚洲一区二区三区婷婷| 欧美综合一区二区三区| 成人av网站在线观看免费| 精品一区二区三区免费观看| 亚洲福中文字幕伊人影院| 最新久久zyz资源站| 国产午夜精品福利| 精品国产乱码久久久久久闺蜜| 欧美精品在线观看播放| 色综合色狠狠综合色| 福利一区二区在线观看| 久久电影国产免费久久电影| 五月婷婷欧美视频| 一区二区在线观看免费| 国产精品国产三级国产普通话99| 精品国产精品一区二区夜夜嗨| 欧美久久一二区| 在线观看日韩毛片| 99re66热这里只有精品3直播 | 成人av先锋影音| 国产成人精品影院| 国产精品77777| 狠狠色综合日日| 激情文学综合网| 美女视频网站久久| 久久国产精品一区二区| 麻豆91在线看| 秋霞成人午夜伦在线观看| 午夜国产精品影院在线观看|