示例#1
0
        /// <summary>
        /// 数据绑定
        /// </summary>
        protected void BindDate()
        {
            gcqy.DataValueField = "systeminfoname";
            gcqy.DataBindEx();           //工程区域

            AREA_CODE.BindDdlArea(true); //归档移交机构
            ProjectType.DataBindEx();    //工程类别
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SingleProjectID = DNTRequest.GetQueryString("SingleProjectID");
            ProjectType     = DNTRequest.GetQueryString("ProjectType");

            Ajax.Utility.RegisterTypeForAjax(typeof(CompanyReg3_1Edit1));
            MyAddInit();
            if (!IsPostBack)
            {
                AREA_CODE.BindDdlArea(true);                                                //区域
                ctrlCompanyRegBaseInfo3_11.DataBindEx(ConvertEx.ToInt(SingleProjectID));    //工程相关信息
                ctrlCompanyRegBaseInfo3_1Ext1.DataBindEx(ConvertEx.ToInt(SingleProjectID)); //专业记载

                if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.ADD)
                {
                    string js = "document.getElementById('ctl00_Main_ctrlCompanyRegBaseInfo3_11_gcbm').value='自动生成';";
                    ClientScript.RegisterStartupScript(this.GetType(), "IsSuccess", "<script type=\"text/javascript\">" + js + "</script>");

                    ctrlDropDownConstructionProject1.CompanyId = Common.Session.GetSession("CompanyID");//项目信息
                }
                else
                {
                    ctrlDropDownConstructionProject1.enable = false;
                }

                ctrlDropDownConstructionProject1.DataBindEx();
                ctrlArchiveFormType1.DataBindEx();
                ctrlArchiveFormType1.SelectValue = ProjectType;
                ctrlArchiveFormType1.Enabled     = false;

                if (ConvertEx.ToInt(SingleProjectID) > 0)
                {
                    T_SingleProject_MDL spMDL = singleProjectBLL.GetModel(ConvertEx.ToInt(SingleProjectID));
                    if (spMDL != null)
                    {
                        ctrlDropDownConstructionProject1.SelectValue = spMDL.ConstructionProjectID.ToString();
                        ctrlArchiveFormType1.SelectValue             = spMDL.ProjectType;
                    }
                }

                if (!String.IsNullOrWhiteSpace(DNTRequest.GetString("ConstructionID")))
                {
                    ctrlDropDownConstructionProject1.SelectValue = DNTRequest.GetString("ConstructionID");
                }

                if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.VIEW)
                {
                    btnSave.Visible = false;
                }
            }
        }
        public void DataBindEx(int tCompanyID)
        {
            AREA_CODE.BindDdlArea(true);
            if (Common.Session.GetSession("IsCompany") == "true")
            {
                CompanyType.DataBindEx(false, "'ARCHIVE'");
            }
            else
            {
                CompanyType.DataBindEx(false, "");
            }

            if (tCompanyID > 0)
            {
                T_Company_MDL projectmdl = (new T_Company_BLL()).GetModel(tCompanyID);
                Comm.SetValueToPage(projectmdl, tbl_company);
                CompanyCode.Text = projectmdl.CompanyCode.Trim();
                _arecode         = projectmdl.AREA_CODE;
            }
        }