步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.4 KiB

using BBWY.Client.APIServices.QiKu;
using BBWY.Client.Models;
using BBWY.Controls;
using EnumsNET;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using WebSocketSharp;
namespace BBWY.Client.Views.QualityTask
{
/// <summary>
/// AddExceptionWindow.xaml 的交互逻辑
/// </summary>
public partial class AddExceptionWindow : BWindow
{
public AddExceptionWindow(QualityTaskService qualityTaskService, long taskId)
{
InitializeComponent();
this.qualityTaskService = qualityTaskService;
this.TaskId = taskId;
this.DataContext = this;
}
QualityTaskService qualityTaskService;
private long taskId;
/// <summary>
/// 任务id
/// </summary>
public long TaskId { get=> taskId; set {Set(ref taskId,value); } }
private TaskExceptionType taskExceptionType;
/// <summary>
/// 验收异常类型
/// </summary>
public TaskExceptionType TaskExceptionType { get => taskExceptionType; set { Set(ref taskExceptionType, value); } }
private List<TaskExceptionType> taskExceptionTypeList=new List<TaskExceptionType> {
TaskExceptionType.
};
/// <summary>
/// 验收异常类型
/// </summary>
public List< TaskExceptionType> TaskExceptionTypeList { get => taskExceptionTypeList; set { Set(ref taskExceptionTypeList, value); } }
private string remarkMsg;
/// <summary>
/// 备注消息
/// </summary>
public string RemarkMsg { get => remarkMsg; set { Set(ref remarkMsg, value); } }
private void BButton_Click(object sender, RoutedEventArgs e)
{
if (RemarkMsg.IsNullOrEmpty())
{
MessageBox.Show("请输入具体问题描述.");
return;
}
var res = qualityTaskService.QualityTaskException(TaskId, TaskExceptionType, RemarkMsg);
if (res==null||!res.Success)
{
MessageBox.Show(res?.Msg);
return;
}
this.Close();
}
}
}