コード例 #1
0
 /// <summary>
 /// 获得明细表校验字符串
 /// </summary>
 /// <param name="p_FormGridID"></param>
 /// <returns></returns>
 public string[] GetHTCheckDataField(int p_FormGridID)
 {
     string[] outStrA = new string[] { };
     if (WinUIParamSet.GetIntValueByID(8020) == 1)//系统编辑表单明细启用配置必输项验证
     {
         string    sql = "SELECT FieldName FROM Sys_FormGridUIDtsAttach WHERE FormGridID=" + p_FormGridID + " AND HeadTypeID=" + this.FormListAID + " AND SubTypeID=" + this.FormListBID;
         DataTable dt  = SysUtils.Fill(sql);
         if (dt.Rows.Count != 0)
         {
             outStrA = new string[dt.Rows.Count];
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 outStrA[i] = dt.Rows[i]["FieldName"].ToString();
             }
         }
     }
     return(outStrA);
 }
コード例 #2
0
        /// <summary>
        /// 通用窗体加载方法,如果不要使用,则重写,一般不要修改
        /// </summary>
        public virtual void IniFormLoadBefore()
        {
            if (_HTDataList.Columns.Count != 0)
            {
                ProcessGrid.BindGridColumn(_HTDataList, this.FormID);                              //绑定列
                ProcessGrid.SetGridColumnUI(_HTDataList, this.FormListAID, this.FormListBID);      //设置列UI
                this.gridViewBaseRowChangedA1 += new gridViewBaseRowChangedA(gridViewRowChanged1); //绑定GridView1事件
                gridViewBindEventA1(_HTDataList);

                _HTDataList.RowCellStyle += new RowCellStyleEventHandler(_HTDataDts_RowCellStyle);

                //_HTDataList.DoubleClick += new EventHandler(btnBrowse_Click);
                _HTDataList.GridControl.DoubleClick += new EventHandler(btnBrowse_Click);
            }

            for (int i = 0; i < _HTDataDtsAttach.Length; i++)
            {
                ProcessGrid.BindGridColumn(_HTDataDtsAttach[i], this.FormID);                         //绑定列
                ProcessGrid.SetGridColumnUI(_HTDataDtsAttach[i], this.FormListAID, this.FormListBID); //设置列UI
                ProcessGrid.SetGridManDefault(_HTDataDtsAttach[i]);
            }
            ProcessGrid.SetGridUIListDefault(_HTDataList);
            if (SysConvert.ToBoolean(WinUIParamSet.GetIntValueByID(8011)))//系统编辑单据列表数据允许复制
            {
                ProcessGrid.SetGridReadOnly(_HTDataList, false);
            }
            else
            {
                ProcessGrid.SetGridReadOnly(_HTDataList, true);
            }

            SetToolButtonVisible();
            if (IsPostBack)
            {
                btnQuery_Click(null, null);
            }
            _HTDataList.GridControl.ContextMenuStrip = cMenuFirst;
            this.ContextMenuStrip = cMenuFirst;
            FCommon.AddDBLog(this.Text, "查询", " ", "");
        }