WinFrmUI/HStation.WinFrmUI.Organize.Core/00-UserControl/EmloyeeFrom.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Organize.Core/00-UserControl/EmloyeeInfoCtrl.Designer.cs
ÎļþÃû´Ó WinFrmUI/HStation.WinFrmUI.Organize.Core/00-UserControl/emloyeeFrom.Designer.cs ÐÞ¸Ä @@ -1,6 +1,6 @@ namespace HStation.WinFrmUI.Organize.Core._00_UserControl namespace HStation.WinFrmUI.Organize { partial class emloyeeFrom partial class EmloyeeInfoCtrl { /// <summary> /// å¿ éç设计å¨åéã @@ -31,10 +31,6 @@ components = new System.ComponentModel.Container(); DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule conditionValidationRule1 = new DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule(); DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule conditionValidationRule2 = new DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule(); DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule conditionValidationRule3 = new DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule(); DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule conditionValidationRule4 = new DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule(); DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule conditionValidationRule5 = new DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule(); DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule conditionValidationRule6 = new DevExpress.XtraEditors.DXErrorProvider.ConditionValidationRule(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); textEditQianMing = new DevExpress.XtraEditors.TextEdit(); EnglishNametextEdit = new DevExpress.XtraEditors.TextEdit(); @@ -42,10 +38,7 @@ ZhuangTaiimageComboBoxEdit = new DevExpress.XtraEditors.ImageComboBoxEdit(); comboBoxEdit1 = new DevExpress.XtraEditors.ComboBoxEdit(); checkedComboBoxEdit1 = new DevExpress.XtraEditors.CheckedComboBoxEdit(); BianQiantextEdit = new DevExpress.XtraEditors.TextEdit(); ZhuangTaicheckedComboBoxEdit = new DevExpress.XtraEditors.CheckedComboBoxEdit(); ChongZhicomboBoxEdit = new DevExpress.XtraEditors.ComboBoxEdit(); textEdit1 = new DevExpress.XtraEditors.TextEdit(); TouXiangpictureEdit = new DevExpress.XtraEditors.PictureEdit(); ZhiWutextEdit = new DevExpress.XtraEditors.TextEdit(); YouXiangtextEdit = new DevExpress.XtraEditors.TextEdit(); @@ -62,7 +55,6 @@ Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); @@ -72,10 +64,21 @@ emptySpaceItem4 = new DevExpress.XtraLayout.EmptySpaceItem(); emptySpaceItem5 = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem6 = new DevExpress.XtraLayout.EmptySpaceItem(); QianMingopenFileDialog = new OpenFileDialog(); dxValidationProviderBianHao = new DevExpress.XtraEditors.DXErrorProvider.DXValidationProvider(components); groupControl1 = new DevExpress.XtraEditors.GroupControl(); layoutControl = new DevExpress.XtraLayout.LayoutControl(); groupControl2 = new DevExpress.XtraEditors.GroupControl(); loginUserInfoCtrl = new LoginUserInfoCtrl(); checkEditCreateLogin = new DevExpress.XtraEditors.CheckEdit(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem21 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)textEditQianMing.Properties).BeginInit(); @@ -84,10 +87,7 @@ ((System.ComponentModel.ISupportInitialize)ZhuangTaiimageComboBoxEdit.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)comboBoxEdit1.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)checkedComboBoxEdit1.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)BianQiantextEdit.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)ZhuangTaicheckedComboBoxEdit.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)ChongZhicomboBoxEdit.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)textEdit1.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TouXiangpictureEdit.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)ZhiWutextEdit.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)YouXiangtextEdit.Properties).BeginInit(); @@ -104,7 +104,6 @@ ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit(); @@ -114,9 +113,22 @@ ((System.ComponentModel.ISupportInitialize)emptySpaceItem4).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem5).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem6).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxValidationProviderBianHao).BeginInit(); ((System.ComponentModel.ISupportInitialize)groupControl1).BeginInit(); groupControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)layoutControl).BeginInit(); layoutControl.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)groupControl2).BeginInit(); groupControl2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)checkEditCreateLogin.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem18).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem19).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem21).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem3).BeginInit(); SuspendLayout(); // // layoutControl1 @@ -127,10 +139,7 @@ layoutControl1.Controls.Add(ZhuangTaiimageComboBoxEdit); layoutControl1.Controls.Add(comboBoxEdit1); layoutControl1.Controls.Add(checkedComboBoxEdit1); layoutControl1.Controls.Add(BianQiantextEdit); layoutControl1.Controls.Add(ZhuangTaicheckedComboBoxEdit); layoutControl1.Controls.Add(ChongZhicomboBoxEdit); layoutControl1.Controls.Add(textEdit1); layoutControl1.Controls.Add(TouXiangpictureEdit); layoutControl1.Controls.Add(ZhiWutextEdit); layoutControl1.Controls.Add(YouXiangtextEdit); @@ -139,59 +148,55 @@ layoutControl1.Controls.Add(NametextEdit); layoutControl1.Dock = DockStyle.Fill; layoutControl1.HiddenItems.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem8, layoutControlItem11, layoutControlItem12, layoutControlItem13, layoutControlItem9, layoutControlItem10, layoutControlItem16 }); layoutControl1.Location = new Point(0, 0); layoutControl1.Location = new Point(2, 23); layoutControl1.Name = "layoutControl1"; layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(452, 344, 650, 400); layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(999, 308, 650, 400); layoutControl1.Root = Root; layoutControl1.Size = new Size(598, 216); layoutControl1.Size = new Size(482, 221); layoutControl1.TabIndex = 1; layoutControl1.Text = "layoutControl1"; // // textEditQianMing // textEditQianMing.Location = new Point(392, 60); textEditQianMing.Location = new Point(333, 117); textEditQianMing.Name = "textEditQianMing"; textEditQianMing.Size = new Size(184, 20); textEditQianMing.Size = new Size(127, 20); textEditQianMing.StyleController = layoutControl1; textEditQianMing.TabIndex = 9; conditionValidationRule1.ConditionOperator = DevExpress.XtraEditors.DXErrorProvider.ConditionOperator.IsNotBlank; conditionValidationRule1.ErrorText = "This value is not valid"; conditionValidationRule1.ErrorType = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Information; dxValidationProviderBianHao.SetValidationRule(textEditQianMing, conditionValidationRule1); // // EnglishNametextEdit // EnglishNametextEdit.Location = new Point(392, 36); EnglishNametextEdit.Location = new Point(333, 93); EnglishNametextEdit.Name = "EnglishNametextEdit"; EnglishNametextEdit.Size = new Size(184, 20); EnglishNametextEdit.Size = new Size(127, 20); EnglishNametextEdit.StyleController = layoutControl1; EnglishNametextEdit.TabIndex = 3; // // ChongZhiimageComboBoxEdit // ChongZhiimageComboBoxEdit.EditValue = "0"; ChongZhiimageComboBoxEdit.Location = new Point(392, 132); ChongZhiimageComboBoxEdit.Location = new Point(353, 189); ChongZhiimageComboBoxEdit.Name = "ChongZhiimageComboBoxEdit"; ChongZhiimageComboBoxEdit.Properties.Appearance.Options.UseTextOptions = true; ChongZhiimageComboBoxEdit.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; ChongZhiimageComboBoxEdit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); ChongZhiimageComboBoxEdit.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { new DevExpress.XtraEditors.Controls.ImageComboBoxItem("å¦", "0", -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("æ¯", "1", -1) }); ChongZhiimageComboBoxEdit.Size = new Size(50, 20); ChongZhiimageComboBoxEdit.Size = new Size(107, 20); ChongZhiimageComboBoxEdit.StyleController = layoutControl1; ChongZhiimageComboBoxEdit.TabIndex = 8; // // ZhuangTaiimageComboBoxEdit // ZhuangTaiimageComboBoxEdit.EditValue = "1"; ZhuangTaiimageComboBoxEdit.Location = new Point(104, 132); ZhuangTaiimageComboBoxEdit.Location = new Point(104, 189); ZhuangTaiimageComboBoxEdit.Name = "ZhuangTaiimageComboBoxEdit"; ZhuangTaiimageComboBoxEdit.Properties.Appearance.Options.UseTextOptions = true; ZhuangTaiimageComboBoxEdit.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; ZhuangTaiimageComboBoxEdit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); ZhuangTaiimageComboBoxEdit.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { new DevExpress.XtraEditors.Controls.ImageComboBoxItem("离è", "0", -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("å¨è", "1", -1) }); ZhuangTaiimageComboBoxEdit.Size = new Size(50, 20); ZhuangTaiimageComboBoxEdit.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { new DevExpress.XtraEditors.Controls.ImageComboBoxItem("离è", "离è", -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("å¨è", "å¨è", -1) }); ZhuangTaiimageComboBoxEdit.Size = new Size(106, 20); ZhuangTaiimageComboBoxEdit.StyleController = layoutControl1; ZhuangTaiimageComboBoxEdit.TabIndex = 7; conditionValidationRule2.ConditionOperator = DevExpress.XtraEditors.DXErrorProvider.ConditionOperator.IsNotBlank; conditionValidationRule2.ErrorText = "This value is not valid"; conditionValidationRule2.ErrorType = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Information; dxValidationProviderBianHao.SetValidationRule(ZhuangTaiimageComboBoxEdit, conditionValidationRule2); // // comboBoxEdit1 // @@ -211,131 +216,90 @@ checkedComboBoxEdit1.StyleController = layoutControl1; checkedComboBoxEdit1.TabIndex = 1; // // BianQiantextEdit // BianQiantextEdit.Location = new Point(96, 134); BianQiantextEdit.Name = "BianQiantextEdit"; BianQiantextEdit.Size = new Size(281, 20); BianQiantextEdit.StyleController = layoutControl1; BianQiantextEdit.TabIndex = 1; // // ZhuangTaicheckedComboBoxEdit // ZhuangTaicheckedComboBoxEdit.EditValue = "è¯·éæ©...."; ZhuangTaicheckedComboBoxEdit.Location = new Point(294, 110); ZhuangTaicheckedComboBoxEdit.Location = new Point(0, 0); ZhuangTaicheckedComboBoxEdit.Name = "ZhuangTaicheckedComboBoxEdit"; ZhuangTaicheckedComboBoxEdit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); ZhuangTaicheckedComboBoxEdit.Size = new Size(87, 20); ZhuangTaicheckedComboBoxEdit.Size = new Size(100, 20); ZhuangTaicheckedComboBoxEdit.StyleController = layoutControl1; ZhuangTaicheckedComboBoxEdit.TabIndex = 1; // // ChongZhicomboBoxEdit // ChongZhicomboBoxEdit.EditValue = "è¯·éæ©..."; ChongZhicomboBoxEdit.Location = new Point(136, 110); ChongZhicomboBoxEdit.Name = "ChongZhicomboBoxEdit"; ChongZhicomboBoxEdit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); ChongZhicomboBoxEdit.Size = new Size(50, 20); ChongZhicomboBoxEdit.StyleController = layoutControl1; ChongZhicomboBoxEdit.TabIndex = 1; ChongZhicomboBoxEdit.ToolTip = "æ¯\r\nå¦"; // // textEdit1 // textEdit1.Location = new Point(108, 110); textEdit1.Name = "textEdit1"; textEdit1.Size = new Size(84, 20); textEdit1.StyleController = layoutControl1; textEdit1.TabIndex = 1; ZhuangTaicheckedComboBoxEdit.TabIndex = 10; // // TouXiangpictureEdit // TouXiangpictureEdit.Location = new Point(104, 156); TouXiangpictureEdit.Location = new Point(104, 12); TouXiangpictureEdit.Name = "TouXiangpictureEdit"; TouXiangpictureEdit.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; TouXiangpictureEdit.Properties.ShowCameraMenuItem = DevExpress.XtraEditors.Controls.CameraMenuItemVisibility.Auto; TouXiangpictureEdit.Size = new Size(472, 48); TouXiangpictureEdit.Size = new Size(95, 53); TouXiangpictureEdit.StyleController = layoutControl1; TouXiangpictureEdit.TabIndex = 1; TouXiangpictureEdit.Click += TouXiangpictureEdit_Click; // // ZhiWutextEdit // ZhiWutextEdit.Location = new Point(104, 84); ZhiWutextEdit.Location = new Point(104, 141); ZhiWutextEdit.Name = "ZhiWutextEdit"; ZhiWutextEdit.Size = new Size(472, 20); ZhiWutextEdit.Size = new Size(356, 20); ZhiWutextEdit.StyleController = layoutControl1; ZhiWutextEdit.TabIndex = 5; conditionValidationRule3.ConditionOperator = DevExpress.XtraEditors.DXErrorProvider.ConditionOperator.IsNotBlank; conditionValidationRule3.ErrorText = "This value is not valid"; conditionValidationRule3.ErrorType = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Information; dxValidationProviderBianHao.SetValidationRule(ZhiWutextEdit, conditionValidationRule3); // // YouXiangtextEdit // YouXiangtextEdit.Location = new Point(104, 108); YouXiangtextEdit.Location = new Point(104, 165); YouXiangtextEdit.Name = "YouXiangtextEdit"; YouXiangtextEdit.Size = new Size(472, 20); YouXiangtextEdit.Size = new Size(356, 20); YouXiangtextEdit.StyleController = layoutControl1; YouXiangtextEdit.TabIndex = 6; // // DianHuatextEdit // DianHuatextEdit.Location = new Point(104, 60); DianHuatextEdit.Location = new Point(104, 117); DianHuatextEdit.Name = "DianHuatextEdit"; DianHuatextEdit.Size = new Size(192, 20); DianHuatextEdit.Size = new Size(133, 20); DianHuatextEdit.StyleController = layoutControl1; DianHuatextEdit.TabIndex = 4; conditionValidationRule4.ConditionOperator = DevExpress.XtraEditors.DXErrorProvider.ConditionOperator.IsNotBlank; conditionValidationRule4.ErrorText = "This value is not valid"; conditionValidationRule4.ErrorType = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Information; dxValidationProviderBianHao.SetValidationRule(DianHuatextEdit, conditionValidationRule4); // // textEditBianHao // textEditBianHao.Location = new Point(104, 12); textEditBianHao.Location = new Point(104, 69); textEditBianHao.Name = "textEditBianHao"; textEditBianHao.Properties.Appearance.ForeColor = Color.Black; textEditBianHao.Properties.Appearance.Options.UseForeColor = true; textEditBianHao.Size = new Size(248, 20); textEditBianHao.Size = new Size(178, 20); textEditBianHao.StyleController = layoutControl1; textEditBianHao.TabIndex = 0; conditionValidationRule5.ConditionOperator = DevExpress.XtraEditors.DXErrorProvider.ConditionOperator.IsNotBlank; conditionValidationRule5.ErrorText = "This value is not valid"; conditionValidationRule5.ErrorType = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Information; dxValidationProviderBianHao.SetValidationRule(textEditBianHao, conditionValidationRule5); conditionValidationRule1.ConditionOperator = DevExpress.XtraEditors.DXErrorProvider.ConditionOperator.IsNotBlank; conditionValidationRule1.ErrorText = "This value is not valid"; conditionValidationRule1.ErrorType = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Information; dxValidationProviderBianHao.SetValidationRule(textEditBianHao, conditionValidationRule1); // // NametextEdit // NametextEdit.AllowHtmlTextInToolTip = DevExpress.Utils.DefaultBoolean.True; NametextEdit.EditValue = ""; NametextEdit.Location = new Point(104, 36); NametextEdit.Location = new Point(104, 93); NametextEdit.Name = "NametextEdit"; NametextEdit.Size = new Size(192, 20); NametextEdit.Size = new Size(133, 20); NametextEdit.StyleController = layoutControl1; NametextEdit.TabIndex = 2; conditionValidationRule6.ConditionOperator = DevExpress.XtraEditors.DXErrorProvider.ConditionOperator.IsNotBlank; conditionValidationRule6.ErrorText = "This value is not valid"; conditionValidationRule6.ErrorType = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Information; dxValidationProviderBianHao.SetValidationRule(NametextEdit, conditionValidationRule6); conditionValidationRule2.ConditionOperator = DevExpress.XtraEditors.DXErrorProvider.ConditionOperator.IsNotBlank; conditionValidationRule2.ErrorText = "This value is not valid"; conditionValidationRule2.ErrorType = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Information; dxValidationProviderBianHao.SetValidationRule(NametextEdit, conditionValidationRule2); // // layoutControlItem8 // layoutControlItem8.Control = textEdit1; layoutControlItem8.Location = new Point(0, 98); layoutControlItem8.Location = new Point(0, 0); layoutControlItem8.Name = "layoutControlItem8"; layoutControlItem8.Size = new Size(184, 48); layoutControlItem8.Text = "ç»ééç½®å¯ç ï¼"; layoutControlItem8.Size = new Size(0, 0); layoutControlItem8.TextSize = new Size(50, 20); // // layoutControlItem11 // layoutControlItem11.Control = BianQiantextEdit; layoutControlItem11.Location = new Point(0, 122); layoutControlItem11.Location = new Point(0, 0); layoutControlItem11.Name = "layoutControlItem11"; layoutControlItem11.Size = new Size(369, 47); layoutControlItem11.Text = "æ ç¾ï¼"; layoutControlItem11.TextSize = new Size(72, 14); layoutControlItem11.Size = new Size(0, 0); layoutControlItem11.TextSize = new Size(50, 20); // // layoutControlItem12 // @@ -355,12 +319,10 @@ // // layoutControlItem9 // layoutControlItem9.Control = ChongZhicomboBoxEdit; layoutControlItem9.Location = new Point(0, 98); layoutControlItem9.Location = new Point(0, 0); layoutControlItem9.Name = "layoutControlItem9"; layoutControlItem9.Size = new Size(178, 24); layoutControlItem9.Text = "ç»å½éç½®å¯ç "; layoutControlItem9.TextSize = new Size(72, 14); layoutControlItem9.Size = new Size(0, 0); layoutControlItem9.TextSize = new Size(50, 20); // // layoutControlItem10 // @@ -382,9 +344,9 @@ // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, layoutControlItem5, layoutControlItem7, layoutControlItem1, layoutControlItem6, layoutControlItem14, layoutControlItem17, layoutControlItem2, layoutControlItem3, emptySpaceItem4, emptySpaceItem5, layoutControlItem15, emptySpaceItem1, emptySpaceItem2 }); Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, layoutControlItem5, layoutControlItem1, layoutControlItem6, layoutControlItem14, layoutControlItem17, layoutControlItem2, layoutControlItem3, emptySpaceItem4, emptySpaceItem5, layoutControlItem15, emptySpaceItem2, layoutControlItem7, emptySpaceItem6 }); Root.Name = "Root"; Root.Size = new Size(598, 216); Root.Size = new Size(482, 221); Root.TextVisible = false; // // layoutControlItem4 @@ -392,10 +354,10 @@ layoutControlItem4.AppearanceItemCaption.Options.UseTextOptions = true; layoutControlItem4.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlItem4.Control = DianHuatextEdit; layoutControlItem4.Location = new Point(0, 48); layoutControlItem4.Location = new Point(0, 105); layoutControlItem4.Name = "layoutControlItem4"; layoutControlItem4.Size = new Size(288, 24); layoutControlItem4.Text = "*çµ è¯:"; layoutControlItem4.Size = new Size(229, 24); layoutControlItem4.Text = "çµ è¯:"; layoutControlItem4.TextSize = new Size(80, 14); // // layoutControlItem5 @@ -403,23 +365,11 @@ layoutControlItem5.AppearanceItemCaption.Options.UseTextOptions = true; layoutControlItem5.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlItem5.Control = YouXiangtextEdit; layoutControlItem5.Location = new Point(0, 96); layoutControlItem5.Location = new Point(0, 153); layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(568, 24); layoutControlItem5.Size = new Size(452, 24); layoutControlItem5.Text = "é® ç®±:"; layoutControlItem5.TextSize = new Size(80, 14); // // layoutControlItem7 // layoutControlItem7.AppearanceItemCaption.Options.UseTextOptions = true; layoutControlItem7.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlItem7.AppearanceItemCaption.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem7.Control = TouXiangpictureEdit; layoutControlItem7.Location = new Point(0, 144); layoutControlItem7.Name = "layoutControlItem7"; layoutControlItem7.Size = new Size(568, 52); layoutControlItem7.Text = "头 å:"; layoutControlItem7.TextSize = new Size(80, 14); // // layoutControlItem1 // @@ -427,9 +377,9 @@ layoutControlItem1.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlItem1.Control = textEditBianHao; layoutControlItem1.ImageOptions.AllowGlyphSkinning = DevExpress.Utils.DefaultBoolean.True; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Location = new Point(0, 57); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(344, 24); layoutControlItem1.Size = new Size(274, 24); layoutControlItem1.Text = "*ç¼ å·:"; layoutControlItem1.TextSize = new Size(80, 14); // @@ -438,10 +388,10 @@ layoutControlItem6.AppearanceItemCaption.Options.UseTextOptions = true; layoutControlItem6.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlItem6.Control = ZhiWutextEdit; layoutControlItem6.Location = new Point(0, 72); layoutControlItem6.Location = new Point(0, 129); layoutControlItem6.Name = "layoutControlItem6"; layoutControlItem6.Size = new Size(568, 24); layoutControlItem6.Text = "*è å¡:"; layoutControlItem6.Size = new Size(452, 24); layoutControlItem6.Text = "è å¡:"; layoutControlItem6.TextSize = new Size(80, 14); // // layoutControlItem14 @@ -449,9 +399,9 @@ layoutControlItem14.AppearanceItemCaption.Options.UseTextOptions = true; layoutControlItem14.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlItem14.Control = ZhuangTaiimageComboBoxEdit; layoutControlItem14.Location = new Point(0, 120); layoutControlItem14.Location = new Point(0, 177); layoutControlItem14.Name = "layoutControlItem14"; layoutControlItem14.Size = new Size(146, 24); layoutControlItem14.Size = new Size(202, 24); layoutControlItem14.Text = "å¨èç¶æ:"; layoutControlItem14.TextSize = new Size(80, 14); // @@ -460,9 +410,9 @@ layoutControlItem17.AppearanceItemCaption.Options.UseTextOptions = true; layoutControlItem17.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlItem17.Control = ChongZhiimageComboBoxEdit; layoutControlItem17.Location = new Point(288, 120); layoutControlItem17.Location = new Point(249, 177); layoutControlItem17.Name = "layoutControlItem17"; layoutControlItem17.Size = new Size(146, 24); layoutControlItem17.Size = new Size(203, 24); layoutControlItem17.Text = " ç»å½éç½®å¯ç :"; layoutControlItem17.TextSize = new Size(80, 14); // @@ -471,11 +421,11 @@ layoutControlItem2.AppearanceItemCaption.Options.UseTextOptions = true; layoutControlItem2.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlItem2.Control = NametextEdit; layoutControlItem2.Location = new Point(0, 24); layoutControlItem2.Location = new Point(0, 81); layoutControlItem2.MaxSize = new Size(0, 24); layoutControlItem2.MinSize = new Size(150, 24); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(288, 24); layoutControlItem2.Size = new Size(229, 24); layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; layoutControlItem2.Text = "*å§ å:"; layoutControlItem2.TextSize = new Size(80, 14); @@ -485,26 +435,26 @@ layoutControlItem3.AppearanceItemCaption.Options.UseTextOptions = true; layoutControlItem3.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlItem3.Control = EnglishNametextEdit; layoutControlItem3.Location = new Point(288, 24); layoutControlItem3.Location = new Point(229, 81); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(280, 24); layoutControlItem3.Size = new Size(223, 24); layoutControlItem3.Text = "LastNameï¼"; layoutControlItem3.TextSize = new Size(80, 14); // // emptySpaceItem4 // emptySpaceItem4.AllowHotTrack = false; emptySpaceItem4.Location = new Point(568, 0); emptySpaceItem4.Location = new Point(452, 57); emptySpaceItem4.Name = "emptySpaceItem4"; emptySpaceItem4.Size = new Size(10, 196); emptySpaceItem4.Size = new Size(10, 144); emptySpaceItem4.TextSize = new Size(0, 0); // // emptySpaceItem5 // emptySpaceItem5.AllowHotTrack = false; emptySpaceItem5.Location = new Point(344, 0); emptySpaceItem5.Location = new Point(274, 57); emptySpaceItem5.Name = "emptySpaceItem5"; emptySpaceItem5.Size = new Size(224, 24); emptySpaceItem5.Size = new Size(178, 24); emptySpaceItem5.TextSize = new Size(0, 0); // // layoutControlItem15 @@ -516,40 +466,147 @@ layoutControlItem15.AppearanceItemCaptionDisabled.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; layoutControlItem15.AppearanceItemCaptionDisabled.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem15.Control = textEditQianMing; layoutControlItem15.Location = new Point(288, 48); layoutControlItem15.Location = new Point(229, 105); layoutControlItem15.Name = "layoutControlItem15"; layoutControlItem15.Size = new Size(280, 24); layoutControlItem15.Text = "*ç¾ åï¼"; layoutControlItem15.Size = new Size(223, 24); layoutControlItem15.Text = "ç¾ åï¼"; layoutControlItem15.TextSize = new Size(80, 14); // // emptySpaceItem1 // emptySpaceItem1.AllowHotTrack = false; emptySpaceItem1.Location = new Point(434, 120); emptySpaceItem1.Name = "emptySpaceItem1"; emptySpaceItem1.Size = new Size(134, 24); emptySpaceItem1.TextSize = new Size(0, 0); // // emptySpaceItem2 // emptySpaceItem2.AllowHotTrack = false; emptySpaceItem2.Location = new Point(146, 120); emptySpaceItem2.Location = new Point(202, 177); emptySpaceItem2.Name = "emptySpaceItem2"; emptySpaceItem2.Size = new Size(142, 24); emptySpaceItem2.Size = new Size(47, 24); emptySpaceItem2.TextSize = new Size(0, 0); // // layoutControlItem7 // layoutControlItem7.AppearanceItemCaption.Options.UseTextOptions = true; layoutControlItem7.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; layoutControlItem7.AppearanceItemCaption.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; layoutControlItem7.Control = TouXiangpictureEdit; layoutControlItem7.Location = new Point(0, 0); layoutControlItem7.Name = "layoutControlItem7"; layoutControlItem7.Size = new Size(191, 57); layoutControlItem7.Text = "头 å:"; layoutControlItem7.TextSize = new Size(80, 14); // // emptySpaceItem6 // emptySpaceItem6.AllowHotTrack = false; emptySpaceItem6.Location = new Point(191, 0); emptySpaceItem6.Name = "emptySpaceItem6"; emptySpaceItem6.Size = new Size(271, 57); emptySpaceItem6.TextSize = new Size(0, 0); // // QianMingopenFileDialog // QianMingopenFileDialog.FileName = "QianMingopenFileDialog"; QianMingopenFileDialog.Filter = "(*.jpg|*.JPG|*.png|*.PNG|*.jpeg|*.JPEG)"; // // emloyeeFrom // groupControl1 // groupControl1.Controls.Add(layoutControl1); groupControl1.Location = new Point(12, 12); groupControl1.Name = "groupControl1"; groupControl1.Size = new Size(486, 246); groupControl1.TabIndex = 2; groupControl1.Text = "å工信æ¯"; // // layoutControl // layoutControl.Controls.Add(groupControl2); layoutControl.Controls.Add(checkEditCreateLogin); layoutControl.Controls.Add(groupControl1); layoutControl.Dock = DockStyle.Fill; layoutControl.Location = new Point(0, 0); layoutControl.Name = "layoutControl"; layoutControl.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(890, 165, 650, 400); layoutControl.Root = layoutControlGroup1; layoutControl.Size = new Size(510, 426); layoutControl.TabIndex = 3; layoutControl.Text = "layoutControl2"; // // groupControl2 // groupControl2.Controls.Add(loginUserInfoCtrl); groupControl2.Location = new Point(12, 286); groupControl2.Name = "groupControl2"; groupControl2.Size = new Size(486, 128); groupControl2.TabIndex = 6; groupControl2.Text = "ç¨æ·ä¿¡æ¯"; // // loginUserInfoCtrl // loginUserInfoCtrl.Dock = DockStyle.Fill; loginUserInfoCtrl.Location = new Point(2, 23); loginUserInfoCtrl.Name = "loginUserInfoCtrl"; loginUserInfoCtrl.Size = new Size(482, 103); loginUserInfoCtrl.TabIndex = 5; loginUserInfoCtrl.UseWaitCursor = true; // // checkEditCreateLogin // checkEditCreateLogin.Location = new Point(12, 262); checkEditCreateLogin.Name = "checkEditCreateLogin"; checkEditCreateLogin.Properties.Caption = "åå»ºç¨æ·"; checkEditCreateLogin.Size = new Size(126, 20); checkEditCreateLogin.StyleController = layoutControl; checkEditCreateLogin.TabIndex = 4; checkEditCreateLogin.CheckedChanged += checkEditCreateLogin_CheckedChanged; // // layoutControlGroup1 // layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; layoutControlGroup1.GroupBordersVisible = false; layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem18, layoutControlItem19, layoutControlItem21, emptySpaceItem3 }); layoutControlGroup1.Name = "Root"; layoutControlGroup1.Size = new Size(510, 426); layoutControlGroup1.TextVisible = false; // // layoutControlItem18 // layoutControlItem18.Control = groupControl1; layoutControlItem18.Location = new Point(0, 0); layoutControlItem18.Name = "layoutControlItem18"; layoutControlItem18.Size = new Size(490, 250); layoutControlItem18.TextSize = new Size(0, 0); layoutControlItem18.TextVisible = false; // // layoutControlItem19 // layoutControlItem19.Control = checkEditCreateLogin; layoutControlItem19.Location = new Point(0, 250); layoutControlItem19.Name = "layoutControlItem19"; layoutControlItem19.Size = new Size(130, 24); layoutControlItem19.TextSize = new Size(0, 0); layoutControlItem19.TextVisible = false; // // layoutControlItem21 // layoutControlItem21.Control = groupControl2; layoutControlItem21.Location = new Point(0, 274); layoutControlItem21.Name = "layoutControlItem21"; layoutControlItem21.Size = new Size(490, 132); layoutControlItem21.TextSize = new Size(0, 0); layoutControlItem21.TextVisible = false; // // emptySpaceItem3 // emptySpaceItem3.AllowHotTrack = false; emptySpaceItem3.Location = new Point(130, 250); emptySpaceItem3.Name = "emptySpaceItem3"; emptySpaceItem3.Size = new Size(360, 24); emptySpaceItem3.TextSize = new Size(0, 0); // // EmloyeeInfoCtrl // AutoScaleDimensions = new SizeF(7F, 17F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); Name = "emloyeeFrom"; Size = new Size(598, 216); Controls.Add(layoutControl); Name = "EmloyeeInfoCtrl"; Size = new Size(510, 426); ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)textEditQianMing.Properties).EndInit(); @@ -558,10 +615,7 @@ ((System.ComponentModel.ISupportInitialize)ZhuangTaiimageComboBoxEdit.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)comboBoxEdit1.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)checkedComboBoxEdit1.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)BianQiantextEdit.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)ZhuangTaicheckedComboBoxEdit.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)ChongZhicomboBoxEdit.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)textEdit1.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TouXiangpictureEdit.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)ZhiWutextEdit.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)YouXiangtextEdit.Properties).EndInit(); @@ -578,7 +632,6 @@ ((System.ComponentModel.ISupportInitialize)Root).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit(); @@ -588,9 +641,22 @@ ((System.ComponentModel.ISupportInitialize)emptySpaceItem4).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem5).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem6).EndInit(); ((System.ComponentModel.ISupportInitialize)dxValidationProviderBianHao).EndInit(); ((System.ComponentModel.ISupportInitialize)groupControl1).EndInit(); groupControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)layoutControl).EndInit(); layoutControl.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)groupControl2).EndInit(); groupControl2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)checkEditCreateLogin.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem18).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem19).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem21).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem3).EndInit(); ResumeLayout(false); } @@ -611,11 +677,8 @@ private OpenFileDialog QianMingopenFileDialog; private DevExpress.XtraEditors.PictureEdit TouXiangpictureEdit; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraEditors.TextEdit textEdit1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; private DevExpress.XtraEditors.TextEdit BianQiantextEdit; private DevExpress.XtraEditors.CheckedComboBoxEdit ZhuangTaicheckedComboBoxEdit; private DevExpress.XtraEditors.ComboBoxEdit ChongZhicomboBoxEdit; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; @@ -625,7 +688,6 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; //private DevExpress.XtraEditors.ImageComboBoxEdit ZhuangTaicheckedComboBox; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16; private DevExpress.XtraEditors.ImageComboBoxEdit ChongZhiimageComboBoxEdit; private DevExpress.XtraEditors.ImageComboBoxEdit ZhuangTaiimageComboBoxEdit; @@ -637,7 +699,17 @@ private DevExpress.XtraEditors.TextEdit textEditQianMing; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem4; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem5; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; private DevExpress.XtraEditors.GroupControl groupControl1; private DevExpress.XtraLayout.LayoutControl layoutControl; private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; private DevExpress.XtraEditors.CheckEdit checkEditCreateLogin; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem19; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem6; private LoginUserInfoCtrl loginUserInfoCtrl; private DevExpress.XtraEditors.GroupControl groupControl2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem21; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3; } } WinFrmUI/HStation.WinFrmUI.Organize.Core/00-UserControl/EmloyeeInfoCtrl.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,242 @@ using DevExpress.DocumentView.Native; using DevExpress.Mvvm.POCO; using Furion.LinqBuilder; using System.Text.RegularExpressions; using Yw.Entity; namespace HStation.WinFrmUI.Organize { public partial class EmloyeeInfoCtrl : UserControl { /// <summary> /// / /// </summary> public EmloyeeInfoCtrl() { InitializeComponent(); } HStation.BLL.EmployeeMain _service; HStation.Vmo.EmployeeMain _employee; int staffstatus; public void ShowBangDingData(HStation.Vmo.EmployeeMain employee)//å±ç¤ºæ¬æ§ä»¶æ°æ® { NametextEdit.Text = employee.FirstName;//å§å textEditBianHao.Text = employee.ErpCode;//ç¼å· ZhiWutextEdit.Text = employee.PositonName;//èå¡ DianHuatextEdit.Text = employee.Telephone;//çµè¯ textEditQianMing.Text = employee.DrawSignal;//ç¾å YouXiangtextEdit.Text = employee.Email;//é®ç®± ChongZhiimageComboBoxEdit.SelectedIndex = employee.RequirePasswordReset;//éç½®å¯ç if (employee.StaffStatus.ToString() == "å¨è") { staffstatus = 1; } else { staffstatus = 0; } ZhuangTaiimageComboBoxEdit.SelectedIndex = staffstatus;//å¨èç¶æ EnglishNametextEdit.Text = employee.LastName;//å§å è±æ } public HStation.Vmo.EmployeeMain ReadCtrlData(out string error)//ä¼ å ¥æ¬æ§ä»¶æ°æ® { error = ""; HStation.Vmo.EmployeeMain employee = new Vmo.EmployeeMain(); dxValidationProviderBianHao.Validate(); if (String.IsNullOrEmpty(NametextEdit.Text) || String.IsNullOrEmpty(textEditBianHao.Text) ) { error = "å§åæç¼å·æªå¡«åï¼"; return null; } if (!String.IsNullOrEmpty(DianHuatextEdit.Text)) { if (DianHuatextEdit.Text.Length != 11) { error = "请è¾å ¥æ£ç¡®çµè¯å·ç ï¼"; return null; } foreach (char _Telephone in DianHuatextEdit.Text) { if (_Telephone < '0' && _Telephone > '9') { error = "请è¾å ¥æ£ç¡®çµè¯å·ç ï¼"; return null; } } } if (!Regex.IsMatch(YouXiangtextEdit.Text, @"^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$") && !String.IsNullOrEmpty(YouXiangtextEdit.Text)) { error = "请è¾å ¥æ£ç¡®çé®ç®±ï¼"; return null; } employee.FirstName = NametextEdit.Text; employee.ErpCode = textEditBianHao.Text; employee.PositonName = ZhiWutextEdit.Text; employee.Telephone = DianHuatextEdit.Text; employee.DrawSignal = textEditQianMing.Text; employee.Email = YouXiangtextEdit.Text; employee.RequirePasswordReset = ChongZhiimageComboBoxEdit.SelectedIndex; employee.StaffStatus = Vmo.eJobType.exist; employee.LastName = EnglishNametextEdit.Text; return employee; } public HStation.Vmo.EmployeeMain SetBindingData(HStation.Vmo.EmployeeMain employee, out string error) { error = ""; this._employee = employee; if (_employee.ErpCode == null)//æ·»å { //_employee.AddTime = DateTime.Now; //_employee.LastModifyTime = DateTime.Now.ToString(); _employee = ReadCtrlData(out error); if (_employee == null)//åºç°é误并è¿ånullåé误 { return null; } if (!string.IsNullOrEmpty(error)) { return null; } if (!checkEditCreateLogin.Checked) //没æéä¸åå»ºç¨æ· { //loginUserInfoCtrl.SetNoInput();//loginUserInfoCtrlæ§ä»¶ä¸å¯ç¼è¾ return _employee; } //loginUserInfoCtrl.SetOffInput();//loginUserInfoCtrlæ§ä»¶å¯ç¼è¾ if (loginUserInfoCtrl.NewBindingData(_employee.LoginAccount, out error) == null)//åºç°é误并è¿ånullåé误 { return null; } return _employee; } else//ä¿®æ¹ { //_employee.LastModifyTime = DateTime.Now.ToString(); _employee = ReadCtrlData(out error); if (!string.IsNullOrEmpty(error)) { return null; } if (!checkEditCreateLogin.Checked)//夿æ¯å¦æ°å»ºç¨æ· { return _employee; } else { if (loginUserInfoCtrl.NewBindingData(_employee.LoginAccount, out error) != null)//åºç°é误并è¿ånullåé误 { return null; } } return _employee; } } public void GetBindingData(HStation.Vmo.EmployeeMain employee, out string error)//ä¿®æ¹æ¶å±ç¤ºåä¿¡æ¯ { error = ""; if (employee == null) { error = "å ¥å为空ï¼"; return; } ShowBangDingData(employee); if (employee.LoginAccount != null) { loginUserInfoCtrl.SetNoInput(); checkEditCreateLogin.Visible = false; } //if (!checkEditCreateLogin.Checked)//å¤æè¯¥æ§ä»¶æ¯å¦å¯ç¼è¾ //{ // loginUserInfoCtrl.SetNoInput(); //} //else //{ // loginUserInfoCtrl.SetOffInput(); //} } //åªè¯» public void SetOnlyRead(HStation.Vmo.EmployeeMain employee, out string error) { error = ""; if (employee == null) { error = "å ¥å为空ï¼"; return; } ShowBangDingData(employee); } //public HStation.Vmo.EmployeeMain GetBindingData(out string error) //{ // if (this._employee == null) // { // error = "å ¥å为空"; // return null; // } // _employee.FirstName = NametextEdit.Text; // _employee.ErpCode = textEditBianHao.Text; // _employee.PositonName = ZhiWutextEdit.Text; // _employee.Telephone = DianHuatextEdit.Text; // _employee.DrawSignal = textEditQianMing.Text; // _employee.Email = YouXiangtextEdit.Text; // _employee.RequirePasswordReset = ChongZhiimageComboBoxEdit.SelectedIndex; // _employee.StaffStatus = ZhuangTaiimageComboBoxEdit.SelectedIndex; // _employee.LastName = EnglishNametextEdit.Text; // if (!dxValidationProviderBianHao.Validate()) // { // error = "wei......"; // return null; // } // error = "ing...."; // return _employee; //} private void TouXiangpictureEdit_Click(object sender, EventArgs e) { if (QianMingopenFileDialog.ShowDialog() != DialogResult.OK) { return; } string QianMingfilePath = QianMingopenFileDialog.FileName; if (QianMingfilePath == null) { return; } TouXiangpictureEdit.Image = Image.FromFile(QianMingfilePath); } private void checkEditCreateLogin_CheckedChanged(object sender, EventArgs e)//æé®ç¶æåçæ¹åæ¶ { if (checkEditCreateLogin.Checked) { loginUserInfoCtrl.SetOffInput(); } else { loginUserInfoCtrl.SetNoInput(); } } } } WinFrmUI/HStation.WinFrmUI.Organize.Core/00-UserControl/EmloyeeInfoCtrl.resx
WinFrmUI/HStation.WinFrmUI.Organize.Core/00-UserControl/LoginUserForm.cs
ÎļþÒÑɾ³ý WinFrmUI/HStation.WinFrmUI.Organize.Core/00-UserControl/LoginUserInfoCtrl.Designer.cs
ÎļþÃû´Ó WinFrmUI/HStation.WinFrmUI.Organize.Core/00-UserControl/LoginUserForm.Designer.cs ÐÞ¸Ä @@ -1,6 +1,6 @@ namespace HStation.WinFrmUI.Organize { partial class LoginUserForm partial class LoginUserInfoCtrl { /// <summary> /// Required designer variable. @@ -72,6 +72,7 @@ // // TextEditLoginName // TextEditLoginName.Enabled = false; TextEditLoginName.Location = new Point(106, 12); TextEditLoginName.Name = "TextEditLoginName"; TextEditLoginName.Size = new Size(310, 20); @@ -85,6 +86,7 @@ // // TextEditPassWord // TextEditPassWord.Enabled = false; TextEditPassWord.Location = new Point(106, 36); TextEditPassWord.Name = "TextEditPassWord"; TextEditPassWord.Size = new Size(310, 20); @@ -98,6 +100,7 @@ // // TextEditValidPassWord // TextEditValidPassWord.Enabled = false; TextEditValidPassWord.Location = new Point(106, 60); TextEditValidPassWord.Name = "TextEditValidPassWord"; TextEditValidPassWord.Size = new Size(310, 20); @@ -154,12 +157,12 @@ emptySpaceItem1.Size = new Size(408, 47); emptySpaceItem1.TextSize = new Size(0, 0); // // LoginUserForm // LoginUserInfoCtrl // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); Name = "LoginUserForm"; Name = "LoginUserInfoCtrl"; Size = new Size(428, 139); UseWaitCursor = true; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); WinFrmUI/HStation.WinFrmUI.Organize.Core/00-UserControl/LoginUserInfoCtrl.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,109 @@ using DevExpress.CodeParser; namespace HStation.WinFrmUI.Organize { public partial class LoginUserInfoCtrl : DevExpress.XtraEditors.XtraUserControl { public LoginUserInfoCtrl() { InitializeComponent(); } Vmo.UserLoginAccount _LoginAccount; public HStation.Vmo.UserLoginAccount NewBindingData(HStation.Vmo.UserLoginAccount LoginAccount, out string error)//æ°å»ºç¨æ· { error = ""; if(LoginAccount == null)//æ°å»ºä¸ä¸ªç¨æ· { _LoginAccount = new Vmo.UserLoginAccount(); } else { error = "ç¨æ·å·²ç»åå¨ï¼ä¸è½å次å建ï¼"; return null; } IsNoValid(out error); if (!string.IsNullOrEmpty(error)) { return null; } _LoginAccount.LoginName= TextEditLoginName.Text; _LoginAccount.PassWord = TextEditPassWord.Text; return _LoginAccount; } public bool ShowLoginName(HStation.Vmo.UserLoginAccount LoginAccount, out string error)//å±ç¤ºç¨æ·å { error = ""; if (LoginAccount == null)//夿ç®åæ¯å¦éè¦ä¿®æ¹ç¨æ·ä¿¡æ¯ { error = "ç¨æ·ä¸åå¨,è¯·éæ©æ°å»ºç¨æ·ï¼"; return false; } TextEditLoginName.Text = LoginAccount.LoginName;//å±ç¤ºç»å½ç¨æ·å return true; } //public HStation.Vmo.UserLoginAccount UpdateBindingData(HStation.Vmo.UserLoginAccount LoginAccount, out string error)//ä¿®æ¹ç¨æ· //{ // error = ""; // if(!ShowLoginName(LoginAccount, out error))//夿ç®åæ¯å¦éè¦ä¿®æ¹ç¨æ·ä¿¡æ¯ // { // error = "ç¨æ·ä¸åå¨,è¯·éæ©æ°å»ºç¨æ·ï¼"; // return null; // } // if(LoginAccount.LoginName == null || LoginAccount.PassWord ==null)//å¤æä¼ å ¥ç弿¯å¦æè¯¯ // { // error = "ç¨æ·åå¨ï¼ä½ä¼ å ¥ç¨æ·åæä¼ å ¥å¯ç 为空ï¼"; // return null; // } // IsNoValid(out error); // if (string.IsNullOrEmpty(error)) // { // return null; // } // _LoginAccount.LoginName = TextEditLoginName.Text; // _LoginAccount.PassWord = TextEditPassWord.Text; // return _LoginAccount; //} public void IsNoValid(out string error)//夿æ§ä»¶å¿ 填项 { error = ""; dxValidationProviderLoginUser.Validate(); if (String.IsNullOrEmpty(TextEditLoginName.Text)) { error = "ç¨æ·åä¿¡æ¯ä¸ºç©ºï¼"; return; } if (String.IsNullOrEmpty(TextEditPassWord.Text)) { error = "å¯ç 为空ï¼"; return; } if (String.IsNullOrEmpty(TextEditValidPassWord.Text)) { error = "确认å¯ç 为空ï¼"; return; } if (TextEditPassWord.Text != TextEditValidPassWord.Text) { error = "两次è¾å ¥å¯ç ä¸ä¸è´ï¼è¯·éæ°è¾å ¥ï¼"; return; } } public void SetNoInput() { TextEditLoginName.Enabled = false; TextEditPassWord.Enabled = false; TextEditValidPassWord.Enabled = false; } public void SetOffInput() { TextEditLoginName.Enabled = true; TextEditPassWord.Enabled = true; TextEditValidPassWord.Enabled = true; } } } WinFrmUI/HStation.WinFrmUI.Organize.Core/00-UserControl/LoginUserInfoCtrl.resx
WinFrmUI/HStation.WinFrmUI.Organize.Core/01-EmployeeViewModel/EmployeeViewModel.cs
@@ -1,40 +1,81 @@ using HStation.Dto; using HStation.Vmo; namespace HStation.WinFrmUI.Organize { public class EmployeeViewModel : EmployeeMainDto public class EmployeeViewModel { public EmployeeViewModel() { } public EmployeeViewModel(EmployeeMainDto rhs) { this.ID = rhs.ID; this.ErpCode = rhs.ErpCode;//ç¼å· this.PositonName = rhs.PositonName;//èä½å this.FirstName = rhs.FirstName;//å§å(è±æå°±æ¯ç¬¬ä¸ä¸ªå) this.LastName = rhs.LastName;//å§å(è±æå,æä¼ç¨å°) this.StaffStatus = rhs.StaffStatus;//å¨èç¶æ 1 å¨è 0 离è this.Telephone = rhs.Telephone;//ææºå· this.DrawSignal = rhs.DrawSignal;//ç¾å this.Email = rhs.Email;//çµåé®ç®± this.AddTime = rhs.AddTime;//æ·»å æ¶é´ this.AddUser = rhs.AddUser; this.RequirePasswordReset = rhs.RequirePasswordReset;//ç»å½æ¶æ¯å¦å¿ é¡»éç½®å¯ç this.LastModifyUser = rhs.LastModifyUser; this.LastModifyTime = rhs.LastModifyTime;//æåä¿®æ¹æ¶é´ this.Paras = rhs.Paras; this.StaffStatusLabel = this.StaffStatus == 0 ? "离è" : "å¨è"; this.RequirePasswordResetLabel = this.RequirePasswordReset == 0 ? "å¦" : "æ¯"; public EmployeeViewModel(EmployeeMain rhs) { this.ErpCode = rhs.ErpCode;//ç¼å· this.ProfilePhotoFilePath = rhs.ProfilePhotoFilePath;//头å this.PositonName = rhs.PositonName;//èä½å this.FirstName = rhs.FirstName; //å§åï¼è±æå°±æ¯ç¬¬ä¸ä¸ªåï¼ this.LastName = rhs.LastName;//å§åï¼è±æå°±æ¯æåçåï¼ //this.StaffStatus = rhs.StaffStatus; //å¨èç¶æ1å¨è 0离è this.Telephone = rhs.Telephone;//ææºå· //this.RequirePasswordReset = rhs.RequirePasswordReset;//ç»å½æ¶æ¯å¦å¿ é¡»éç½®å¯ç this.Email = rhs.Email;//çµåé®ç®± this.DrawSignal = rhs.DrawSignal;//ç¾å this.LoginAccount = rhs.LoginAccount;//ç»å½ç¨æ· this.StaffStatus = rhs.StaffStatus ; //this.StaffStatus = rhs.StaffStatus == 0 ? "离è" : "å¨è"; this.RequirePasswordReset = rhs.RequirePasswordReset == 0 ? "å¦" : "æ¯"; /// <summary> /// 0 ç· 1女 /// </summary> } public string StaffStatusLabel { get; set; } public string RequirePasswordResetLabel { get; set; } //public string StaffStatusLabel { get; set; } public string RequirePasswordResetLabel { get; set; } /// <summary> /// ID /// </summary> public long ID { get; set; } /// <summary> /// ç¼å· /// </summary> public string ErpCode { get; set; } /// <summary> /// 头å /// </summary> public string ProfilePhotoFilePath { get; set; } /// <summary> /// èä½å /// </summary> public string PositonName { get; set; } /// <summary> /// å§åï¼è±æå°±æ¯ç¬¬ä¸ä¸ªåï¼ /// </summary> public string FirstName { get; set; } /// <summary> /// å¨èç¶æ 1å¨è 0离è /// </summary> public eJobType StaffStatus { get; set; } /// <summary> /// ææºå· /// </summary> public string Telephone { get; set; } /// <summary> /// å§åï¼è±æåï¼æä¼ç¨å°ï¼ /// </summary> public string LastName { get; set; } /// <summary> /// ç»å½æ¶æ¯å¦å¿ é¡»éç½®å¯ç /// </summary> public string RequirePasswordReset { get; set; } /// <summary> /// å¾çº¸ä¸çç¾å /// </summary> public string DrawSignal { get; set; } /// <summary> /// çµåé®ç®± /// </summary> public string Email { get; set; } /// <summary> /// ç»å½ç¨æ· /// </summary> public UserLoginAccount LoginAccount { get; set; } } } WinFrmUI/HStation.WinFrmUI.Organize.Core/02-Employee/AddEmployeeDlg.Designer.cs
@@ -28,116 +28,57 @@ /// </summary> private void InitializeComponent() { groupControl1 = new DevExpress.XtraEditors.GroupControl(); emloyeeInfoCtrl = new _00_UserControl.emloyeeFrom(); CreateLogincheckEdit = new DevExpress.XtraEditors.CheckEdit(); groupControl2 = new DevExpress.XtraEditors.GroupControl(); loginUserForm = new LoginUserForm(); QueDingsimpleButton = new DevExpress.XtraEditors.SimpleButton(); QuXiaosimpleButton = new DevExpress.XtraEditors.SimpleButton(); ((System.ComponentModel.ISupportInitialize)groupControl1).BeginInit(); groupControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)CreateLogincheckEdit.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)groupControl2).BeginInit(); groupControl2.SuspendLayout(); emloyeeInfoCtrl = new EmloyeeInfoCtrl(); simpleButtonOK = new DevExpress.XtraEditors.SimpleButton(); simpleButtonCancel = new DevExpress.XtraEditors.SimpleButton(); SuspendLayout(); // // groupControl1 // groupControl1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; groupControl1.Controls.Add(emloyeeInfoCtrl); groupControl1.Location = new Point(8, 6); groupControl1.Name = "groupControl1"; groupControl1.Size = new Size(463, 235); groupControl1.TabIndex = 0; groupControl1.Text = "å工信æ¯"; // // emloyeeInfoCtrl // emloyeeInfoCtrl.Dock = DockStyle.Fill; emloyeeInfoCtrl.Location = new Point(2, 23); emloyeeInfoCtrl.Dock = DockStyle.Top; emloyeeInfoCtrl.Location = new Point(0, 0); emloyeeInfoCtrl.Margin = new Padding(3, 2, 3, 2); emloyeeInfoCtrl.Name = "emloyeeInfoCtrl"; emloyeeInfoCtrl.Size = new Size(459, 210); emloyeeInfoCtrl.TabIndex = 1; emloyeeInfoCtrl.Size = new Size(522, 426); emloyeeInfoCtrl.TabIndex = 0; // // CreateLogincheckEdit // simpleButtonOK // CreateLogincheckEdit.Location = new Point(8, 252); CreateLogincheckEdit.Name = "CreateLogincheckEdit"; CreateLogincheckEdit.Properties.Caption = "åå»ºç¨æ·"; CreateLogincheckEdit.Size = new Size(75, 20); CreateLogincheckEdit.TabIndex = 1; CreateLogincheckEdit.CheckedChanged += CreateLogincheckEdit_CheckedChanged; simpleButtonOK.Location = new Point(270, 444); simpleButtonOK.Name = "simpleButtonOK"; simpleButtonOK.Size = new Size(75, 23); simpleButtonOK.TabIndex = 1; simpleButtonOK.Text = "ç¡®å®"; simpleButtonOK.Click += simpleButtonOK_Click; // // groupControl2 // simpleButtonCancel // groupControl2.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; groupControl2.Controls.Add(loginUserForm); groupControl2.Location = new Point(8, 278); groupControl2.Name = "groupControl2"; groupControl2.Size = new Size(463, 133); groupControl2.TabIndex = 2; groupControl2.Text = "ç¨æ·ä¿¡æ¯"; // // loginUserForm // loginUserForm.Dock = DockStyle.Fill; loginUserForm.Location = new Point(2, 23); loginUserForm.Name = "loginUserForm"; loginUserForm.Size = new Size(459, 108); loginUserForm.TabIndex = 0; loginUserForm.UseWaitCursor = true; // // QueDingsimpleButton // QueDingsimpleButton.Location = new Point(271, 417); QueDingsimpleButton.Name = "QueDingsimpleButton"; QueDingsimpleButton.Size = new Size(75, 23); QueDingsimpleButton.TabIndex = 3; QueDingsimpleButton.Text = "ç¡®å®"; QueDingsimpleButton.Click += QueDingsimpleButton_Click; // // QuXiaosimpleButton // QuXiaosimpleButton.Location = new Point(379, 417); QuXiaosimpleButton.Name = "QuXiaosimpleButton"; QuXiaosimpleButton.Size = new Size(75, 23); QuXiaosimpleButton.TabIndex = 4; QuXiaosimpleButton.Text = "åæ¶"; QuXiaosimpleButton.Click += QuXiaosimpleButton_Click; simpleButtonCancel.Location = new Point(415, 445); simpleButtonCancel.Name = "simpleButtonCancel"; simpleButtonCancel.Size = new Size(75, 23); simpleButtonCancel.TabIndex = 2; simpleButtonCancel.Text = "åæ¶"; simpleButtonCancel.Click += simpleButtonCancel_Click; // // AddEmployeeDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(483, 450); Controls.Add(QuXiaosimpleButton); Controls.Add(QueDingsimpleButton); Controls.Add(groupControl2); Controls.Add(CreateLogincheckEdit); Controls.Add(groupControl1); ClientSize = new Size(522, 507); Controls.Add(simpleButtonCancel); Controls.Add(simpleButtonOK); Controls.Add(emloyeeInfoCtrl); MaximizeBox = false; Name = "AddEmployeeDlg"; StartPosition = FormStartPosition.CenterScreen; Text = "æ·»å åå·¥"; TopMost = true; ((System.ComponentModel.ISupportInitialize)groupControl1).EndInit(); groupControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)CreateLogincheckEdit.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)groupControl2).EndInit(); groupControl2.ResumeLayout(false); Text = "AddEmployeeDlg"; ResumeLayout(false); } #endregion private DevExpress.XtraEditors.GroupControl groupControl1; private _00_UserControl.emloyeeFrom emloyeeInfoCtrl; private DevExpress.XtraEditors.CheckEdit CreateLogincheckEdit; private DevExpress.XtraEditors.GroupControl groupControl2; private DevExpress.XtraEditors.SimpleButton QueDingsimpleButton; private DevExpress.XtraEditors.SimpleButton QuXiaosimpleButton; private LoginUserForm loginUserForm; private EmloyeeInfoCtrl emloyeeInfoCtrl; private DevExpress.XtraEditors.SimpleButton simpleButtonOK; private DevExpress.XtraEditors.SimpleButton simpleButtonCancel; } } WinFrmUI/HStation.WinFrmUI.Organize.Core/02-Employee/AddEmployeeDlg.cs
@@ -1,8 +1,4 @@ using DevExpress.Mvvm.Native; using DevExpress.Office.Utils; using DevExpress.XtraEditors; using Dm.filter.log; using HStation.Dto; using DevExpress.XtraEditors; using System; using System.Collections.Generic; using System.ComponentModel; @@ -10,10 +6,8 @@ using System.Drawing; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; using Yw.DAL.Basic; namespace HStation.WinFrmUI.Organize.Core._02_Employee { @@ -22,179 +16,91 @@ public AddEmployeeDlg() { InitializeComponent(); loginUserForm.SetNoInput(); } private readonly HStation.Service.LoginUserMain _service = new(); long _emloyeeId; bool AddSuccessfully; private async void AddEmloyeeUse() //ç¡®å® private async void simpleButtonOK_Click(object sender, EventArgs e) { var bll = new BLL.EmployeeMain(); string error; _emloyeeId = await bll.InsertLoginUserEx(new Dto.UpdateEmployeeMainDto HStation.Vmo.EmployeeMain employee =new Vmo.EmployeeMain(); employee = emloyeeInfoCtrl.SetBindingData(employee, out error); //var a = employee.AddTime; //var b =employee.LastModifyTime; if (!string.IsNullOrEmpty(error)) { AddTime = DateTime.Now, ErpCode = emloyeeInfoCtrl.GetErpCode(), PositonName = emloyeeInfoCtrl.GetPositonName(), FirstName = emloyeeInfoCtrl.GetName(), LastName = emloyeeInfoCtrl.GetEnglishNametextEdit(), Telephone = emloyeeInfoCtrl.GetTelephone(), DrawSignal = emloyeeInfoCtrl.GetDrawSignal(), Email = emloyeeInfoCtrl.GetEmail(), StaffStatus = emloyeeInfoCtrl.GetZhuangTai(), RequirePasswordReset = emloyeeInfoCtrl.GetChongZhi(), LastModifyTime = DateTime.Now, }, new Dto.AddUserLoginMapDto { ObjectType = Service.Organize.eObjectType.Employee, }, new Dto.AddLoginUserMainDto { LoginName = loginUserForm.GetLoginName(), PassWord = loginUserForm.GetPassWord(), CreateTime = DateTime.Now }); AddSuccessfully = false; } private async void AddEmloyee() { //List<Model.LoginUserMain> all = _service.GetAll(); var bll = new BLL.EmployeeMain(); _emloyeeId = await bll.InsertEx(new Dto.UpdateEmployeeMainDto { AddTime = DateTime.Now, ErpCode = emloyeeInfoCtrl.GetErpCode(), PositonName = emloyeeInfoCtrl.GetPositonName(), FirstName = emloyeeInfoCtrl.GetName(), LastName = emloyeeInfoCtrl.GetEnglishNametextEdit(), Telephone = emloyeeInfoCtrl.GetTelephone(), DrawSignal = emloyeeInfoCtrl.GetDrawSignal(), Email = emloyeeInfoCtrl.GetEmail(), StaffStatus = emloyeeInfoCtrl.GetZhuangTai(), RequirePasswordReset = emloyeeInfoCtrl.GetChongZhi(), LastModifyTime = DateTime.Now, }, new Dto.AddUserLoginMapDto { LoginID = 11, ObjectType = Service.Organize.eObjectType.Employee, }); AddSuccessfully = false; } public long GetNewAddEmloyeeId() { return _emloyeeId; } public bool GetAddSuccessfully() { return AddSuccessfully; } // @"^[^@\s]+@[^@\s]+\.[^@\s]+$" private bool IsValidEmail(string email) { return Regex.IsMatch(email, @"^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$"); } private async void QueDingsimpleButton_Click(object sender, EventArgs e) { emloyeeInfoCtrl.IsValid(); if (!IsValidEmail(emloyeeInfoCtrl.GetEmail())&& !String.IsNullOrEmpty(emloyeeInfoCtrl.GetEmail())) { MessageBox.Show("é®ç®±æ ¼å¼é误ï¼"); MessageBox.Show(error); return; } if (loginUserForm.GetPassWord() != loginUserForm.GetQueRenPassWord()) { MessageBox.Show("两次è¾å ¥å¯ç ä¸ä¸è´ãè¯·éæ°è¾å ¥ï¼"); AddSuccessfully = false; return; } var bll = new BLL.EmployeeMain(); EmployeeMainDto employeeDate = await bll.GetByErpCode(emloyeeInfoCtrl.GetErpCode()); if (employeeDate != null && String.IsNullOrEmpty(emloyeeInfoCtrl.GetErpCode())) var employeeDate = await bll.GetByErpCode(employee.ErpCode) ; if (employeeDate != null && !String.IsNullOrEmpty(employee.ErpCode)) { MessageBox.Show("ç¼å·éå¤ï¼è¯·éæ°è¾å ¥ï¼"); return; } if (String.IsNullOrEmpty(emloyeeInfoCtrl.GetEnglishNametextEdit())) var ids = await bll.InsertEx(employee); var a =employee.FirstName; if (ids == null) { emloyeeInfoCtrl.SetEnglishNametextEdit("ææ "); } if (employeeDate != null) { MessageBox.Show("ç¼å·éå¤ï¼è¯·éæ°è¾å ¥ï¼"); MessageBox.Show("æ·»å 失败ï¼å¯è½æ°æ®åºè¿æ¥å¤±è´¥ï¼"); return; } if (CreateLogincheckEdit.Checked == true) { loginUserForm.IsValid(); } //String.IsNullOrEmpty(emloyeeFrom.GetChongZhiText()) || String.IsNullOrEmpty(emloyeeFrom.GetZhuangTaiText()) || if (String.IsNullOrEmpty(emloyeeInfoCtrl.GetDrawSignal())||String.IsNullOrEmpty(emloyeeInfoCtrl.GetErpCode()) || String.IsNullOrEmpty(emloyeeInfoCtrl.GetPositonName()) || String.IsNullOrEmpty(emloyeeInfoCtrl.GetName()) || String.IsNullOrEmpty(emloyeeInfoCtrl.GetTelephone()) || String.IsNullOrEmpty(emloyeeInfoCtrl.GetDrawSignal())) { MessageBox.Show("åºæ¬ä¿¡æ¯ä¸è½é¨å为空ï¼"); AddSuccessfully = false; return; } if (emloyeeInfoCtrl.GetTelephone().Length != 11) { MessageBox.Show("请è¾å ¥æ£ç¡®æ ¼å¼ççµè¯å·ï¼"); AddSuccessfully = false; return; } //if (emloyeeInfoCtrl.GetZhuangTai() != 0 && emloyeeInfoCtrl.GetZhuangTai() != 1) //{ // MessageBox.Show("å¨èç¶æè¯·éæ©'离è'æ'å¨è'ï¼"); // AddSuccessfully = false; // return; //} //if (emloyeeInfoCtrl.GetChongZhi() != 0 && emloyeeInfoCtrl.GetChongZhi() != 1) //{ // MessageBox.Show("æ¯å¦ç»å½éç½®è¯·éæ©'æ¯'æ'å¦'ï¼"); // AddSuccessfully = false; // return; //} if (CreateLogincheckEdit.Checked == true) { if (String.IsNullOrEmpty(loginUserForm.GetLoginName()) || String.IsNullOrEmpty(loginUserForm.GetPassWord())) { MessageBox.Show("ç»å½ç¨æ·åæå¯ç ä¸è½ä¸ºç©ºï¼"); AddSuccessfully = false; return; } AddEmloyeeUse(); } else { AddEmloyee(); } this.DialogResult = DialogResult.OK; MessageBox.Show("æ·»å æåï¼"); AddSuccessfully = true; this.Close(); } private void QuXiaosimpleButton_Click(object sender, EventArgs e) //åæ¶ private void simpleButtonCancel_Click(object sender, EventArgs e) { if (e == null) { return; } this.DialogResult = DialogResult.Cancel; this.Close(); } //private void AddEmployeeDlg_Load(object sender, EventArgs e) //{ // emloyeeInfoCtrl.SetBindingData(null); //} private void CreateLogincheckEdit_CheckedChanged(object sender, EventArgs e) { if (CreateLogincheckEdit.Checked == true) { loginUserForm.SetOffInput(); } else { loginUserForm.SetNoInput(); } } //private async void QueDingsimpleButton_Click(object sender, EventArgs e) //{ // string error; // var employe = emloyeeInfoCtrl.GetBindingData(out error); // if (employe == null) // { // MessageBox.Show(error); // return; // } // // var bll = new BLL.EmployeeMain(); // EmployeeMain employeeDate = await bll.GetByErpCode(emloyeeInfoCtrl.GetBindingData(out error).ErpCode); // if (employeeDate != null && String.IsNullOrEmpty(emloyeeInfoCtrl.GetBindingData(out error).ErpCode)) // { // MessageBox.Show("ç¼å·éå¤ï¼è¯·éæ°è¾å ¥ï¼"); // return; // } // var ids = await bll.InsertEx(employe); // if (ids == null) // { // MessageBox.Show("æ·»å 失败ï¼å¯è½æ°æ®åºè¿æ¥å¤±è´¥"); // return; // } // MessageBox.Show("æ·»å æåï¼"); // this.DialogResult = DialogResult.OK; // this.Close(); //} //private void QuXiaosimpleButton_Click(object sender, EventArgs e) //{ // this.DialogResult = DialogResult.Cancel; // this.Close(); //} } } WinFrmUI/HStation.WinFrmUI.Organize.Core/02-Employee/EmployeeMgrMainPanel.Designer.cs
@@ -218,7 +218,7 @@ colStaffStatus.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colStaffStatus.AppearanceHeader.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center; colStaffStatus.Caption = "å·¥ä½ç¶æ"; colStaffStatus.FieldName = "StaffStatusLabel"; colStaffStatus.FieldName = "StaffStatus"; colStaffStatus.Name = "colStaffStatus"; colStaffStatus.OptionsColumn.AllowEdit = false; colStaffStatus.Visible = true; WinFrmUI/HStation.WinFrmUI.Organize.Core/02-Employee/EmployeeMgrMainPanel.cs
@@ -1,8 +1,7 @@ using DevExpress.CodeParser; using DevExpress.XtraEditors.TextEditController.Win32; using DevExpress.XtraGrid; using HStation.Dto; using HStation.Model; using HStation.Vmo; using HStation.WinFrmUI.Organize.Core._00_UserControl; using HStation.WinFrmUI.Organize.Core._02_Employee; using Mapster; @@ -20,51 +19,32 @@ //ShowEmloyee(); } List<EmployeeViewModel> _AllEmployee = new List<EmployeeViewModel>(); List<HStation.Vmo.EmployeeMain> _AllEmployee = new List<HStation.Vmo.EmployeeMain>(); private void DateShow() private async void DateShow() { HStation.Service.EmployeeMain _service = new(); HStation.BLL.EmployeeMain _service = new(); _AllEmployee.Clear(); var _All = _service.GetAll(); List<EmployeeViewModel> _AllDateSource = _All.Adapt<List<EmployeeMain>, List<EmployeeViewModel>>(); foreach (EmployeeViewModel emp in _AllDateSource) var _All = await _service.GetAll(); foreach (HStation.Vmo.EmployeeMain emp in _All) { emp.StaffStatusLabel = emp.StaffStatus == 0 ? "离è" : "å¨è"; emp.RequirePasswordResetLabel = emp.RequirePasswordReset == 0 ? "å¦" : "æ¯"; if (String.IsNullOrEmpty(emp.LastName)) { emp.LastName = "ææ "; } _AllEmployee.Add(emp); } employeeViewModelBindingSource.DataSource = _AllEmployee; this.employeeViewModelBindingSource.ResetBindings(false); } //public void ShowEmloyee() //{ // List<Model.EmployeeMain> all = _service.GetAll(); // employeeViewModelBindingSource.DataSource = all; //} //æ·»å private async void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { var dlg = new AddEmployeeDlg(); dlg.ShowDialog(); if (dlg.GetAddSuccessfully() != true) var dlg = new AddEmployeeDlg(); if (dlg.ShowDialog() != DialogResult.OK) { return; } var bll = new BLL.EmployeeMain(); var NewAddemployeeDate = await bll.GetByID(dlg.GetNewAddEmloyeeId()); EmployeeViewModel _NewAddemployeeDate = NewAddemployeeDate.Adapt<EmployeeMainDto, EmployeeViewModel>(); _NewAddemployeeDate.StaffStatusLabel = _NewAddemployeeDate.StaffStatus == 0 ? "离è" : "å¨è"; _NewAddemployeeDate.RequirePasswordResetLabel = _NewAddemployeeDate.RequirePasswordReset == 0 ? "å¦" : "æ¯"; _AllEmployee.Add(_NewAddemployeeDate); DateShow(); this.employeeViewModelBindingSource.ResetBindings(false); } @@ -78,10 +58,13 @@ MessageBoxHelper.ShowWarning("è¯·éæ©æ°æ®è¡"); return; } dlg.SetDate(currentVm.ID); dlg.ShowDialog(); DateShow(); this.employeeViewModelBindingSource.ResetBindings(false); dlg.IncomingData(currentVm); if (dlg.ShowDialog() == DialogResult.OK) { DateShow(); this.employeeViewModelBindingSource.ResetBindings(false); } } ////å é¤ WinFrmUI/HStation.WinFrmUI.Organize.Core/02-Employee/UpdateEmployeeDlg.Designer.cs
@@ -28,22 +28,22 @@ /// </summary> private void InitializeComponent() { emloyeeFrom = new _00_UserControl.emloyeeFrom(); emloyeeInfoCtrl = new EmloyeeInfoCtrl(); QueRensimpleButton = new DevExpress.XtraEditors.SimpleButton(); QuXiaosimpleButton = new DevExpress.XtraEditors.SimpleButton(); SuspendLayout(); // // emloyeeFrom // emloyeeInfoCtrl // emloyeeFrom.Location = new Point(12, 11); emloyeeFrom.Margin = new Padding(3, 2, 3, 2); emloyeeFrom.Name = "emloyeeFrom"; emloyeeFrom.Size = new Size(477, 190); emloyeeFrom.TabIndex = 0; emloyeeInfoCtrl.Location = new Point(12, 12); emloyeeInfoCtrl.Margin = new Padding(3, 2, 3, 2); emloyeeInfoCtrl.Name = "emloyeeInfoCtrl"; emloyeeInfoCtrl.Size = new Size(477, 397); emloyeeInfoCtrl.TabIndex = 0; // // QueRensimpleButton // QueRensimpleButton.Location = new Point(262, 207); QueRensimpleButton.Location = new Point(275, 442); QueRensimpleButton.Name = "QueRensimpleButton"; QueRensimpleButton.Size = new Size(88, 24); QueRensimpleButton.TabIndex = 1; @@ -52,7 +52,7 @@ // // QuXiaosimpleButton // QuXiaosimpleButton.Location = new Point(376, 207); QuXiaosimpleButton.Location = new Point(389, 442); QuXiaosimpleButton.Name = "QuXiaosimpleButton"; QuXiaosimpleButton.Size = new Size(88, 24); QuXiaosimpleButton.TabIndex = 2; @@ -63,8 +63,8 @@ // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(519, 243); Controls.Add(emloyeeFrom); ClientSize = new Size(519, 501); Controls.Add(emloyeeInfoCtrl); Controls.Add(QuXiaosimpleButton); Controls.Add(QueRensimpleButton); MaximizeBox = false; @@ -77,7 +77,7 @@ #endregion private DevExpress.XtraEditors.GroupControl groupControl1; private _00_UserControl.emloyeeFrom emloyeeFrom; private EmloyeeInfoCtrl emloyeeInfoCtrl; private DevExpress.XtraEditors.SimpleButton QueRensimpleButton; private DevExpress.XtraEditors.SimpleButton QuXiaosimpleButton; } WinFrmUI/HStation.WinFrmUI.Organize.Core/02-Employee/UpdateEmployeeDlg.cs
@@ -2,6 +2,7 @@ using DevExpress.XtraEditors; using Furion.LinqBuilder; using HStation.Dto; using HStation.Vmo; using HStation.WinFrmUI.Organize.Core._00_UserControl; using Mapster; using System; @@ -23,124 +24,52 @@ { InitializeComponent(); } String time; int ID; long UpdataEmloyeeID; private async void UpdataEmloyeeUse(object sender, EventArgs e) string error; string NowErpCode = ""; HStation.Vmo.EmployeeMain _employee = new HStation.Vmo.EmployeeMain(); public void IncomingData(HStation.Vmo.EmployeeMain employee) { error = ""; NowErpCode = employee.ErpCode; this._employee = employee; emloyeeInfoCtrl.GetBindingData(_employee, out error); if (!string.IsNullOrEmpty(error)) { MessageBox.Show(error); return; } } private async void QueRensimpleButton_Click(object sender, EventArgs e) { var bll = new BLL.EmployeeMain(); EmployeeMainDto employeeDate = await bll.GetByID(UpdataEmloyeeID); time = employeeDate.AddTime.ToString(); ID = employeeDate.SortCode; await bll.Update(new Dto.Assets.UpdateEmployeeMainDto error = ""; _employee = emloyeeInfoCtrl.SetBindingData(_employee, out error); if (!string.IsNullOrEmpty(error)) { LastModifyTime = DateTime.Now.ToString(), ID = UpdataEmloyeeID, ErpCode = emloyeeFrom.GetErpCode(), PositonName = emloyeeFrom.GetPositonName(), FirstName = emloyeeFrom.GetName(), Telephone = emloyeeFrom.GetTelephone(), DrawSignal = emloyeeFrom.GetDrawSignal(), LastName = emloyeeFrom.GetEnglishNametextEdit(), Email = emloyeeFrom.GetEmail(), StaffStatus = emloyeeFrom.GetZhuangTai(), RequirePasswordReset = emloyeeFrom.GetChongZhi() }); employeeDate = await bll.GetByID(UpdataEmloyeeID); time = employeeDate.AddTime.ToString(); ID = employeeDate.SortCode; MessageBox.Show("ä¿®æ¹æåï¼"); } public async void SetDate(long EmloyeeId) { var bll = new BLL.EmployeeMain(); emloyeeFrom.ErpCodeNoUpdate(); UpdataEmloyeeID = EmloyeeId; EmployeeMainDto employeeDate = await bll.GetByID(EmloyeeId); time = employeeDate.AddTime.ToString(); ID = employeeDate.SortCode; if (String.IsNullOrEmpty(employeeDate.LastName)) { emloyeeFrom.SetEnglishNametextEdit("ææ "); } emloyeeFrom.SetName(employeeDate.FirstName.ToString()); emloyeeFrom.SetErpCode(employeeDate.ErpCode.ToString()); emloyeeFrom.SetPositonName(employeeDate.PositonName.ToString()); emloyeeFrom.SetTelephone(employeeDate.Telephone.ToString()); emloyeeFrom.SetEnglishNametextEdit(employeeDate.LastName.ToString()); emloyeeFrom.SetDrawSignal(employeeDate.DrawSignal.ToString()); emloyeeFrom.SetEmail(employeeDate.Email.ToString()); emloyeeFrom.SetZhuangTai(employeeDate.StaffStatus); emloyeeFrom.SetChongZhi(employeeDate.RequirePasswordReset); } //@"^[^@\s]+@[^@\s]+\.[^@\s]+$" private bool IsValidEmail(string email) { return Regex.IsMatch(email, @"^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$"); } private void QueRensimpleButton_Click(object sender, EventArgs e) { if (e == null) { MessageBox.Show(error); return; } emloyeeFrom.IsValid(); if (!IsValidEmail(emloyeeFrom.GetEmail()) && !String.IsNullOrEmpty(emloyeeFrom.GetEmail())) HStation.Vmo.EmployeeMain employeeDate = await bll.GetByErpCode(_employee.ErpCode); if (employeeDate != null && !String.IsNullOrEmpty(_employee.ErpCode) && NowErpCode != _employee.ErpCode) { MessageBox.Show("é®ç®±æ ¼å¼é误ï¼"); MessageBox.Show("ç¼å·éå¤ï¼è¯·éæ°è¾å ¥ï¼"); return; } if (String.IsNullOrEmpty(emloyeeFrom.GetDrawSignal())||String.IsNullOrEmpty(emloyeeFrom.GetErpCode()) || String.IsNullOrEmpty(emloyeeFrom.GetPositonName()) || String.IsNullOrEmpty(emloyeeFrom.GetName()) || String.IsNullOrEmpty(emloyeeFrom.GetTelephone()) || String.IsNullOrEmpty(emloyeeFrom.GetDrawSignal())) if (!await bll.Update(_employee)) { MessageBox.Show("åºæ¬ä¿¡æ¯ä¸è½é¨å为空ï¼"); MessageBox.Show("ç¼è¾å¤±è´¥ï¼å¯è½æ°æ®åºè¿æ¥å¤±è´¥ï¼"); return; } if (emloyeeFrom.GetTelephone().Length != 11) { MessageBox.Show("请è¾å ¥æ£ç¡®æ ¼å¼ççµè¯å·ï¼"); return; } //if (emloyeeFrom.GetZhuangTai() != 0 && emloyeeFrom.GetZhuangTai() != 1) //{ // MessageBox.Show("è¯·éæ©'离è'æ'å¨è'ï¼"); // return; //} //if (emloyeeFrom.GetChongZhi() != 0 && emloyeeFrom.GetChongZhi() != 1) //{ // MessageBox.Show("è¯·éæ©'æ¯'æ'å¦'ï¼"); // return; //} UpdataEmloyeeUse(sender, e); MessageBox.Show("ç¼è¾æåï¼"); this.DialogResult = DialogResult.OK; this.Close(); } private void QuXiaosimpleButton_Click(object sender, EventArgs e) { if (e == null) { return; } this.DialogResult = DialogResult.Cancel; this.Close(); } } WinFrmUI/HStation.WinFrmUI.Organize.Core/HStation.WinFrmUI.Organize.Core.csproj.user
@@ -5,10 +5,10 @@ <Compile Update="00-UserControl\InterfationFrom.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="00-UserControl\EmloyeeFrom.cs"> <Compile Update="00-UserControl\EmloyeeInfoCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="00-UserControl\LoginUserForm.cs"> <Compile Update="00-UserControl\LoginUserInfoCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="02-Employee\AddEmployeeDlg.cs"> WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/XhsSchemeMultiMgrPage.cs
@@ -105,17 +105,17 @@ /// </summary> private void BimfaceInterop3dContainer1_ClickInEvent(Yw.WinFrmUI.Bimface.ClickIn3dInfo obj) { if (_hydroInfo == null) { return; } var allParterList = _hydroInfo.GetAllParters(); var parter = allParterList.Find(x => x.Code == obj.ObjectId); if (parter != null) { var vm = HydroParterPropertyViewModelBuilder.CreateViewModel(parter, allParterList); this.hydroParterPropertyCtrl1.SelectedObject = vm; } //if (_hydroInfo == null) //{ // return; //} //var allParterList = _hydroInfo.GetAllParters(); //var parter = allParterList.Find(x => x.Code == obj.ObjectId); //if (parter != null) //{ // var vm = HydroParterPropertyViewModelBuilder.CreateViewModel(parter, allParterList); // this.hydroParterPropertyCtrl1.SelectedObject = vm; //} } } }