Exemple #1
0
        //鼠标左键选择时触发
        private void TreeViewItem_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            TreeViewItem tmp = sender as TreeViewItem;      //必须得转为相应的类型才可以调用。
            string name = tmp.Header.ToString();
            string user = namedict[name];
            string dt_end = DateTime.Now.ToString();
            string dt_begin = DateTime.Now.AddDays(-7).ToString();
            //MessageBox.Show(dt_bebin);
            /*
            string filter = @"
                                1=1 and 1=1 and
                                d.AlarmCreateTime >=to_date('2015-06-12 21:06:12','yyyy-MM-dd hh24:mi:ss') and
                                d.AlarmCreateTime <=to_date('2015-07-18 21:06:16','yyyy-MM-dd hh24:mi:ss') and
                                o.Professional=4 and
                                o.City_ID=10301 and
                                o.work_id in
                                (select work_id from @[email protected] where
                                (case when o.work_status=1or o.work_status=3 then Group_id else handle_id end)='18502023916')";*/
            string filter = string.Format("1=1 and 1=1 and d.AlarmCreateTime >=to_date('{0}','yyyy-MM-dd hh24:mi:ss') and d.AlarmCreateTime <=to_date('{1}','yyyy-MM-dd hh24:mi:ss') and o.Professional=4 and o.City_ID=10301 and o.work_id in (select work_id from @[email protected] where (case when o.work_status=1or o.work_status=3 then Group_id else handle_id end)='{2}')",
                                           dt_begin, dt_end, user);

            int pageindex = 1;
            int pagesize = 40;
            decimal provinceid = 103;
            //MessageBox.Show(filter);
            FaultRepairServiceClient proxy = new FaultRepairServiceClient();
            proxy.GetAlarmorderListByDicCompleted += new EventHandler<GetAlarmorderListByDicCompletedEventArgs>(proxy_GetAlarmorderListByDicCompleted);
            proxy.GetAlarmorderListByDicAsync(filter, pageindex, pagesize, provinceid);
        }
Exemple #2
0
        void requestAlarmDetail(object o, EventArgs e)
        {
            //textBox1.Text =
            //string filter = "1=1 and 1=1 and ( o.WORK_STATUS=1or o.WORK_STATUS=3) and o.work_id in (select work_id from @[email protected] where (case when o.work_status=1or o.work_status=3 then Group_id else handle_id end)='18502023930')";
            //string filter = "1=1 and 1=1 and o.City_ID=10301 and ( o.WORK_STATUS=1or o.WORK_STATUS=2) and exists (select * from @[email protected] where (Group_id='lanbb' or handle_id='lanbb') and o.work_id=work_id)";
            string filter = "1=1 and 1=1 and d.AlarmCreateTime >=to_date('2015-06-12 21:06:12','yyyy-MM-dd hh24:mi:ss') and d.AlarmCreateTime <=to_date('2015-07-18 21:06:16','yyyy-MM-dd hh24:mi:ss') and o.Professional=4 and o.City_ID=10301 and o.work_id in (select work_id from @[email protected] where (case when o.work_status=1or o.work_status=3 then Group_id else handle_id end)='18502023916')";
            int pageindex = 1;
            int pagesize = 40;
            decimal provinceid = 103;

            FaultRepairServiceClient proxy = new FaultRepairServiceClient();
            proxy.GetAlarmorderListByDicCompleted += new EventHandler<GetAlarmorderListByDicCompletedEventArgs>(proxy_GetAlarmorderListByDicCompleted);
            proxy.GetAlarmorderListByDicAsync(filter, pageindex, pagesize, provinceid);
        }