Exemplo n.º 1
0
 private void button16_Click(object sender, EventArgs e)
 {
     try
     {
         if (tabControl6.SelectedIndex == 0)
         {
             Dt = (DataTable)gridControl11.DataSource;
         }
         if (tabControl6.SelectedIndex == 1)
         {
             Dt = (DataTable)gridControl12.DataSource;
         }
         if (tabControl6.SelectedIndex == 2)
         {
             XrPause xrp = new XrPause((DataTable)gridControl11.DataSource, comboBox3.Text + "异常情况统计");
             xrp.ShowPreview();
             return;
         }
         if (Dt != null && Dt.Rows.Count > 0)
         {
             XrROList xr1 = new XrROList(Dt, 1, comboBox3.Text + tabControl6.SelectedTab.Text);
             xr1.ShowPreview();
         }
     }
     catch (Exception Err)
     {
         MessageBox.Show(Err.Message);
     }
 }
Exemplo n.º 2
0
 private void button15_Click(object sender, EventArgs e)
 {
     try
     {
         int dir = 1;
         if (tabControl4.SelectedIndex == 0)
         {
             Dt = (DataTable)gridControl2.DataSource;
         }
         if (tabControl4.SelectedIndex == 1)
         {
             Dt  = (DataTable)gridControl15.DataSource;
             dir = 0;
         }
         if (tabControl4.SelectedIndex == 2)
         {
             Dt = (DataTable)gridControl3.DataSource;
         }
         if (tabControl4.SelectedIndex == 3)
         {
             Dt = (DataTable)gridControl19.DataSource;
         }
         if (Dt != null && Dt.Rows.Count > 0)
         {
             XrROList xr1 = new XrROList(Dt, dir, comboBox2.Text + tabControl4.SelectedTab.Text);
             xr1.ShowPreview();
         }
     }
     catch (Exception Err)
     {
         MessageBox.Show(Err.Message);
     }
 }
Exemplo n.º 3
0
 private void button5_Click(object sender, EventArgs e)
 {
     try
     {
         if (gridControl9.Visible)
         {
             Dt = (DataTable)gridControl9.DataSource;
         }
         if (gridControl13.Visible)
         {
             Dt = (DataTable)gridControl13.DataSource;
         }
         if (gridControl14.Visible)
         {
             Dt = (DataTable)gridControl14.DataSource;
         }
         if (Dt != null && Dt.Rows.Count > 0)
         {
             XrROList xr1 = new XrROList(Dt, 1, comboBox4.Text + tabControl3.SelectedTab.Text + "明细表");
             xr1.ShowPreview();
         }
     }
     catch (Exception Err)
     {
         MessageBox.Show(Err.Message);
     }
 }
Exemplo n.º 4
0
 private void button14_Click(object sender, EventArgs e)
 {
     try
     {
         if (barChart.Visible)
         {
             XrCars xrc = new XrCars(comboBox1.Text);
             xrc.ShowPreview();
         }
         else
         {
             if (tabControl2.SelectedIndex == 0)
             {
                 Dt = (DataTable)gcSA.DataSource;
             }
             if (tabControl2.SelectedIndex == 1)
             {
                 Dt = (DataTable)gridControl4.DataSource;
             }
             if (Dt != null && Dt.Rows.Count > 0)
             {
                 XrROList xr1 = new XrROList(Dt, 1, comboBox1.Text + tabControl2.SelectedTab.Text);
                 xr1.ShowPreview();
             }
         }
     }
     catch (Exception Err)
     {
         MessageBox.Show(Err.Message);
     }
 }
Exemplo n.º 5
0
 //预览
 private void button18_Click(object sender, EventArgs e)
 {
     Dt = (DataTable)gridControl15.DataSource;
     if (Dt != null && Dt.Rows.Count > 0)
     {
         XrROList xr1 = new XrROList(Dt, 0, dateTimePicker3.Value.ToString("MM月dd日") + "至" + dateTimePicker4.Value.ToString("MM月dd日") + tabControl4.SelectedTab.Text);
         xr1.ShowPreview();
     }
 }
Exemplo n.º 6
0
        private void button10_Click(object sender, EventArgs e)
        {
            string sqlwhere = string.Empty;

            sqlwhere     = "预约时间>'" + dateTimePicker1.Value.ToString("yy-MM-dd 00:00") + "' and 预约时间<'" + dateTimePicker2.Value.AddDays(1).ToString("yy-MM-dd 00:00") + "' And CreateDate>'" + dateTimePicker1.Value.ToShortDateString() + "'";
            string where = gridView1.FilterPanelText;
            if (where.IndexOf("与") > -1)
            {
                where = where.Replace("与", "And");
            }
            if (where.IndexOf("Like") > -1)
            {
                where = where.Replace("匹配(Like)", "like");
            }
            if (where != string.Empty)
            {
                sqlwhere += "And " + where;
            }
            if (gcRo.Visible)
            {
                string sqlstring = "Select * from View_SelectBooking Where " + sqlwhere;
                Dt = SQLDbHelper.Query(sqlstring).Tables[0];
                Dt.Columns.Remove("CreateDate");
                for (int i = 0; i < Dt.Rows.Count; i++)
                {
                    Dt.Rows[i]["序号"] = Convert.ToString(i + 1);
                }
                for (int i = 0; i < gridView1.Columns.Count - 1; i++)
                {
                    if (!gridView1.Columns[i].Visible)
                    {
                        Dt.Columns.Remove(gridView1.Columns[i].Caption);
                    }
                }
                Dt.Columns.Remove("单号");
                if (Dt != null && Dt.Rows.Count > 0)
                {
                    XrROList xr1 = new XrROList(Dt, 0, "预约工单明细表");
                    xr1.ShowPreview();
                }
            }
            else
            {
                Dt = (DataTable)gridControl20.DataSource;
                Dt.Columns.Remove("单号");
                if (Dt != null && Dt.Rows.Count > 0)
                {
                    XrROList xr1 = new XrROList(Dt, 0, "异常工单明细表");
                    xr1.ShowPreview();
                }
            }
        }
Exemplo n.º 7
0
 private void button13_Click(object sender, EventArgs e)
 {
     try
     {
         Dt = (DataTable)gridControl10.DataSource;
         if (Dt != null && Dt.Rows.Count > 0)
         {
             XrROList xr1 = new XrROList(Dt, 1, comboBox5.Text + "预约工时统计");
             xr1.ShowPreview();
         }
     }
     catch (Exception Err)
     {
         MessageBox.Show(Err.Message);
     }
 }
Exemplo n.º 8
0
 private void button17_Click(object sender, EventArgs e)
 {
     if (tabControl5.SelectedIndex == 0)
     {
         Dt = (DataTable)gridControl1.DataSource;
     }
     if (tabControl5.SelectedIndex == 1)
     {
         Dt = (DataTable)gridControl16.DataSource;
     }
     if (Dt != null && Dt.Rows.Count > 0)
     {
         XrROList xr1 = new XrROList(Dt, 1, comboBox6.Text + tabControl5.SelectedTab.Text);
         xr1.ShowPreview();
     }
 }
Exemplo n.º 9
0
        private void button11_Click(object sender, EventArgs e)
        {
            try
            {
                if (tabControl3.SelectedIndex == 0)
                {
                    Dt = (DataTable)gridControl5.DataSource;
                    if (Dt != null && Dt.Rows.Count > 0)
                    {
                        XrROList xr1 = new XrROList(Dt, 1, comboBox4.Text + "电话提醒");
                        xr1.ShowPreview();
                    }

                    Dt = (DataTable)gridControl6.DataSource;
                    if (Dt != null && Dt.Rows.Count > 0)
                    {
                        XrROList xr1 = new XrROList(Dt, 1, comboBox4.Text + "电话提醒失败原因");
                        xr1.ShowPreview();
                    }
                }
                if (tabControl3.SelectedIndex == 1)
                {
                    Dt = (DataTable)gridControl7.DataSource;
                    if (Dt != null && Dt.Rows.Count > 0)
                    {
                        XrROList xr1 = new XrROList(Dt, 1, comboBox4.Text + "来店方式");
                        xr1.ShowPreview();
                    }
                }
                if (tabControl3.SelectedIndex == 2)
                {
                    Dt = (DataTable)gridControl8.DataSource;
                    if (Dt != null && Dt.Rows.Count > 0)
                    {
                        XrROList xr1 = new XrROList(Dt, 1, comboBox4.Text + "预约结果");
                        xr1.ShowPreview();
                    }
                }
            }
            catch (Exception Err)
            {
                MessageBox.Show(Err.Message);
            }
        }
Exemplo n.º 10
0
 private void button6_Click(object sender, EventArgs e)
 {
     try
     {
         if (tabControl7.SelectedIndex == 0)
         {
             Dt = (DataTable)gridControl7.DataSource;
         }
         if (tabControl7.SelectedIndex == 1)
         {
             Dt = (DataTable)gridControl8.DataSource;
         }
         if (Dt != null && Dt.Rows.Count > 0)
         {
             XrROList xr1 = new XrROList(Dt, 1, comboBox7.Text + tabControl7.SelectedTab.Text);
             xr1.ShowPreview();
         }
     }
     catch (Exception Err)
     {
         MessageBox.Show(Err.Message);
     }
 }