コード例 #1
0
        public void DataBindEx(bool bIncludeAll)
        {
            BLL.T_SystemInfo_BLL sysBLL = new T_SystemInfo_BLL();
            List<T_SystemInfo_MDL> sysList = sysBLL.GetModelList(" CurrentType='118' AND IsShow<>0");
            
            for (int i1 = 0; i1 < sysList.Count; i1++)
            {//颜色显示
                //sysList[i1].SystemInfoName = "<span style=\"background-color:" + sysList[i1].SystemInfoCode + "\">" + sysList[i1].SystemInfoName + "<span>";

                sysList[i1].SystemInfoName = "<span><span style=\"background-color:" + sysList[i1].SystemInfoCode + ";width:20px\">&nbsp;&nbsp;</span>" + sysList[i1].SystemInfoName + "</span>";

                //<div style="width: 8px; background-color: #00FF00; float: left;" />
            }

            if (bIncludeAll == true)
            {
                T_SystemInfo_MDL obj = new T_SystemInfo_MDL();
                obj.SystemInfoID = 0;
                //obj.SystemInfoCode = "";
                obj.SystemInfoName = "全部";
                sysList.Insert(0, obj);
            }

            RadioButtonList1.DataTextField = "SystemInfoName";
            RadioButtonList1.DataValueField = "SubType";
            RadioButtonList1.DataSource = sysList;
            RadioButtonList1.DataBind();
            if (sysList.Count > 0)
            {
                RadioButtonList1.Items[0].Selected = true;
            }           
        }
コード例 #2
0
        protected void repNewsList_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                T_SystemInfo_MDL view = e.Item.DataItem as T_SystemInfo_MDL;
                CheckBox         chkSystemInfoCode = e.Item.FindControl("chkSystemInfoCode") as CheckBox;
                chkSystemInfoCode.InputAttributes.Add("value", view.SystemInfoCode);

                ctrlTextBoxEx txtOrderIndex = e.Item.FindControl("txtOrderIndex") as ctrlTextBoxEx;
                HiddenField   txtHidSid     = e.Item.FindControl("txtHidSid") as HiddenField;

                if (DNTRequest.GetQueryInt("SignatureTypeCount", 0) > 0)//已做过签章设置的 ,重新绑定
                {
                    List <T_FileList_SignatureTmp_MDL> ltSignatureTmp  = ViewState["ltSignatureTmp"] as List <T_FileList_SignatureTmp_MDL>;
                    T_FileList_SignatureTmp_MDL        SignatureTmpMdl = ltSignatureTmp.Where(r => r.SignatureType.ToLower() == view.SystemInfoCode.ToLower()).FirstOrDefault();
                    if (SignatureTmpMdl != null)
                    {
                        chkSystemInfoCode.Checked = true;
                        txtOrderIndex.Text        = ConvertEx.ToInt(SignatureTmpMdl.OrderIndex).ToString("D2");
                        txtHidSid.Value           = SignatureTmpMdl.SID.ToString();
                    }
                }
                else
                {
                    txtHidSid.Value = "";
                }
            }
        }
コード例 #3
0
        public void DataBindEx(string showRegion)
        {
            //Leo showRegion 1:基本类别,2,扩展类别 0全部
            //取表s_archive_form,著录单类别
            List <T_SystemInfo_MDL> archiveformlist = new List <T_SystemInfo_MDL>();

            archiveformlist = (new T_SystemInfo_BLL()).GetModelList("CurrentType='Archive_Form'");
            ddlArchiveFormType.DataTextField  = "SystemInfoName"; //archivename
            ddlArchiveFormType.DataValueField = "SystemInfoCode"; //archive_form_no
            if (showRegion == "0")
            {
                T_SystemInfo_MDL mdl = new T_SystemInfo_MDL();
                mdl.SystemInfoCode = "";
                mdl.SystemInfoName = "全部";
                archiveformlist.Insert(0, mdl);
            }
            //else if (showRegion=="2")
            //{
            //    T_SystemInfo_MDL mdl = new T_SystemInfo_MDL();
            //    mdl.SystemInfoCode = "4";
            //    mdl.SystemInfoName = "管线类别";
            //    archiveformlist.Insert(archiveformlist.Count, mdl);
            //}

            ddlArchiveFormType.DataSource = archiveformlist;
            ddlArchiveFormType.DataBind();
        }
コード例 #4
0
        /// <summary>
        /// 返回工程类型字典ID
        /// </summary>
        /// <param name="projectType">工程类型字典CODE</param>
        /// <returns></returns>
        public static string GetFileTypeForProjectTypeId(string SystemInfoID)
        {
            T_SystemInfo_BLL sysBLL = new T_SystemInfo_BLL();
            T_SystemInfo_MDL sysMDL = sysBLL.GetModel(ConvertEx.ToInt(SystemInfoID));

            if (sysMDL != null)
            {
                return(sysMDL.SystemInfoCode);
            }
            else
            {
                return(SystemInfoID);
            }
        }
コード例 #5
0
        void BindGrid()
        {
            _CompanyID = Common.ConvertEx.ToInt(Common.DNTRequest.GetString("CompanyID"));
            T_Company_MDL    objCompany    = (new T_Company_BLL()).GetModel(_CompanyID);
            T_SystemInfo_MDL objSystemInfo = (new T_SystemInfo_BLL()).GetModel(objCompany.CompanyType);

            T_Other_BLL otherBLL = new T_Other_BLL();
            DataSet     ds       = otherBLL.GetCompanySignet(_CompanyID, objSystemInfo.SystemInfoCode);

            List <GridExPara> collist = new List <GridExPara>();

            GridExPara p11 = new GridExPara();

            p11.FieldName = "AttachID";
            p11.bShow     = false;
            collist.Add(p11);

            GridExPara p1 = new GridExPara();

            p1.FieldName = "SystemInfoName";
            collist.Add(p1);

            GridExPara p2 = new GridExPara();

            p2.FieldName = "SubType";
            collist.Add(p2);

            GridExPara p3 = new GridExPara();

            p3.FieldName = "AttachPath";
            p3.iType     = GridExPara.CtrlType.Image;
            p3.iLength   = 120;
            collist.Add(p3);

            GridExPara p99 = new GridExPara();

            p99.FieldName = "";
            p99.iType     = GridExPara.CtrlType.FileUpload;
            collist.Add(p99);
            //ctrlGridEx1.PageCount = Common.ConvertEx.ToInt(Common.Session.GetSession("PageCount"));
            ctrlGridEx1.InitGrid("SystemInfoID", collist, ds, "", false, false, "");
        }
コード例 #6
0
        public void DataBindEx(int UnderMyParentID, bool bIncludeAll, bool isshowjs = false)
        {
            string strwhere = " 1=1 ";

            if (_currentType != "")
            {
                strwhere += " AND currenttype='" + _currentType + "'";
            }

            //strwhere += " AND ParentID<=" + UnderMyParentID;
            strwhere += " AND ParentID>=" + UnderMyParentID;
            if (isshowjs)
            {
                strwhere += " AND SystemInfoCode<> 'JSCompanyInfo' ";
            }
            List <T_SystemInfo_MDL> systeminfolist = new List <T_SystemInfo_MDL>();

            systeminfolist = (new T_SystemInfo_BLL()).GetModelList(strwhere);

            if (bIncludeAll == true)
            {
                T_SystemInfo_MDL newMDL = new T_SystemInfo_MDL();
                newMDL.SystemInfoName = "全部";
                newMDL.SystemInfoID   = 0;
                systeminfolist.Insert(0, newMDL);
            }

            ddlSystemInfo.DataTextField = "systeminfoname";

            if (DataValueField == string.Empty)
            {
                ddlSystemInfo.DataValueField = "systeminfoid";
            }
            else
            {
                ddlSystemInfo.DataValueField = _DataValueField;
            }

            ddlSystemInfo.DataSource = systeminfolist;
            ddlSystemInfo.DataBind();
        }
コード例 #7
0
        public void DataBindEx(bool bIncludeAll, string NotIncludeString, bool flag = false)
        {
            string strwhere = " 1=1 ";

            if (_currentType != "")
            {
                strwhere += " AND currenttype='" + _currentType + "'";
            }
            if (NotIncludeString != "")
            {
                strwhere += " AND SystemInfoCode not in(" + NotIncludeString + ")";
            }

            List <T_SystemInfo_MDL> systeminfolist = new List <T_SystemInfo_MDL>();

            systeminfolist = (new T_SystemInfo_BLL()).GetModelList(strwhere);
            if (bIncludeAll == true)
            {
                T_SystemInfo_MDL newMDL = new T_SystemInfo_MDL();
                newMDL.SystemInfoName = "全部";
                newMDL.SystemInfoID   = 0;
                systeminfolist.Insert(0, newMDL);
            }
            ddlSystemInfo.DataTextField = "systeminfoname";
            if (DataValueField == string.Empty)
            {
                ddlSystemInfo.DataValueField = "systeminfoid";
            }
            else
            {
                ddlSystemInfo.DataValueField = _DataValueField;
            }

            ddlSystemInfo.DataSource = systeminfolist;
            ddlSystemInfo.DataBind();

            if (flag)
            {
                ddlSystemInfo.Items.Add(new ListItem("道路和桥梁", "207,208"));
            }
        }
コード例 #8
0
        /// <summary>
        /// 返回字典
        /// </summary>
        /// <param name="bIncludeAll">是否有--全部 选项</param>
        /// <param name="NotIncludeString">KEY= SystemInfoCode </param>
        public void DataBindEx(bool bIncludeAll, List <string> NotIncludeString)
        {
            string strwhere = " 1=1 ";

            if (_currentType != "")
            {
                strwhere += " AND currenttype='" + _currentType + "'";
            }
            if (NotIncludeString.Count > 0)
            {
                foreach (string SystemInfoCode in NotIncludeString)
                {
                    strwhere += " AND SystemInfoCode<>'" + SystemInfoCode + "'";
                }
            }

            List <T_SystemInfo_MDL> systeminfolist = new List <T_SystemInfo_MDL>();

            systeminfolist = (new T_SystemInfo_BLL()).GetModelList(strwhere);
            if (bIncludeAll == true)
            {
                T_SystemInfo_MDL newMDL = new T_SystemInfo_MDL();
                newMDL.SystemInfoName = "全部";
                newMDL.SystemInfoID   = 0;
                systeminfolist.Insert(0, newMDL);
            }
            ddlSystemInfo.DataTextField = "systeminfoname";

            if (DataValueField == string.Empty)
            {
                ddlSystemInfo.DataValueField = "systeminfoid";
            }
            else
            {
                ddlSystemInfo.DataValueField = _DataValueField;
            }

            ddlSystemInfo.DataSource = systeminfolist;
            ddlSystemInfo.DataBind();
        }