Example #1
0
 /// <summary>构造函数
 ///
 /// </summary>
 public FrmBseDictionaryTreeQuery()
 {
     InitializeComponent();
     m_BseDictionaryDAL = GlobalHelp.GetResolve <IBseDAL <BseDictionary> >();
     this.dataTreeListView.RootKeyValue = 0u;
     DoInitData();
 }
 /// <summary>构造函数
 ///
 /// </summary>
 public FrmBseProjectSimpleQuery()
 {
     InitializeComponent();
     grdData.ShowCellToolTips    = false;
     grdData.AutoGenerateColumns = false;
     m_BseProjectDAL             = GlobalHelp.GetResolve <IBseDAL <BseProject> >();
     grdData.RowsAdded          += this.grdData_RowsAdded;
     grdData.RowPostPaint       += grdData_RowPostPaint;
     grdData.CellMouseEnter     += this.grdData_CellMouseEnter;
     grdData.CellMouseLeave     += this.grdData_CellMouseLeave;
     toolTip.Draw += this.toolTip_Draw;
     DoInitData();
 }
 /// <summary>构造函数
 ///
 /// </summary>
 /// <param name=model" BseProject">对象</param>
 /// <param name="lstBseProject">对象集合</param>
 public FrmBseProjectSimpleDialog(BseProject modelBseProject, List <BseProject> lstBseProject)
 {
     InitializeComponent();
     DoInitData();
     m_lstBseProject            = lstBseProject ?? new List <BseProject>();
     m_BseProjectDAL            = GlobalHelp.GetResolve <IBseDAL <BseProject> >();
     this.dataNavigator.Visible = false;
     if (modelBseProject != null)
     {
         this.dataNavigator.Visible = true;
         m_BseProject = modelBseProject;
         this.dataNavigator.ListInfo = lstBseProject.Select(t => t.ProjectID.ToString()).ToList();
         m_strIndex = lstBseProject.FindIndex(t => t.ProjectID == m_BseProject.ProjectID).ToString();
         this.dataNavigator.CurrentIndex = int.Parse(m_strIndex);
     }
 }
        /// <summary>构造函数
        ///
        /// </summary>
        public FrmBseProjectMasterDetailQuery()
        {
            InitializeComponent();
            cboFilterType.SelectedIndex = 2;
            m_BseProjectDAL             = GlobalHelp.GetResolve <IBseDAL <BseProject> >();
            m_BseProjectVersionDAL      = GlobalHelp.GetResolve <IBseDAL <BseProjectVersion> >();
            m_lstBseProject             = new List <BseProject>();
            DoInitData();
            DoInitMasterGridSource();
            DoInitDetailGridSource();

            #region 主表列表绑定字段

            this.gridmrzProjectID.AspectGetter  = x => ((BseProject)x).ProjectID;
            this.gridmrzCategory.AspectGetter   = delegate(object x) { return(GetMasterCategory(((BseProject)x).Category)); };
            this.gridmrzName.AspectGetter       = x => ((BseProject)x).Name;
            this.gridmrzStatus.AspectGetter     = x => ((BseProject)x).Status;
            this.gridmrzOnLevel.AspectGetter    = delegate(object x) { return(GetMasterOnLevel(((BseProject)x).OnLevel)); };
            this.gridmrzRemark.AspectGetter     = x => ((BseProject)x).Remark;
            this.gridmrzSort.AspectGetter       = x => ((BseProject)x).Sort;
            this.gridmrzDeptId.AspectGetter     = x => ((BseProject)x).DeptId;
            this.gridmrzCompanyID.AspectGetter  = x => ((BseProject)x).CompanyID;
            this.gridmrzCreateDate.AspectGetter = x => ((BseProject)x).CreateDate;
            this.gridmrzCreateUser.AspectGetter = x => ((BseProject)x).CreateUser;
            this.gridmrzEditDate.AspectGetter   = x => ((BseProject)x).EditDate;
            this.gridmrzEditUser.AspectGetter   = x => ((BseProject)x).EditUser;

            #endregion 主表列表绑定字段

            #region 明细表列表绑定字段

            this.gridDetailmrzVersionID.AspectGetter  = x => ((BseProjectVersion)x).VersionID;
            this.gridDetailmrzProjectID.AspectGetter  = delegate(object x) { return(GetDetailProjectID(((BseProjectVersion)x).ProjectID)); };
            this.gridDetailmrzName.AspectGetter       = x => ((BseProjectVersion)x).Name;
            this.gridDetailmrzStatus.AspectGetter     = x => ((BseProjectVersion)x).Status;
            this.gridDetailmrzRemark.AspectGetter     = x => ((BseProjectVersion)x).Remark;
            this.gridDetailmrzSort.AspectGetter       = x => ((BseProjectVersion)x).Sort;
            this.gridDetailmrzDeptId.AspectGetter     = x => ((BseProjectVersion)x).DeptId;
            this.gridDetailmrzCompanyID.AspectGetter  = x => ((BseProjectVersion)x).CompanyID;
            this.gridDetailmrzCreateDate.AspectGetter = x => ((BseProjectVersion)x).CreateDate;
            this.gridDetailmrzCreateUser.AspectGetter = x => ((BseProjectVersion)x).CreateUser;
            this.gridDetailmrzEditDate.AspectGetter   = x => ((BseProjectVersion)x).EditDate;
            this.gridDetailmrzEditUser.AspectGetter   = x => ((BseProjectVersion)x).EditUser;

            #endregion 明细表列表绑定字段
        }
Example #5
0
        /// <summary>构造函数
        ///
        /// </summary>
        /// <param name="modelMaster">modelMaster</param>
        /// <param name="lstBseProject">lstBseProject</param>
        /// <param name="lstBseModule">lstBseModule</param>
        public FrmBseProjectModuleMasterDetailDialog(BseProject modelMaster,
                                                     List <BseProject> lstBseProject,
                                                     List <BseModule> lstBseModule,
                                                     DataSet dsDetailGridSource)
        {
            InitializeComponent();
            DoInitMasterData();
            DoInitDetailData();

            #region 明细表列表绑定字段

            this.gridDetailmrzModuleID.AspectGetter   = x => ((BseModule)x).ModuleID;
            this.gridDetailmrzProjectID.AspectGetter  = delegate(object x) { return(GetDetailProjectID(((BseModule)x).ProjectID)); };
            this.gridDetailmrzName.AspectGetter       = x => ((BseModule)x).Name;
            this.gridDetailmrzStatus.AspectGetter     = x => ((BseModule)x).Status;
            this.gridDetailmrzRemark.AspectGetter     = x => ((BseModule)x).Remark;
            this.gridDetailmrzSort.AspectGetter       = x => ((BseModule)x).Sort;
            this.gridDetailmrzDeptId.AspectGetter     = x => ((BseModule)x).DeptId;
            this.gridDetailmrzCompanyID.AspectGetter  = x => ((BseModule)x).CompanyID;
            this.gridDetailmrzCreateDate.AspectGetter = x => ((BseModule)x).CreateDate;
            this.gridDetailmrzCreateUser.AspectGetter = x => ((BseModule)x).CreateUser;
            this.gridDetailmrzEditDate.AspectGetter   = x => ((BseModule)x).EditDate;
            this.gridDetailmrzEditUser.AspectGetter   = x => ((BseModule)x).EditUser;

            #endregion 明细表列表绑定字段

            this.m_BseProjectDAL      = GlobalHelp.GetResolve <IBseDAL <BseProject> >();
            this.m_BseModuleDAL       = GlobalHelp.GetResolve <IBseDAL <BseModule> >();
            this.m_BseProject         = modelMaster;
            this.m_lstBseProject      = lstBseProject ?? new List <BseProject>();
            this.m_lstBseModule       = lstBseModule ?? new List <BseModule>();
            this.m_dsDetailGridSource = dsDetailGridSource;
            //修改
            if (modelMaster != null)
            {
                m_BseProject = modelMaster;
                DisplayData(m_BseProject);
                if (m_lstBseModule != null && m_lstBseModule.Count > 0)
                {
                    objListViewDetail.SetObjects(m_lstBseModule);
                    objListViewDetail.Refresh();
                    objListViewDetail.SelectedIndex = 0;
                }
            }
            Command_Click(modelMaster == null ? cmdNew : cmdEdit, null);
        }
Example #6
0
 /// <summary>构造函数
 ///
 /// </summary>
 /// <param name=model" BseDictionary">对象</param>
 /// <param name="lstBseDictionary">对象集合</param>
 public FrmBseDictionaryTreeDialog(BseDictionary model, int intParentId, List <BseDictionary> lstBseDictionary)
 {
     InitializeComponent();
     DoInitData();
     m_lstBseDictionary         = lstBseDictionary;
     m_intParentId              = intParentId;
     m_BseDictionaryDAL         = GlobalHelp.GetResolve <IBseDAL <BseDictionary> >();
     this.dataNavigator.Visible = false;
     if (model != null)
     {
         this.dataNavigator.Visible  = true;
         m_BseDictionary             = model;
         this.dataNavigator.ListInfo = lstBseDictionary.Select(t => t.Id.ToString()).ToList();
         m_strIndex = lstBseDictionary.FindIndex(t => t.Id == m_BseDictionary.Id).ToString();
         this.dataNavigator.CurrentIndex = int.Parse(m_strIndex);
     }
 }