void Get_VDInfoCompleted(object sender, Get_VDInfoCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                ObservableCollection <T_OA_VEHICLEDISPATCH> o = e.Result;
                VehicleDispatch = o[0];
                SetFormDefalueValue(VehicleDispatch);

                RefreshUI(RefreshedTypes.AuditInfo);
                RefreshUI(RefreshedTypes.All);
                Load_Data();   //add by zl
            }
        }
 void Get_VDInfoCompleted(object sender, Get_VDInfoCompletedEventArgs e)
 {
     if (e.Result != null)
     {
         ObservableCollection <T_OA_VEHICLEDISPATCH> vhdch = e.Result;
         if (vhdch != null)
         {
             vehicleDispatch = vhdch[0];
         }
         // by ldx
         // 2011-08-09
         // 修改这里多次调用
         if (vehicleDispatch != null)
         {
             SetFormDefalueValue(vehicleDispatch);
         }
         RefreshUI(RefreshedTypes.AuditInfo);
         RefreshUI(RefreshedTypes.All);
         //Load_Data();
     }
 }
Beispiel #3
0
        //获取已经派车的申请用车数据
        void Get_VDInfoCompleted(object sender, Get_VDInfoCompletedEventArgs e)
        {
            try
            {
                if (e.Error != null && e.Error.Message != "")
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
                }
                _lstVRecord.Clear();
                ObservableCollection <T_OA_VEHICLEDISPATCH> lst = e.Result;
                if (lst != null)
                {
                    foreach (T_OA_VEHICLEDISPATCHDETAIL info in lst[0].T_OA_VEHICLEDISPATCHDETAIL.ToList())
                    //foreach (T_OA_VEHICLEDISPATCHDETAIL info in lst[0].tToList())
                    {
                        T_OA_VEHICLEDISPATCHRECORD r = new T_OA_VEHICLEDISPATCHRECORD();
                        r.T_OA_VEHICLEDISPATCHDETAIL = info;
                        r.T_OA_VEHICLEDISPATCHDETAIL.T_OA_VEHICLEDISPATCH = info.T_OA_VEHICLEDISPATCH;

                        r.T_OA_VEHICLEDISPATCHDETAIL.VEHICLEDISPATCHDETAILID = info.VEHICLEDISPATCHDETAILID;
                        r.T_OA_VEHICLEDISPATCHDETAIL.T_OA_VEHICLEDISPATCH.VEHICLEDISPATCHID = info.T_OA_VEHICLEDISPATCH.VEHICLEDISPATCHID;
                        r.T_OA_VEHICLEDISPATCHDETAIL.T_OA_VEHICLEDISPATCH.DRIVER            = info.T_OA_VEHICLEDISPATCH.DRIVER;
                        r.T_OA_VEHICLEDISPATCHDETAIL.T_OA_VEHICLEDISPATCH.T_OA_VEHICLE      = frmD._lstVDispatch[0].T_OA_VEHICLE;

                        r.STARTTIME = info.T_OA_VEHICLEDISPATCH.STARTTIME;
                        r.ENDTIME   = info.T_OA_VEHICLEDISPATCH.ENDTIME;
                        r.NUM       = info.T_OA_VEHICLEDISPATCH.NUM;
                        r.ROUTE     = info.T_OA_VEHICLEDISPATCH.ROUTE;
                        r.TEL       = info.T_OA_VEHICLEDISPATCH.TEL;

                        r.FUEL    = decimal.Parse("0.00");
                        r.RANGE   = decimal.Parse("0.00");
                        r.CONTENT = "";
                        //r.ISCHARGE = ckbHasFee.IsChecked == true ? "1" : "0";
                        //r.CHARGEMONEY = txtFee.Text == "" ? decimal.Parse("0.00") : decimal.Parse(txtFee.Text);

                        r.CREATECOMPANYID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                        r.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                        r.CREATEUSERID       = Common.CurrentLoginUserInfo.EmployeeID;
                        r.CREATEUSERNAME     = Common.CurrentLoginUserInfo.EmployeeName;
                        r.CREATEPOSTID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
                        r.CREATEDATE         = DateTime.Now;

                        r.OWNERCOMPANYID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                        r.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                        r.OWNERID           = Common.CurrentLoginUserInfo.EmployeeID;
                        r.OWNERNAME         = Common.CurrentLoginUserInfo.EmployeeName;
                        r.OWNERPOSTID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;

                        r.CHECKSTATE = "0";
                        _lstVRecord.Add(r);
                    }
                    if (_lstVRecord.Count > 0)
                    {
                        dg.ItemsSource   = _lstVRecord;
                        dg.SelectedIndex = 0;

                        RdoSelect(_lstVRecord[0]);
                    }
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString());
            }
        }
 void Get_VDInfoCompleted(object sender, Get_VDInfoCompletedEventArgs e)
 {
     if (e.Result != null)
     {
         ObservableCollection<T_OA_VEHICLEDISPATCH> vhdch = e.Result;
         if (vhdch != null)
         {
             vehicleDispatch = vhdch[0];
         }
         // by ldx
         // 2011-08-09
         // 修改这里多次调用
         if (vehicleDispatch != null)
         {
             SetFormDefalueValue(vehicleDispatch);
         }
         RefreshUI(RefreshedTypes.AuditInfo);
         RefreshUI(RefreshedTypes.All);
         //Load_Data();
     }
 }
        //获取已经派车的申请用车数据
        void Get_VDInfoCompleted(object sender, Get_VDInfoCompletedEventArgs e)
        {
            try
            {
                if (e.Error != null && e.Error.Message != "")
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
                }
                _lstVRecord.Clear();
                ObservableCollection<T_OA_VEHICLEDISPATCH> lst = e.Result;
                if (lst != null)
                {
                    foreach (T_OA_VEHICLEDISPATCHDETAIL info in lst[0].T_OA_VEHICLEDISPATCHDETAIL.ToList())
                    //foreach (T_OA_VEHICLEDISPATCHDETAIL info in lst[0].tToList())
                    {
                        T_OA_VEHICLEDISPATCHRECORD r = new T_OA_VEHICLEDISPATCHRECORD();
                        r.T_OA_VEHICLEDISPATCHDETAIL = info;
                        r.T_OA_VEHICLEDISPATCHDETAIL.T_OA_VEHICLEDISPATCH = info.T_OA_VEHICLEDISPATCH;

                        r.T_OA_VEHICLEDISPATCHDETAIL.VEHICLEDISPATCHDETAILID = info.VEHICLEDISPATCHDETAILID;
                        r.T_OA_VEHICLEDISPATCHDETAIL.T_OA_VEHICLEDISPATCH.VEHICLEDISPATCHID = info.T_OA_VEHICLEDISPATCH.VEHICLEDISPATCHID;
                        r.T_OA_VEHICLEDISPATCHDETAIL.T_OA_VEHICLEDISPATCH.DRIVER = info.T_OA_VEHICLEDISPATCH.DRIVER;
                        r.T_OA_VEHICLEDISPATCHDETAIL.T_OA_VEHICLEDISPATCH.T_OA_VEHICLE = frmD._lstVDispatch[0].T_OA_VEHICLE;

                        r.STARTTIME = info.T_OA_VEHICLEDISPATCH.STARTTIME;
                        r.ENDTIME = info.T_OA_VEHICLEDISPATCH.ENDTIME;
                        r.NUM = info.T_OA_VEHICLEDISPATCH.NUM;
                        r.ROUTE = info.T_OA_VEHICLEDISPATCH.ROUTE;
                        r.TEL = info.T_OA_VEHICLEDISPATCH.TEL;

                        r.FUEL = decimal.Parse("0.00");
                        r.RANGE = "0.00";
                        r.CONTENT = "";
                        //r.ISCHARGE = ckbHasFee.IsChecked == true ? "1" : "0";
                        //r.CHARGEMONEY = txtFee.Text == "" ? decimal.Parse("0.00") : decimal.Parse(txtFee.Text);

                        r.CREATECOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                        r.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                        r.CREATEUSERID = Common.CurrentLoginUserInfo.EmployeeID;
                        r.CREATEUSERNAME = Common.CurrentLoginUserInfo.EmployeeName;
                        r.CREATEPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
                        r.CREATEDATE = DateTime.Now;

                        r.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
                        r.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
                        r.OWNERID = Common.CurrentLoginUserInfo.EmployeeID;
                        r.OWNERNAME = Common.CurrentLoginUserInfo.EmployeeName;
                        r.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID;

                        r.CHECKSTATE = "0";
                        _lstVRecord.Add(r);
                    }
                    if (_lstVRecord.Count > 0)
                    {
                        dg.ItemsSource = _lstVRecord;
                        dg.SelectedIndex = 0;

                        RdoSelect(_lstVRecord[0]);
                    }
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString());
            }
        }
        void Get_VDInfoCompleted(object sender, Get_VDInfoCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                ObservableCollection<T_OA_VEHICLEDISPATCH> o = e.Result;
                VehicleDispatch = o[0];
                SetFormDefalueValue(VehicleDispatch);

                RefreshUI(RefreshedTypes.AuditInfo);
                RefreshUI(RefreshedTypes.All);
                Load_Data();   //add by zl
            }
        }