private void ButtonCreate_Click(object sender, RoutedEventArgs e) { var btn = (SimpleButton)sender; FaultType type = CreteFaultList.GetFaultType(btn.Uid); if (vm.CreateFaultOrder(type)) { DXMessageBox.Show("操作成功", "提示", MessageBoxButton.OK, MessageBoxImage.Information); //更新主界面此记录的状态 vm._DataModel.IsDisposed = Convert.ToInt32(CreteFaultList.GetState(type)); //IsCreateSuccess = true; this.Close(); } else { DXMessageBox.Show("操作失败", "提示", MessageBoxButton.OK, MessageBoxImage.Error); } }
public void GetCall_logData() { DataTable callData = CreteFaultList.GetOrder(AccessID, CallerID); if (callData.Rows.Count > 0) { //update IsInsert = false; DataRow dr = callData.Rows[0]; if (dr["user_id"] != null) { var skvUser = UserDict.Find(skv => skv.Key == Convert.ToInt32(dr["user_id"])); if (skvUser != null) { User = skvUser; } } if (dr["department_id"] != null) { var skvDepartment = DepartmentDict.Find(skv => skv.Key == Convert.ToInt32(dr["department_id"])); if (skvDepartment != null) { Department = skvDepartment; } } if (dr["asset_type_id"] != null) { var skvAsset = AssetTypeDict.Find(skv => skv.Key == Convert.ToInt32(dr["asset_type_id"])); if (skvAsset != null) { AssetType = skvAsset; } } if (dr["breakdown_categ"] != null) { var skvFault = FaultDict.Find(skv => skv.Text == Convert.ToString(dr["breakdown_categ"])); if (skvFault != null) { BreakDownCate = skvFault; } } if (dr["company_id"] != null) { var skvCompany = CompanyDict.Find(skv => skv.Key == Convert.ToInt32(dr["company_id"])); if (skvCompany != null) { Company = skvCompany; } } if (dr["work_property"] != null) { var skvOrder = OrderDict.Find(skv => skv.Text == Convert.ToString(dr["work_property"])); if (skvOrder != null) { OrderType = skvOrder; } } if (dr["knowledge_id"] != null) { var skvKnow = KnowLedgeDict.Find(skv => skv.Key == Convert.ToInt32(dr["knowledge_id"])); if (skvKnow != null) { KnowLedge = skvKnow; } } if (dr["note_result"] != null) { Note_Result = Convert.ToString(dr["note_result"]); } if (dr["address"] != null) { Address = Convert.ToString(dr["address"]); } if (dr["note"] != null) { Note = Convert.ToString(dr["note"]); } //更新access数据库和web服务器状态一致 if (dr["state"] != null) { if (_DataModel.IsDisposed != Convert.ToInt32(dr["state"])) { _DataModel.IsDisposed = Convert.ToInt32(dr["state"]); CreteFaultList.UpdateIsCreate(AccessID, CreteFaultList.GetFaultType(_DataModel.IsDisposed.ToString())); } } } }