1111
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
|
||||
|
||||
using DH.Commons.Enums;
|
||||
|
||||
namespace DHSoftware.Views
|
||||
{
|
||||
public partial class AddCubicleControl : UserControl
|
||||
@ -7,11 +9,17 @@ namespace DHSoftware.Views
|
||||
private AntdUI.Window window;
|
||||
public bool submit;
|
||||
public string CubicleName;
|
||||
public EnumDetectionType DetectionType;
|
||||
public AddCubicleControl(AntdUI.Window _window,string TitleName)
|
||||
{
|
||||
this.window = _window;
|
||||
InitializeComponent();
|
||||
lbTitleName.Text = TitleName;
|
||||
sltdetectionType.Items.Clear();
|
||||
foreach (EnumDetectionType value in Enum.GetValues(typeof(EnumDetectionType)))
|
||||
{
|
||||
sltdetectionType.Items.Add(value.ToString());
|
||||
}
|
||||
// 绑定事件
|
||||
BindEventHandler();
|
||||
}
|
||||
@ -38,7 +46,14 @@ namespace DHSoftware.Views
|
||||
AntdUI.Message.warn(window, "工位名称不能为空!", autoClose: 3);
|
||||
return;
|
||||
}
|
||||
CubicleName=input_name.Text;
|
||||
if (String.IsNullOrEmpty(sltdetectionType.Text))
|
||||
{
|
||||
input_name.Status = AntdUI.TType.Error;
|
||||
AntdUI.Message.warn(window, "请选择检测类型!", autoClose: 3);
|
||||
return;
|
||||
}
|
||||
CubicleName =input_name.Text;
|
||||
DetectionType = (EnumDetectionType)sltdetectionType.SelectedIndex;
|
||||
submit = true;
|
||||
this.Dispose();
|
||||
}
|
||||
|
Reference in New Issue
Block a user