Example #1
0
        /// <summary>
        /// girdview绑定行事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvTaskList_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                FSCheckBox   cbSelect = (FSCheckBox)e.Row.FindControl("cbSelect");
                FSLinkButton lbtnCopy = (FSLinkButton)e.Row.FindControl("lbtnCopy");
                FSLabel      lblID    = (FSLabel)e.Row.FindControl("lblID");

                GetCheckItemID();

                if (String.IsNullOrEmpty(lblID.Text.Trim()) || SysConvert.ToInt32(lblID.Text.Trim()) <= 0)
                {
                    cbSelect.Visible = false;
                    lbtnCopy.Visible = true;
                }
                else
                {
                    cbSelect.Visible = true;
                    lbtnCopy.Visible = false;
                    if (txtID.Text == lblID.Text)
                    {
                        cbSelect.Checked = true;
                    }
                }
                DataRowView dr = e.Row.DataItem as DataRowView;
                ListUIBase  lu = new ListUIBase();
                lu.IndicateNoData(dr["MARK"], e.Row);
            }
        }
Example #2
0
        protected void gvProgramFileList_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowType != DataControlRowType.Footer && e.Row.RowType != DataControlRowType.Header)
            {
                FSLinkButton lnkbtnRestart = (FSLinkButton)e.Row.Cells[RESTART].FindControl("lnkbtnRestart");
                if (!B_PF.IsExistProgramFile(e.Row.Cells[KEY_ID].Text.ToString()) && !string.IsNullOrEmpty(e.Row.Cells[EDITION].Text.Replace("&nbsp;", "").Trim()))
                {
                    lnkbtnRestart.Visible = e.Row.Cells[ARCHIVESTATE].Text.Equals(ConstString.ProgramFile.PROGRAM_ARCHIVED) ||
                                            e.Row.Cells[ARCHIVESTATE].Text.Equals(ConstString.ProgramFile.PROGRAM_LOGOUT) ? false : true;

                    if (!string.IsNullOrEmpty(e.Row.Cells[FILES].Text.Replace("&nbsp;", "").ToString()))
                    {
                        lnkbtnRestart.Visible       = true;
                        lnkbtnRestart.Text          = "附件下载";
                        lnkbtnRestart.OnClientClick = "OpenDetailDialog(" + e.Row.Cells[KEY_ID].Text + ");";
                    }
                }//流程表中不存在程序文件并且版次不为空(未发起流程)
                //else if (!string.IsNullOrEmpty(e.Row.Cells[Files].Text.Replace("&nbsp;", "").ToString()))
                //{
                //    lnkbtnRestart.Visible = true;
                //    lnkbtnRestart.Text = "附件下载";
                //    lnkbtnRestart.OnClientClick = "OpenDetailDialog(" + e.Row.Cells[ID].Text + ");";
                //}
                else
                {
                    if (!string.IsNullOrEmpty(e.Row.Cells[FILES].Text.Replace("&nbsp;", "").ToString()))
                    {
                        lnkbtnRestart.Visible       = true;
                        lnkbtnRestart.Text          = "附件下载";
                        lnkbtnRestart.OnClientClick = "OpenDetailDialog(" + e.Row.Cells[KEY_ID].Text + ");";
                    }
                    else
                    {
                        lnkbtnRestart.Visible = false;
                    }

                    LinkButton lnkbtnCancel = e.Row.Cells[RESTART].FindControl("lnkbtnCancel") as LinkButton;

                    //已发起流程并且程序状态为“未完成”则显示撤销流程,否则不可撤销
                    if (e.Row.Cells[ARCHIVESTATE].Text != ConstString.ProgramFile.PROGRAM_ARCHIVED &&
                        string.IsNullOrEmpty(Server.HtmlDecode(e.Row.Cells[ARCHIVESTATE].Text).Trim()) == false)
                    {
                        lnkbtnCancel.Visible = true;
                    }
                    else
                    {
                        lnkbtnCancel.Visible = false;
                    }
                }
            }
        }