Example #1
0
        /// <summary>
        /// 设定站号信息
        /// </summary>
        private void btnStnList_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, sender, true))
                {
                    return;
                }

                //string projectNoStr = DataTypeConvert.GetString(gridViewProjectList.GetFocusedDataRow()["ProjectNo"]);
                //FrmStnList.projectNoStr = projectNoStr;
                //ViewHandler.ShowRightWindow("FrmStnList");
                if (!editForm.EditState)
                {
                    DataRow dr = gridViewProjectList.GetFocusedDataRow();
                    if (dr != null)
                    {
                        FrmStnList stnList = new FrmStnList(DataTypeConvert.GetString(dr["ProjectNo"]), DataTypeConvert.GetString(dr["ProjectName"]));
                        stnList.ShowDialog();
                    }
                }
                else
                {
                    MessageHandler.ShowMessageBox(f.tsmiQxbchzjx.Text);// ("请先保存后再进行其他操作。");
                }
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--设定站号信息事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiSdzhxxsjcw.Text, ex);
            }
        }
Example #2
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmProjectList_Load(object sender, EventArgs e)
        {
            try
            {
                searchLookUpBussinessBaseNo.Properties.DataSource = commonDAO.QueryBussinessBaseInfo(false);

                if (editForm == null)
                {
                    editForm = new FrmBaseEdit();
                    editForm.FormBorderStyle      = FormBorderStyle.None;
                    editForm.TopLevel             = false;
                    editForm.TableName            = "BS_ProjectList";
                    editForm.TableCaption         = "项目号";
                    editForm.Sql                  = "select BS_ProjectList.*, BS_BussinessBaseInfo.BussinessBaseText from BS_ProjectList left join BS_BussinessBaseInfo on BS_ProjectList.BussinessBaseNo=BS_BussinessBaseInfo.BussinessBaseNo order by BS_ProjectList.AutoId";
                    editForm.PrimaryKeyColumn     = "ProjectNo";
                    editForm.MasterDataSet        = dSProjectList;
                    editForm.MasterBindingSource  = bSProjectList;
                    editForm.MasterEditPanel      = pnlEdit;
                    editForm.PrimaryKeyControl    = textProjectNo;
                    editForm.OtherNoChangeControl = new List <Control>()
                    {
                        textProjectName
                    };
                    editForm.BrowseXtraGridView = gridViewProjectList;
                    editForm.CheckControl      += CheckControl;
                    editForm.ButtonList.Add(btnStnList);
                    this.pnlToolBar.Controls.Add(editForm);
                    editForm.Dock = DockStyle.Fill;
                    editForm.Show();

                    stnList = new FrmStnList("", "");
                    stnList.Show(this.dockPanelStn);
                    stnList.Dock            = DockStyle.Fill;
                    stnList.TopLevel        = false;
                    stnList.FormBorderStyle = FormBorderStyle.None;

                    this.dockPanelStn.Text    = stnList.Text;
                    this.dockPanelStn.TabText = stnList.Text;
                    this.dockPanelStn.Controls.Add(stnList);
                }
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
Example #3
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmProjectList_Load(object sender, EventArgs e)
        {
            try
            {
                searchLookUpBussinessBaseNo.Properties.DataSource = commonDAO.QueryBussinessBaseInfo(false);
                lookUpProjectStatusId.Properties.DataSource       = statusDAO.QueryProjectStatus(false);
                //searchLookUpLeaderId.Properties.DataSource = projectDAO.QueryUserInfo(false);

                ControlCommonInit ctlInit = new ControlCommonInit();
                ctlInit.SearchLookUpEdit_UserInfo_ValueMember_AutoId_NoAll(searchLookUpLeaderId);

                repLookUpProjectStatusId.DataSource = statusDAO.QueryProjectStatus(false);
                repLookUpLeaderId.DataSource        = searchLookUpLeaderId.Properties.DataSource;

                stnList = new FrmStnList("", "");
                stnList.Show(this.PageStnInfo);
                stnList.Dock            = DockStyle.Fill;
                stnList.TopLevel        = false;
                stnList.FormBorderStyle = FormBorderStyle.None;

                //this.PageStnInfo.Text = stnList.Text;
                this.dockPanelInfo.Text    = "项目其他信息";
                this.dockPanelInfo.TabText = this.dockPanelInfo.Text;
                this.PageStnInfo.Controls.Add(stnList);

                if (!FrmMainDAO.QueryUserButtonPower(this.Name, this.Text, btnStnList, false))
                {
                    PageStnInfo.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }