コード例 #1
0
 /// <summary>
 /// 将Model 值赋给控件
 /// </summary>
 /// <param name="tSingleProjectID">工程ID</param>
 public void DataBindEx(int tSingleProjectID)
 {
     jglx.DataValueField = "systeminfoname";
     jglx.DataBindEx();
     if (tSingleProjectID > 0)
     {
         List <a_single_project_MDL> projectmdl = new a_single_project_BLL().GetModelList("SingleProjectID=" + tSingleProjectID);
         if (projectmdl.Count > 0)
         {
             Comm.SetValueToPage(projectmdl[0], tabledetail);
         }
     }
 }
コード例 #2
0
        /// <summary>
        /// 获取房屋专业记载MODEL
        /// </summary>
        /// <param name="tSingleProjectID">工程ID</param>
        /// <returns></returns>
        public a_single_project_MDL GetModule(int tSingleProjectID)
        {
            a_single_project_MDL mdl = new a_single_project_MDL();

            if (tSingleProjectID > 0)
            {
                List <a_single_project_MDL> projectmdl = new a_single_project_BLL().GetModelList("SingleProjectID=" + tSingleProjectID);
                if (projectmdl.Count > 0)
                {
                    BLL.a_single_project_BLL bll = new a_single_project_BLL();
                    mdl = bll.GetModel(projectmdl[0].SingleProjectID);
                }
            }
            object obj = Comm.GetValueToObject(mdl, tabledetail);

            return((a_single_project_MDL)obj);
        }