예제 #1
0
        private void toolStripButton19_Click(object sender, EventArgs e)
        {
            if (null == this.ly_material_task_viewNewDataGridView.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();

            //SumQueryDataSet qds;
            //qds = new SumQueryDataSet();

            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYPlanMange.ly_material_task_viewNew.Columns, ls);

            filterForm.ShowDialog();

            string filterstr = filterForm.GetFilterString();

            if (!string.IsNullOrEmpty(filterstr))
            {
                this.ly_material_task_viewNewBindingSource.Filter = "(" + filterstr + ") or 计划编码='合计'";
            }
            AddSummationRow_New(ly_material_task_viewNewBindingSource, ly_material_task_viewNewDataGridView);
        }
예제 #2
0
        private void chooseDateFrameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FilterForm filterForm = new FilterForm();

            filterForm.Owner = this;
            filterForm.ShowDialog();
        }
예제 #3
0
        private void toolStripButton11_Click(object sender, EventArgs e)
        {
            FilterForm filterForm = new FilterForm();



            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(ly_inma0010DataGridView.Columns, ls);

            filterForm.ShowDialog();

            string nowfilter = filterForm.GetFilterString();

            if (string.IsNullOrEmpty(nowfilter))
            {
                this.ly_inma0010cpBindingSource.Filter = nowfilter;
            }
            else
            {
                //this.ly_inma0010BindingSource.Filter = "(" + nowfilter + ")" + " or 仓库='总计'";
                this.ly_inma0010cpBindingSource.Filter = nowfilter;
            }
        }
예제 #4
0
        private void toolStripButton7_Click(object sender, EventArgs e)
        {
            if (null == this.ly_purchase_contract_mainDataGridView.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();

            //SumQueryDataSet qds;
            //qds = new SumQueryDataSet();

            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYOutsourceData.ly_outsource_contract_main11.Columns, ls);

            filterForm.ShowDialog();

            this.ly_outsource_contract_main11BindingSource.Filter = filterForm.GetFilterString();

            //this.ly_outsource_contract_main11TableAdapter.Fill(this.lYOutsourceData.ly_outsource_contract_main11, this.dateTimePicker1.Value, this.dateTimePicker2.Value.AddDays(1));

            //AddSummationRow_New(ly_outsource_contract_main11BindingSource, ly_purchase_contract_mainDataGridView);
        }
예제 #5
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if (null == this.ly_salesAndrepair_MaopossReportDataGridView.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();



            //SumQueryDataSet qds;
            //qds = new SumQueryDataSet();

            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYSalseMange2.ly_salesAndrepair_MaopossReport.Columns, ls);

            filterForm.ShowDialog();

            this.ly_salesAndrepair_MaopossReportBindingSource.Filter = filterForm.GetFilterString();
        }
예제 #6
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            //if (null == this.sum_queryDataGridView.CurrentRow) return;

            FilterForm filterForm = new FilterForm();



            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.sumCard_DataSet.Sum_query.Columns, ls);

            filterForm.ShowDialog();



            filterString = filterForm.GetFilterString();

            if (null == filterString)
            {
                filterString = "";
            }
            setfilterStr();
            AddSummationRow(sum_queryBindingSource, sum_queryDataGridView);
        }
예제 #7
0
파일: LY_DNI.cs 프로젝트: Deny01/MY_PRO
        private void toolStripButton7_Click(object sender, EventArgs e)
        {
            if (null == this.ly_sales_contract_standard_ReportDataGridView.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();


            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYSalseMange2.ly_sales_cost_Report.Columns, ls);

            filterForm.ShowDialog();

            string filterstr = filterForm.GetFilterString();

            if (!string.IsNullOrEmpty(filterstr))
            {
                this.lysalescostReportBindingSource.Filter = "(" + filterstr + ") or 清单号='合计'";
            }
            AddSummationRow_New(lysalescostReportBindingSource, ly_sales_contract_standard_ReportDataGridView);
        }
예제 #8
0
        private void toolStripButton19_Click(object sender, EventArgs e)
        {
            if (null == this.ly_sales_repair_detail_View_NewDataGridView.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();

            //SumQueryDataSet qds;
            //qds = new SumQueryDataSet();

            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYSalseRepair.ly_sales_repair_detail_View_New.Columns, ls);

            filterForm.ShowDialog();

            string filterstr = filterForm.GetFilterString();

            if (!string.IsNullOrEmpty(filterstr))
            {
                this.ly_sales_repair_detail_View_NewBindingSource.Filter = filterstr;
            }
            //AddSummationRow_New(ly_sales_repair_detail_View_NewBindingSource, ly_sales_repair_detail_View_NewDataGridView);
        }
예제 #9
0
        private void toolStripButton19_Click(object sender, EventArgs e)
        {
            if (null == this.ly_production_submit_periodDataGridView.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();



            //SumQueryDataSet qds;
            //qds = new SumQueryDataSet();

            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYProductMange.ly_production_submit_period.Columns, ls);

            filterForm.ShowDialog();

            this.ly_production_submit_periodBindingSource.Filter = filterForm.GetFilterString();
        }
예제 #10
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            FilterForm filterForm = new FilterForm();



            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(ly_inma0010DataGridView.Columns, ls);

            filterForm.ShowDialog();

            string nowfilter = filterForm.GetFilterString();

            if (string.IsNullOrEmpty(nowfilter))
            {
                this.lY_InventoryMaintenance_query_newBindingSource.Filter = nowfilter;
            }
            else
            {
                this.lY_InventoryMaintenance_query_newBindingSource.Filter = "(" + nowfilter + ")" + " or 仓库='总计'";
            }

            //CountMoney(lY_InventoryMaintenance_query_newBindingSource, ly_inma0010DataGridView);
        }
예제 #11
0
        private void toolStripButton19_Click(object sender, EventArgs e)
        {
            if (null == this.ly_sales_standard_SumDataGridView.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();



            //SumQueryDataSet qds;
            //qds = new SumQueryDataSet();

            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYSalseRepair.ly_quality_debug_Sum.Columns, ls);

            filterForm.ShowDialog();

            this.ly_quality_debug_SumBindingSource.Filter = filterForm.GetFilterString();
        }
예제 #12
0
 protected override void OnKeyDown(KeyEventArgs e)
 {
     if (Width == 0)
     {
         return;
     }
     if (e.KeyCode != System.Windows.Forms.Keys.Space)
     {
         if (e.KeyCode == Keys.Enter && DropDownStyle != ComboBoxStyle.DropDownList)
         {
             for (int i = 0; i < Items.Count; i++)
             {
                 BaseObject baseObject = Items[i] as BaseObject;
                 if (baseObject != null)
                 {
                     if (baseObject.ID == Text)
                     {
                         SelectedItem = baseObject;
                         Select(Text.Length, 0);
                         break;
                     }
                 }
             }
         }
         return;
     }
     if (Items.Count == 0)
     {
         return;
     }
     e.SuppressKeyPress = true;
     if (filterForm == null)
     {
         if (InitFilterForm() < 0)
         {
             initSuccess = false;
             return;
         }
         else
         {
             initSuccess = true;
         }
     }
     if (initSuccess)
     {
         filterForm.ShowDialog();
         if (DropDownStyle != ComboBoxStyle.DropDownList && Text.StartsWith(" "))
         {
             SuspendLayout();
             Text = Text.Substring(1, Text.Length - 1);
             Select(Text.Length, 0);
             ResumeLayout();
         }
     }
     base.OnKeyDown(e);
 }
예제 #13
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            FilterForm filterForm = new FilterForm();



            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(ly_inma0010_inoutDataGridView.Columns, ls);

            filterForm.ShowDialog();

            this.ly_waste_inoutBindingSource.Filter = filterForm.GetFilterString();
        }
예제 #14
0
        private void LinkLabelEdit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            using (FilterForm filterForm = new FilterForm(Filter.Clone()))
            {
                if (filterForm.ShowDialog(this) != DialogResult.OK)
                {
                    return;
                }

                FilterType fromType = Filter.Type;
                FilterType toType   = filterForm.Filter.Type;

                Filter = filterForm.Filter;
                UpdateInfo();
                Invalidate();

                RaiseChangedEvent(fromType, toType);
            }
        }
예제 #15
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            if (null == this.ly_store_outnumDateDataGridView.CurrentRow)
            {
                return;
            }
            FilterForm filterForm = new FilterForm();



            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(ly_store_outnumDateDataGridView.Columns, ls);

            filterForm.ShowDialog();

            this.ly_store_outnumDateBindingSource.Filter = filterForm.GetFilterString();
        }
예제 #16
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if (null == this.ly_purchase_contract_inspectionRepDataGridView.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();



            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYQualityInspector.qz_dz_report.Columns, ls);

            filterForm.ShowDialog();

            this.qzdzreportBindingSource.Filter = filterForm.GetFilterString();
        }
예제 #17
0
 /// <summary>
 /// 显示筛选器。
 /// </summary>
 public void ShowFilter()
 {
     if (Items.Count == 0)
     {
         return;
     }
     if (filterForm == null)
     {
         if (InitFilterForm() < 0)
         {
             initSuccess = false;
             return;
         }
         else
         {
             initSuccess = true;
         }
     }
     if (initSuccess)
     {
         filterForm.ShowDialog();
     }
 }
예제 #18
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if (null == this.dataGridView1.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();

            //SumQueryDataSet qds;
            //qds = new SumQueryDataSet();

            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYSalseMange2.ly_plan_getmaterial_department.Columns, ls);

            filterForm.ShowDialog();

            this.ly_plan_getmaterial_departmentBindingSource1.Filter = filterForm.GetFilterString();
        }
예제 #19
0
        //private void chehao_Click(object sender, EventArgs e)
        //{
        //    string sel = "SELECT distinct vehicle_code as 车号 FROM YX_daywork_record " +

        //    " where vehicle_code is not null and len(vehicle_code) > 0 and (service_number is null or len(service_number) < 1) ";


        //    QueryForm queryForm = new QueryForm();


        //    queryForm.Sel = sel;
        //    queryForm.Constr = SQLDatabase.Connectstring;

        //    //Set the Column Collection to the filter Table
        //    //queryForm.SetSourceColumns(this.billMainDataSet.BalanceBill.Columns);

        //    queryForm.ShowDialog();

        //    this.textBox3.Text = queryForm.Result;
        //}

        //private void kehu_Click(object sender, EventArgs e)
        //{

        //    string sel = "SELECT  Name as 姓名, Card_number as 卡号 FROM YX_client";


        //    QueryForm queryForm = new QueryForm();


        //    queryForm.Sel = sel;
        //    queryForm.Constr = SQLDatabase.Connectstring;

        //    //Set the Column Collection to the filter Table
        //    //queryForm.SetSourceColumns(this.billMainDataSet.BalanceBill.Columns);

        //    queryForm.ShowDialog();

        //    this.textBox3.Text = queryForm.Result;
        //}

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if (null == ds)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();

            //SumQueryDataSet qds;
            //qds = new SumQueryDataSet();

            List <string> ls = new List <string> ();

            ls.Add("id");


            filterForm.SetSourceColumns(ds.Tables[0].Columns, ls);

            filterForm.ShowDialog();

            this.bindingSource2.Filter = filterForm.GetFilterString();
        }
예제 #20
0
파일: Ly_DNINEW.cs 프로젝트: Deny01/MY_PRO
        private void toolStripButton7_Click(object sender, EventArgs e)
        {
            if (null == this.dataGridView5.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();



            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYSalseMange.GetOrderByBussCodeAll.Columns, ls);

            filterForm.ShowDialog();

            this.getOrderByBussCodeAllBindingSource.Filter = filterForm.GetFilterString();
            AddSummationRow_New(getOrderByBussCodeAllBindingSource, dataGridView5);
        }
예제 #21
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if (null == this.lY_qualityDebug_historyInfoDataGridView.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();

            //SumQueryDataSet qds;
            //qds = new SumQueryDataSet();

            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYSalseMange.LY_qualityDebug_historyInfo.Columns, ls);

            filterForm.ShowDialog();

            this.lY_qualityDebug_historyInfoBindingSource.Filter = filterForm.GetFilterString();
            //AddSummationRow_New(ly_sales_repairstandard_ReportBindingSource, ly_sales_contract_standard_ReportDataGridView);
        }
예제 #22
0
        private void toolStripButton7_Click(object sender, EventArgs e)
        {
            if (null == this.ly_purchase_contract_mainDataGridView.CurrentRow)
            {
                return;
            }

            FilterForm filterForm = new FilterForm();

            //SumQueryDataSet qds;
            //qds = new SumQueryDataSet();

            List <string> ls = new List <string>();

            ls.Add("id");


            filterForm.SetSourceColumns(this.lYMaterielRequirements.ly_purchase_contract_main11.Columns, ls);

            filterForm.ShowDialog();

            this.ly_purchase_contract_main11BindingSource.Filter = filterForm.GetFilterString();
            //////AddSummationRow_New(ly_sales_repairstandard_ReportBindingSource, ly_sales_contract_standard_ReportDataGridView);
        }
        protected void btnPostFilters_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                return;
            }

            int ch_num = int.Parse(((PictureButton)sender).Name.Substring(5, 1));

            int settings_index, plainfilter_index;
            FilterConfig[] cached_filters = new FilterConfig[6];

            for (int i = 3; i < 9; i++)
            {
                if (PROGRAMS[CURRENT_PROGRAM].filters[ch_num - 1][i] != null)
                {
                    cached_filters[i-3] = (FilterConfig)PROGRAMS[CURRENT_PROGRAM].filters[ch_num - 1][i].Clone();
                }
            }

            using (FilterForm filterForm = new FilterForm(this, ch_num, true))
            {
                DialogResult showBlock = filterForm.ShowDialog(this);

                if (showBlock == DialogResult.Cancel)
                {

                    for (int i = 3; i < 9; i++)
                    {
                        settings_index = (40) + ((ch_num - 1) * 45) + (i * 5);
                        plainfilter_index = (300) + ((ch_num - 1) * 27) + (i * 3);

                        if (cached_filters[i - 3] != null)
                        {
                            PROGRAMS[CURRENT_PROGRAM].filters[ch_num - 1][i] = (FilterConfig) cached_filters[i - 3].Clone();
                            if (LIVE_MODE)
                            {
                                PROGRAMS[CURRENT_PROGRAM].filters[ch_num - 1][i].QueueChange(this, settings_index, plainfilter_index, ch_num);
                            }
                        } else
                        {
                            if (LIVE_MODE)
                            {
                                // Filter doesn't exist... SO... let's just send a blank one
                                new FilterConfig(FilterType.None, true).QueueChange(this, settings_index, plainfilter_index, ch_num);
                            }
                        }
                    }

                }
                else
                {
                    UpdateTooltips();
                }

            }
        }
예제 #24
0
        private void filterBtn_Click(object sender, EventArgs e)
        {
            var form = new FilterForm();

            form.ShowDialog();
        }
예제 #25
0
 private void FilterWineButton_Click(object sender, EventArgs e)
 {
     FilterForm form = new FilterForm();
     form.ShowDialog();
 }
        protected void btnPreFilters_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                return;
            }

            int ch_num = int.Parse(((PictureButton)sender).Name.Substring(5, 1));

            int settings_index, plainfilter_index;

            FilterConfig[] cached_filters = new FilterConfig[3];

            for (int i = 0; i < 3; i ++)
            {
                if (PROGRAMS[CURRENT_PROGRAM].filters[ch_num - 1][i] != null)
                {
                    if (PROGRAMS[CURRENT_PROGRAM].filters[ch_num - 1][i] != null)
                    {
                        cached_filters[i] = (FilterConfig) PROGRAMS[CURRENT_PROGRAM].filters[ch_num - 1][i].Clone();
                    }
                }
            }

            using (FilterForm filterForm = new FilterForm(this, ch_num))
            {
                filterForm.Height = 500;

                DialogResult showBlock = filterForm.ShowDialog(this);

                if (showBlock == DialogResult.Cancel)
                {

                    for (int i = 0; i < 3; i++)
                    {
                        if (cached_filters[i] != null)
                        {
                            settings_index = (40) + ((ch_num - 1) * 45) + (i * 5);
                            plainfilter_index = (300) + ((ch_num - 1) * 27) + (i * 3);

                            PROGRAMS[CURRENT_PROGRAM].filters[ch_num - 1][i] = (FilterConfig) cached_filters[i].Clone();

                            if(LIVE_MODE)
                            {
                                PROGRAMS[CURRENT_PROGRAM].filters[ch_num - 1][i].QueueChange(this, settings_index, plainfilter_index, ch_num);
                            }
                        }
                    }

                }
                else
                {
                    UpdateTooltips();
                }
            }
        }