Ejemplo n.º 1
0
 /// <summary>
 /// 初始化附件上传控件(附件控件,Label合同号,索赔类别)
 /// </summary>
 /// <param name="at_control"></param>
 /// <param name="txt"></param>
 /// <param name="sp_type"></param>
 public static void InitUploadControls(ZCZJ_DPF.Controls.UploadAttachments at_control, System.Web.UI.WebControls.Label txt, int sp_type)
 {
     at_control.at_htbh = txt.Text;
     if (at_control.at_htbh == "")
     {
         at_control.Visible = false;//如何合同编号不存在则无法显示Upload控件
     }
     else
     {
         at_control.Visible = true;
         at_control.at_sp   = sp_type; //0:业主;1、2:重机索赔;3:分包商
         at_control.at_type = 1;
         at_control.InitData();        //重新绑定Upload数据
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 根据操作状态设置附件上传控件(上传、删除)
        /// </summary>
        /// <param name="at"></param>
        /// <param name="op"></param>
        public static void UploadControlSet(ZCZJ_DPF.Controls.UploadAttachments at, string op)
        {
            if (op == "View")
            {
                at.FindControl("btnUpload").Visible = false;
                GridView gridView1 = (GridView)at.FindControl("GridView1");
                gridView1.Columns[4].Visible = false;

                //查看时隐藏文件描述行和上传按钮行,只显示文件信息行
                HtmlTableRow tr_wjms   = (HtmlTableRow)at.FindControl("tr_WJMS");
                HtmlTableRow tr_upload = (HtmlTableRow)at.FindControl("tr_Upload");
                tr_wjms.Visible   = false;
                tr_upload.Visible = false;
            }
        }