diff --git a/插件库/Lskj.PubGroupSettings/DllBaseClass.cs b/插件库/Lskj.PubGroupSettings/DllBaseClass.cs new file mode 100644 index 0000000..46c7f1e --- /dev/null +++ b/插件库/Lskj.PubGroupSettings/DllBaseClass.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using DevExpress.UserSkins; +using DevExpress.Skins; +using DevExpress.LookAndFeel; +using Lskj.Model; +using Lskj.Util; +using Lskj.Business; + +namespace Lskj.PubGroupSettings +{ + /// + /// c#库被调用统一接口类 + /// + public sealed class DllBaseClass : IForm + { + public DllBaseClass() + { + + } + + public DllBaseClass(string[] obj) + { + try + { + DynamicGroupSettings moduleModel = new DynamicGroupSettings(obj); + FrmMain main = new FrmMain(); + main.Model = moduleModel; + this.SubForm = main; + } + catch (Excep \ No newline at end of file diff --git a/插件库/Lskj.PubGroupSettings/FrmMain.Designer.cs b/插件库/Lskj.PubGroupSettings/FrmMain.Designer.cs new file mode 100644 index 0000000..a449677 --- /dev/null +++ b/插件库/Lskj.PubGroupSettings/FrmMain.Designer.cs @@ -0,0 +1,184 @@ +namespace Lskj.PubGroupSettings +{ + partial class FrmMain + { + /// + /// + /// + private System.ComponentModel.IContainer components = null; + + /// + /// ʹõԴ + /// + /// ӦͷйԴΪ trueΪ false + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows ɵĴ + + /// + /// ֧ķ - Ҫ޸ + /// ʹô༭޸Ĵ˷ݡ + /// + private void InitializeComponent() + { + this.lblGroupName = new DevExpress.XtraEditors.LabelControl(); + this.txtGroupName = new DevExpress.XtraEditors.TextEdit(); + this.lblHint = new DevExpress.XtraEditors.LabelControl(); + this.lblMaxColumns = new DevExpress.XtraEditors.LabelControl(); + this.txtMaxColumns = new DevExpress.XtraEditors.TextEdit(); + this.chkRemarkOwnRow = new DevExpress.XtraEditors.CheckEdit(); + this.lblLayout = new DevExpress.XtraEditors.LabelControl(); + this.cmbLayout = new DevExpress.XtraEditors.ComboBoxEdit(); + this.btnOK = new DevExpress.XtraEditors.SimpleButton(); + this.btnCancel = new DevExpress.XtraEditors.SimpleButton(); + ((System.ComponentModel.ISupportInitialize)(this.txtGroupName.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtMaxColumns.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.chkRemarkOwnRow.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.cmbLayout.Properties)).BeginInit(); + this.SuspendLayout(); + // + // lblGroupName + // + this.lblGroupName.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + this.lblGroupName.Location = new System.Drawing.Point(16, 22); + this.lblGroupName.Name = "lblGroupName"; + this.lblGroupName.Size = new System.Drawing.Size(60, 14); + this.lblGroupName.TabIndex = 0; + this.lblGroupName.Text = ""; + // + // txtGroupName + // + this.txtGroupName.Location = new System.Drawing.Point(82, 19); + this.txtGroupName.Name = "txtGroupName"; + this.txtGroupName.Size = new System.Drawing.Size(230, 20); + this.txtGroupName.TabIndex = 1; + // + // lblHint + // + this.lblHint.Appearance.ForeColor = System.Drawing.Color.Gray; + this.lblHint.Appearance.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular); + this.lblHint.Location = new System.Drawing.Point(82, 45); + this.lblHint.Name = "lblHint"; + this.lblHint.Size = new System.Drawing.Size(240, 14); + this.lblHint.TabIndex = 2; + this.lblHint.Text = "ǰλţ01"; + // + // lblMaxColumns + // + this.lblMaxColumns.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + this.lblMaxColumns.Location = new System.Drawing.Point(16, 78); + this.lblMaxColumns.Name = "lblMaxColumns"; + this.lblMaxColumns.Size = new System.Drawing.Size(60, 14); + this.lblMaxColumns.TabIndex = 3; + this.lblMaxColumns.Text = ""; + // + // txtMaxColumns + // + this.txtMaxColumns.Location = new System.Drawing.Point(82, 75); + this.txtMaxColumns.Name = "txtMaxColumns"; + this.txtMaxColumns.Size = new System.Drawing.Size(230, 20); + this.txtMaxColumns.TabIndex = 4; + // + // chkRemarkOwnRow + // + this.chkRemarkOwnRow.Location = new System.Drawing.Point(80, 108); + this.chkRemarkOwnRow.Name = "chkRemarkOwnRow"; + this.chkRemarkOwnRow.Properties.Caption = "עռһ"; + this.chkRemarkOwnRow.Size = new System.Drawing.Size(120, 19); + this.chkRemarkOwnRow.TabIndex = 5; + // + // lblLayout + // + this.lblLayout.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + this.lblLayout.Location = new System.Drawing.Point(16, 145); + this.lblLayout.Name = "lblLayout"; + this.lblLayout.Size = new System.Drawing.Size(60, 14); + this.lblLayout.TabIndex = 6; + this.lblLayout.Text = "ַʽ"; + // + // cmbLayout + // + this.cmbLayout.Location = new System.Drawing.Point(82, 142); + this.cmbLayout.Name = "cmbLayout"; + this.cmbLayout.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.cmbLayout.Properties.Items.AddRange(new object[] { + "к", + "к"}); + this.cmbLayout.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; + this.cmbLayout.Size = new System.Drawing.Size(150, 20); + this.cmbLayout.TabIndex = 7; + // + // btnOK + // + this.btnOK.Location = new System.Drawing.Point(350, 17); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(80, 25); + this.btnOK.TabIndex = 8; + this.btnOK.Text = "ȷ"; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // btnCancel + // + this.btnCancel.Location = new System.Drawing.Point(350, 48); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(80, 25); + this.btnCancel.TabIndex = 9; + this.btnCancel.Text = "ȡ"; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // FrmMain + // + this.Appearance.BackColor = System.Drawing.SystemColors.Control; + this.Appearance.Options.UseBackColor = true; + this.Appearance.Options.UseFont = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(460, 200); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnOK); + this.Controls.Add(this.cmbLayout); + this.Controls.Add(this.lblLayout); + this.Controls.Add(this.chkRemarkOwnRow); + this.Controls.Add(this.txtMaxColumns); + this.Controls.Add(this.lblMaxColumns); + this.Controls.Add(this.lblHint); + this.Controls.Add(this.txtGroupName); + this.Controls.Add(this.lblGroupName); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FrmMain"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "÷"; + this.Load += new System.EventHandler(this.FrmMain_Load); + ((System.ComponentModel.ISupportInitialize)(this.txtGroupName.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txtMaxColumns.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.chkRemarkOwnRow.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.cmbLayout.Properties)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private DevExpress.XtraEditors.LabelControl lblGroupName; + private DevExpress.XtraEditors.TextEdit txtGroupName; + private DevExpress.XtraEditors.LabelControl lblHint; + private DevExpress.XtraEditors.LabelControl lblMaxColumns; + private DevExpress.XtraEditors.TextEdit txtMaxColumns; + private DevExpress.XtraEditors.CheckEdit chkRemarkOwnRow; + private DevExpress.XtraEditors.LabelControl lblLayout; + private DevExpress.XtraEditors.ComboBoxEdit cmbLayout; + private DevExpress.XtraEditors.SimpleButton btnOK; + private DevExpress.XtraEditors.SimpleButton btnCancel; + } +} diff --git a/插件库/Lskj.PubGroupSettings/FrmMain.cs b/插件库/Lskj.PubGroupSettings/FrmMain.cs new file mode 100644 index 0000000..9e5a1f2 --- /dev/null +++ b/插件库/Lskj.PubGroupSettings/FrmMain.cs @@ -0,0 +1,143 @@ +using Lskj.Business.Impl; +using Lskj.Control; +using Lskj.Core; +using Lskj.Model; +using Lskj.Util; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Data.SqlClient; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace Lskj.PubGroupSettings +{ + public partial class FrmMain : BaseForm + { + public DynamicGroupSettings Model; // ̬ӿ + + public FrmMain() + { + InitializeComponent(); + } + + private void FrmMain_Load(object sender, EventArgs e) + { + try + { + // Ĭֵ + this.txtGroupName.Text = ""; + this.txtMaxColumns.Text = ""; + this.chkRemarkOwnRow.Checked = true; + this.cmbLayout.SelectedIndex = 0; // к + } + catch (Exception ex) + { + string Message = ErrorMessage.PromptErrorMessage(ex); + MessageUtil.Show(Message, ex.Message); + } + } + + /// + /// ȷť¼ + /// + private void btnOK_Click(object sender, EventArgs e) + { + try + { + if (string.IsNullOrWhiteSpace(Model.ModuleCode)) + { + MessageUtil.Show("δģ", "ʾ"); + return; + } + if (string.IsNullOrWhiteSpace(Model.FieldId)) + { + MessageUtil.Show("δֶID", "ʾ"); + return; + } + + // ȡֵ + string groupName = this.txtGroupName.Text.Trim(); + string maxColumnsText = this.txtMaxColumns.Text.Trim(); + bool remarkOwnRow = this.chkRemarkOwnRow.Checked; + string layout = this.cmbLayout.SelectedItem != null ? this.cmbLayout.SelectedItem.ToString() : "к"; + + // У + if (string.IsNullOrEmpty(groupName)) + { + MessageUtil.Show("ƲΪգ", "ʾ"); + this.txtGroupName.Focus(); + return; + } + + int maxColumns = 0; + if (!int.TryParse(maxColumnsText, out maxColumns) || maxColumns <= 0) + { + MessageUtil.Show("Ϊ", "ʾ"); + this.txtMaxColumns.Focus(); + return; + } + // עռһУ10 + int RemarksExclusive = this.chkRemarkOwnRow.Checked ? 1 : 0; + + // кΪ1кΪ2 + int Operateway = this.cmbLayout.SelectedIndex == 0 ? 1 : 2; + + string tipMsg = string.Empty; + int result = SetTings(Model.ModuleCode, Model.FieldId, groupName, maxColumnsText, RemarksExclusive, Operateway, out tipMsg); + + switch (result) + { + case 1: // ޸ijɹ + MessageUtil.Show("޸ijɹ"); + this.DialogResult = DialogResult.OK; + this.Close(); + break; + default: + MessageUtil.Show("޸ʧܣ" + tipMsg); + break; + } + + } + catch (Exception ex) + { + string Message = ErrorMessage.PromptErrorMessage(ex); + MessageUtil.Show(Message, ex.Message); + } + } + + /// + /// ȡť¼ + /// + private void btnCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + + + + /// + /// ÷ + /// + + public static int SetTings(string ModuleCode, string FieldId,string groupName, string maxColumnsText,int RemarksExclusive,int Operateway, out string tipMsg) + { + try + { + string sqlValue = string.Format("update p_systemwordbooktab set rpname='{0}' where id in ({1})", groupName, FieldId); + int jg = SqlHelper.ExecuteNonQuery(sqlValue); + + SqlParameter pMsg = ERPInfo.Instance.ChangeParameterType ? new SqlParameter("@msg", SqlDbType.NVarChar, 4000) : new SqlParameter("@msg", SqlDbType.VarChar, 2000); + pMsg.Direction = ParameterDirection.Output; + SqlParameter returnValue = new SqlParameter("@return", SqlDbType.Int, 4); + returnValue.Direction = ParameterDirection.ReturnValue; + SqlParameter[] param = + { + + new SqlParameter("@modid",SqlDbType.VarChar), + new \ No newline at end of file diff --git a/插件库/Lskj.PubGroupSettings/FrmMain.resx b/插件库/Lskj.PubGroupSettings/FrmMain.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/插件库/Lskj.PubGroupSettings/FrmMain.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/插件库/Lskj.PubGroupSettings/Lskj.PubGroupSettings.csproj b/插件库/Lskj.PubGroupSettings/Lskj.PubGroupSettings.csproj new file mode 100644 index 0000000..2d4b620 --- /dev/null +++ b/插件库/Lskj.PubGroupSettings/Lskj.PubGroupSettings.csproj @@ -0,0 +1,112 @@ + + + + + Debug + AnyCPU + {6CBD4CEA-15E3-4E28-BC01-FA734E26746B} + Library + Lskj.PubGroupSettings + Lskj.PubGroupSettings + v4.0 + 512 + true + + + x86 + true + full + false + ..\..\Debug\Lib\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + FrmMain.cs + + + + FrmMain.cs + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {7eafccc2-a18f-49e9-85c6-a984966cfd01} + Lskj.Business + + + {447CDC40-659F-4CCA-9ED6-8E818B4CF8BF} + Lskj.Control + + + {2A1BE6AC-1077-491B-A754-C5822FE8121E} + Lskj.Core + + + {52BC40E0-C0C6-4F78-996B-CAE028D209CA} + Lskj.Model + + + {A51BF642-6543-4DE3-8948-83F558B72BD4} + Lskj.Util + + + + \ No newline at end of file diff --git a/插件库/Lskj.PubGroupSettings/Program.cs b/插件库/Lskj.PubGroupSettings/Program.cs new file mode 100644 index 0000000..780f5af Binary files /dev/null and b/插件库/Lskj.PubGroupSettings/Program.cs differ diff --git a/插件库/Lskj.PubGroupSettings/Properties/AssemblyInfo.cs b/插件库/Lskj.PubGroupSettings/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..59ec715 --- /dev/null +++ b/插件库/Lskj.PubGroupSettings/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Lskj.PubGroupSettings")] +[assembly: AssemblyDescri \ No newline at end of file diff --git a/插件库/Lskj.PubGroupSettings/Properties/Resources.Designer.cs b/插件库/Lskj.PubGroupSettings/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1168cdd --- /dev/null +++ b/插件库/Lskj.PubGroupSettings/Properties/Resources.Designer.cs @@ -0,0 +1,39 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace Lskj.PubGroupSettings.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::Sys \ No newline at end of file diff --git a/插件库/Lskj.PubGroupSettings/Properties/Resources.resx b/插件库/Lskj.PubGroupSettings/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/插件库/Lskj.PubGroupSettings/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/插件库/Lskj.PubGroupSettings/Properties/Settings.Designer.cs b/插件库/Lskj.PubGroupSettings/Properties/Settings.Designer.cs new file mode 100644 index 0000000..537c086 --- /dev/null +++ b/插件库/Lskj.PubGroupSettings/Properties/Settings.Designer.cs @@ -0,0 +1,2 @@ +//------------------------------------------------------------------------------ +// + + + + + +