コード例 #1
0
        public UserControlOnBusiness(PlatformManagement.FunctionTreeNodeInfo nodeInfo)
        {
            InitializeComponent();

            m_billMessageServer.BillType = "出差申请单";
            m_authorityFlag = nodeInfo.Authority;

            #region 数据筛选
            string[] strBillStatus = { "全部",                                       OnBusinessBillStatus.新建单据.ToString(),
                                       OnBusinessBillStatus.等待随行人员部门确认.ToString(),
                                       OnBusinessBillStatus.等待部门负责人审核.ToString(),
                                       OnBusinessBillStatus.等待分管领导审批.ToString(),
                                       OnBusinessBillStatus.等待总经理批准.ToString(),
                                       OnBusinessBillStatus.等待销差人确认.ToString(),
                                       OnBusinessBillStatus.等待出差结果说明.ToString(),
                                       OnBusinessBillStatus.已完成.ToString() };

            checkBillDateAndStatus1.InsertComBox(strBillStatus);

            checkBillDateAndStatus1.dtpStartTime.Value = ServerTime.Time.AddDays(1).AddMonths(-1);
            checkBillDateAndStatus1.dtpEndTime.Value   = ServerTime.Time.AddDays(1);

            #endregion

            m_onBusinessServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                                   + checkBillDateAndStatus1.GetSqlString("申请时间", "单据状态");

            RefreshDataGridView();
        }
コード例 #2
0
        /// <summary>
        /// 刷新
        /// </summary>
        void RefreshControl()
        {
            m_tcuRepairServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                                  + checkBillDateAndStatus1.GetSqlString("记录时间", "单据状态");

            IQueryResult result;

            if (!m_tcuRepairServer.GetAllData(out result, out m_error))
            {
                MessageDialog.ShowPromptMessage(m_error);
            }

            if (dataGridView1.Rows.Count > 0)
            {
                dataGridView1.Columns["员工编号"].Visible  = false;
                dataGridView1.Columns["确认人编号"].Visible = false;
                dataGridView1.Columns["报修人编号"].Visible = false;
            }

            if (result.DataCollection == null || result.DataCollection.Tables.Count == 0)
            {
                return;
            }

            dataGridView1.DataSource = result.DataCollection.Tables[0];

            userControlDataLocalizer1.Init(dataGridView1, this.Name,
                                           UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));
        }
コード例 #3
0
        /// <summary>
        /// 刷新
        /// </summary>
        void RefreshDataGridView()
        {
            m_overTimeServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                                 + checkBillDateAndStatus1.GetSqlString("申请时间", "单据状态");

            IQueryResult result;

            if (!m_overTimeServer.GetAllOverTimeBill(out result, out error))
            {
                MessageDialog.ShowErrorMessage(error);
                return;
            }

            //if (result.DataCollection.Tables[0].Rows.Count == 0)
            //{
            //    if (!m_overTimeServer.GetAllOverTimeBillByWorkID(out result, out error))
            //    {
            //        MessageDialog.ShowErrorMessage(error);
            //        return;
            //    }
            //}

            dataGridView1.DataSource = result.DataCollection.Tables[0];

            if (dataGridView1.Rows.Count > 0)
            {
                dataGridView1.Columns["员工编号"].Visible = false;
                dataGridView1.Columns["部门编码"].Visible = false;
            }

            this.dataGridView1.ColumnWidthChanged -= new System.Windows.Forms.DataGridViewColumnEventHandler(
                this.dataGridView1_ColumnWidthChanged);

            ColumnWidthControl.SetDataGridView(labelTitle.Text, dataGridView1);

            this.dataGridView1.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(
                this.dataGridView1_ColumnWidthChanged);

            // 添加查询用的列
            if (m_findField == null)
            {
                List <string> lstColumnName = new List <string>();

                for (int i = 0; i < dataGridView1.Columns.Count; i++)
                {
                    if (dataGridView1.Columns[i].Visible)
                    {
                        lstColumnName.Add(dataGridView1.Columns[i].Name);
                    }
                }

                m_findField = lstColumnName.ToArray();
            }

            userControlDataLocalizer1.Init(dataGridView1, this.Name,
                                           UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));

            //dataGridView1.Refresh();
        }
コード例 #4
0
        private void 设置数据过滤器_Click(object sender, EventArgs e)
        {
            FormFilterCondition form = new FormFilterCondition(labelTitle.Text, m_findField, labelTitle.Text);

            form.ShowDialog();

            m_billServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text);
            RefreshData();
        }
コード例 #5
0
        private void 设置数据过滤器ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormFilterCondition form = new FormFilterCondition(labelTitle.Text, m_findField, labelTitle.Text);

            form.ShowDialog();

            m_billServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text);
            menuItemReresh.PerformClick();
        }
コード例 #6
0
        /// <summary>
        /// 刷新数据
        /// </summary>
        void RefreshData()
        {
            m_serverReviewProcess.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                                      + checkBillDateAndStatus1.GetSqlString("申请日期", "流程状态");

            dataGridView1.DataSource = m_serverReviewProcess.GetAllInfo();

            userControlDataLocalizer1.Init(dataGridView1, this.Name,
                                           UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));
        }
コード例 #7
0
        private void btnRefresh_Click(object sender, EventArgs e)
        {
            m_billServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                             + checkBillDateAndStatus1.GetSqlString("单据提交时间", "单据状态");

            if (!m_billServer.GetAllBill(out m_queryResult, out m_strErr))
            {
                MessageDialog.ShowErrorMessage(m_strErr);
                return;
            }

            RefreshDataGridView(m_queryResult);
        }
コード例 #8
0
        /// <summary>
        /// 查找并刷新数据
        /// </summary>
        private void RefreshData()
        {
            m_billServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                             + checkBillDateAndStatus1.GetSqlString("退货时间", "单据状态");

            if (!m_billServer.GetAllBill(out m_queryResult, out m_error))
            {
                MessageDialog.ShowErrorMessage(m_error);
                return;
            }

            RefreshDataGridView(m_queryResult);
        }
コード例 #9
0
        private void 设置数据过滤器ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormFilterCondition form = new FormFilterCondition(labelTitle.Text, m_findField, labelTitle.Text);

            form.ShowDialog();

            m_billServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text);

            if (m_billServer.GetAllBill(out m_queryResult, out m_error))
            {
                RefreshDataGridView(m_queryResult);
            }
        }
コード例 #10
0
        /// <summary>
        /// 刷新
        /// </summary>
        /// <param name="source">数据集</param>
        void DataBindGirdView()
        {
            m_serverFeedBack.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                                 + checkBillDateAndStatus1.GetSqlString("反馈日期", "单据状态");

            IQueryResult result;

            if (!m_serverFeedBack.GetAllBillFeedBack(out result, out error))
            {
                MessageDialog.ShowErrorMessage(error);
                return;
            }

            dataGridView1.DataSource = result.DataCollection.Tables[0];

            if (dataGridView1.Rows.Count > 0)
            {
                dataGridView1.Columns["反馈人编号"].Visible     = false;
                dataGridView1.Columns["责任人编号"].Visible     = false;
                dataGridView1.Columns["营销售后审核人编号"].Visible = false;
                dataGridView1.Columns["质管意见提出人编号"].Visible = false;
                dataGridView1.Columns["责任部门主管编号"].Visible  = false;
                dataGridView1.Columns["部门编码"].Visible      = false;
                dataGridView1.Columns["质管检查人编号"].Visible   = false;
            }

            if (m_findField == null)
            {
                List <string> lstColumnName = new List <string>();

                for (int i = 0; i < dataGridView1.Columns.Count; i++)
                {
                    if (dataGridView1.Columns[i].Visible)
                    {
                        lstColumnName.Add(dataGridView1.Columns[i].Name);
                    }
                }

                m_findField = lstColumnName.ToArray();
            }

            if (m_dataLocalizer == null)
            {
                m_dataLocalizer = new UserControlDataLocalizer(dataGridView1, this.Name,
                                                               UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));

                panelPara.Controls.Add(m_dataLocalizer);
                m_dataLocalizer.Dock = DockStyle.Bottom;
            }
        }
コード例 #11
0
        /// <summary>
        /// 刷新
        /// </summary>
        private void RefreshDataGridView()
        {
            m_cultivateServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                                  + "培训开始时间>='" + dtpQueryStartTime.Value.ToString() + "' and 培训开始时间<='" + dtpQueryEndTime.Value.ToString() + "'";

            IQueryResult result;

            if (!m_cultivateServer.GetAllBill(out result, out m_error))
            {
                MessageDialog.ShowErrorMessage(m_error);
                return;
            }

            dataGridView1.DataSource = result.DataCollection.Tables[0];

            this.dataGridView1.ColumnWidthChanged -= new System.Windows.Forms.DataGridViewColumnEventHandler(
                this.dataGridView1_ColumnWidthChanged);

            ColumnWidthControl.SetDataGridView(labelTitle.Text, dataGridView1);

            this.dataGridView1.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(
                this.dataGridView1_ColumnWidthChanged);

            // 添加查询用的列
            if (m_findField == null)
            {
                List <string> lstColumnName = new List <string>();

                for (int i = 0; i < dataGridView1.Columns.Count; i++)
                {
                    if (dataGridView1.Columns[i].Visible)
                    {
                        lstColumnName.Add(dataGridView1.Columns[i].Name);
                    }
                }

                m_findField = lstColumnName.ToArray();
            }

            userControlDataLocalizer1.Init(dataGridView1, this.Name,
                                           UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));

            dataGridView1.Refresh();

            if (dataGridView1.Rows.Count > 0)
            {
                dataGridView1.Columns["序号"].Visible = false;
            }
        }
コード例 #12
0
        public 报废单(PlatformManagement.FunctionTreeNodeInfo nodeInfo)
        {
            InitializeComponent();

            m_msgPromulgator.BillType = "报废单";

            m_billNoControl = new BillNumberControl(labelTitle.Text, m_billServer);

            m_authorityFlag = nodeInfo.Authority;

            dateTimePickerST.Value = ServerModule.ServerTime.Time;
            dateTimePickerET.Value = ServerModule.ServerTime.Time.AddDays(1);

            m_billServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text);
            RefreshData();
        }
コード例 #13
0
        /// <summary>
        /// 刷新
        /// </summary>
        void RefreshDataGridView()
        {
            m_marketPartBillServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                                       + checkBillDateAndStatus1.GetSqlString("销售时间", "单据状态");

            IQueryResult result;

            if (!m_marketPartBillServer.GetAllBill(out result, out m_error))
            {
                MessageDialog.ShowErrorMessage(m_error);
                return;
            }

            dataGridView1.DataSource = result.DataCollection.Tables[0];

            this.dataGridView1.ColumnWidthChanged -= new System.Windows.Forms.DataGridViewColumnEventHandler(
                this.dataGridView1_ColumnWidthChanged);

            ColumnWidthControl.SetDataGridView(labelTitle.Text, dataGridView1);

            this.dataGridView1.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(
                this.dataGridView1_ColumnWidthChanged);

            userControlDataLocalizer1.Init(dataGridView1, this.Name,
                                           UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));

            foreach (DataGridViewColumn item in dataGridView1.Columns)
            {
                if (item.Name != "选")
                {
                    item.ReadOnly = true;
                }
                else
                {
                    item.ReadOnly = false;
                    item.Frozen   = false;
                }
            }

            dataGridView1.Columns["ClientID"].Visible   = false;
            dataGridView1.Columns["价格套用的整车厂"].Visible   = false;
            dataGridView1.Columns["价格套用的整车厂编码"].Visible = false;
        }
コード例 #14
0
        /// <summary>
        /// 刷新
        /// </summary>
        private void RefreshDataGridView()
        {
            m_minorBillServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                                  + checkBillDateAndStatus1.GetSqlString("编制日期", "单据状态");

            IQueryResult result;

            if (!m_minorBillServer.GetAllBillInfo(out result, out m_error))
            {
                MessageDialog.ShowErrorMessage(m_error);
                return;
            }

            if (result.DataCollection == null || result.DataCollection.Tables.Count == 0)
            {
                return;
            }

            dataGridView1.DataSource = result.DataCollection.Tables[0];

            dataGridView1.Columns["编号"].Visible     = false;
            dataGridView1.Columns["部门月预算内"].Visible = false;

            this.dataGridView1.ColumnWidthChanged -= new System.Windows.Forms.DataGridViewColumnEventHandler(
                this.dataGridView1_ColumnWidthChanged);

            ColumnWidthControl.SetDataGridView(labelTitle.Text, dataGridView1);

            this.dataGridView1.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(
                this.dataGridView1_ColumnWidthChanged);

            userControlDataLocalizer1.Init(dataGridView1, this.Name,
                                           UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID));

            dataGridView1.Refresh();
        }
コード例 #15
0
 /// <summary>
 /// 查找并刷新数据
 /// </summary>
 private void RefreshData()
 {
     m_billServer.QueryResultFilter = QueryFilterControl.GetFilterString(labelTitle.Text)
                                      + checkBillDateAndStatus1.GetSqlString("建单时间", "单据状态");
     RefreshDataGridView(m_billServer.GetAllBill());
 }