人员维护

This commit is contained in:
leomo 2022-09-14 16:23:59 +08:00
parent bf2d09ebcc
commit 71cb85c565
6 changed files with 123 additions and 43 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<AtuoUpdate>
<ConnectionString>Data Source=.;Initial Catalog=AIMSDB_SXTLYY;User ID=sa;Password=123456;</ConnectionString>
<ConnectionString>Data Source=tx.wulvshi.cn;Initial Catalog=AIMSDB_SXTLYY;User ID=sa;Password=Test2020;</ConnectionString>
<DataConnectionString>Data Source=.;Initial Catalog=AIMSDB_DATA;User ID=sa;Password=123456;</DataConnectionString>
<HisConnectionStringOracel>Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.7)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2))));Persist Security Info=True;User ID=smview;Password=i39;</HisConnectionStringOracel>
</AtuoUpdate>

View File

@ -97,9 +97,9 @@
//
this.panel2.Controls.Add(this.dgvPerson);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 182);
this.panel2.Location = new System.Drawing.Point(0, 157);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(913, 313);
this.panel2.Size = new System.Drawing.Size(913, 338);
this.panel2.TabIndex = 7;
//
// dgvPerson
@ -129,7 +129,7 @@
this.dgvPerson.RowHeadersVisible = false;
this.dgvPerson.RowTemplate.Height = 23;
this.dgvPerson.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvPerson.Size = new System.Drawing.Size(913, 313);
this.dgvPerson.Size = new System.Drawing.Size(913, 338);
this.dgvPerson.TabIndex = 2;
//
// Id
@ -281,7 +281,7 @@
this.panel1.Font = new System.Drawing.Font("宋体", 10.5F);
this.panel1.Location = new System.Drawing.Point(0, 49);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(913, 133);
this.panel1.Size = new System.Drawing.Size(913, 108);
this.panel1.TabIndex = 6;
//
// cboPersonType
@ -296,7 +296,7 @@
"行政后勤部门",
"手术室",
"社区"});
this.cboPersonType.Location = new System.Drawing.Point(71, 68);
this.cboPersonType.Location = new System.Drawing.Point(71, 73);
this.cboPersonType.Name = "cboPersonType";
this.cboPersonType.Size = new System.Drawing.Size(123, 22);
this.cboPersonType.TabIndex = 574;
@ -312,7 +312,7 @@
//
// txtPassWord
//
this.txtPassWord.Location = new System.Drawing.Point(284, 94);
this.txtPassWord.Location = new System.Drawing.Point(473, 73);
this.txtPassWord.Name = "txtPassWord";
this.txtPassWord.Size = new System.Drawing.Size(100, 23);
this.txtPassWord.TabIndex = 572;
@ -320,7 +320,7 @@
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(243, 100);
this.label13.Location = new System.Drawing.Point(417, 75);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(35, 14);
this.label13.TabIndex = 571;
@ -350,7 +350,7 @@
//
// txtNo
//
this.txtNo.Location = new System.Drawing.Point(284, 10);
this.txtNo.Location = new System.Drawing.Point(275, 10);
this.txtNo.Name = "txtNo";
this.txtNo.Size = new System.Drawing.Size(100, 23);
this.txtNo.TabIndex = 568;
@ -358,7 +358,7 @@
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(243, 16);
this.label10.Location = new System.Drawing.Point(229, 16);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(35, 14);
this.label10.TabIndex = 567;
@ -376,7 +376,7 @@
"行政后勤部门",
"手术室",
"社区"});
this.cboJobTitle.Location = new System.Drawing.Point(284, 40);
this.cboJobTitle.Location = new System.Drawing.Point(275, 42);
this.cboJobTitle.Name = "cboJobTitle";
this.cboJobTitle.Size = new System.Drawing.Size(100, 22);
this.cboJobTitle.TabIndex = 566;
@ -384,7 +384,7 @@
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(243, 48);
this.label9.Location = new System.Drawing.Point(229, 48);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(35, 14);
this.label9.TabIndex = 565;
@ -402,7 +402,7 @@
"行政后勤部门",
"手术室",
"社区"});
this.cboDiploma.Location = new System.Drawing.Point(71, 40);
this.cboDiploma.Location = new System.Drawing.Point(71, 42);
this.cboDiploma.Name = "cboDiploma";
this.cboDiploma.Size = new System.Drawing.Size(123, 22);
this.cboDiploma.TabIndex = 564;
@ -428,7 +428,7 @@
this.dtpTimeToWork.CustomFormat = "yyyy-MM-dd";
this.dtpTimeToWork.Format = DevComponents.Editors.eDateTimePickerFormat.Custom;
this.dtpTimeToWork.IsPopupCalendarOpen = false;
this.dtpTimeToWork.Location = new System.Drawing.Point(771, 37);
this.dtpTimeToWork.Location = new System.Drawing.Point(738, 42);
//
//
//
@ -464,7 +464,7 @@
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(671, 46);
this.label7.Location = new System.Drawing.Point(631, 46);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(91, 14);
this.label7.TabIndex = 561;
@ -481,7 +481,7 @@
this.dtpBirthDay.CustomFormat = "yyyy-MM-dd";
this.dtpBirthDay.Format = DevComponents.Editors.eDateTimePickerFormat.Custom;
this.dtpBirthDay.IsPopupCalendarOpen = false;
this.dtpBirthDay.Location = new System.Drawing.Point(473, 40);
this.dtpBirthDay.Location = new System.Drawing.Point(473, 42);
//
//
//
@ -517,7 +517,7 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(405, 46);
this.label6.Location = new System.Drawing.Point(403, 46);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(63, 14);
this.label6.TabIndex = 559;
@ -535,7 +535,7 @@
"行政后勤部门",
"手术室",
"社区"});
this.cboRole.Location = new System.Drawing.Point(71, 94);
this.cboRole.Location = new System.Drawing.Point(275, 73);
this.cboRole.Name = "cboRole";
this.cboRole.Size = new System.Drawing.Size(123, 22);
this.cboRole.TabIndex = 558;
@ -543,7 +543,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(25, 102);
this.label3.Location = new System.Drawing.Point(229, 75);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(35, 14);
this.label3.TabIndex = 557;
@ -552,16 +552,8 @@
// cboDepartment
//
this.cboDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboDepartment.FormattingEnabled = true;
this.cboDepartment.Items.AddRange(new object[] {
"药品管理部门",
"诊疗部门",
"辅助诊疗部门",
"护理部门",
"行政后勤部门",
"手术室",
"社区"});
this.cboDepartment.Location = new System.Drawing.Point(71, 11);
this.cboDepartment.FormattingEnabled = true;
this.cboDepartment.Location = new System.Drawing.Point(71, 10);
this.cboDepartment.Name = "cboDepartment";
this.cboDepartment.Size = new System.Drawing.Size(123, 22);
this.cboDepartment.TabIndex = 556;
@ -577,7 +569,7 @@
//
// txtHelpCode
//
this.txtHelpCode.Location = new System.Drawing.Point(672, 10);
this.txtHelpCode.Location = new System.Drawing.Point(684, 10);
this.txtHelpCode.Name = "txtHelpCode";
this.txtHelpCode.Size = new System.Drawing.Size(83, 23);
this.txtHelpCode.TabIndex = 554;
@ -585,7 +577,7 @@
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(617, 19);
this.label12.Location = new System.Drawing.Point(631, 16);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(49, 14);
this.label12.TabIndex = 553;
@ -598,7 +590,7 @@
//
this.intPersonOrder.BackgroundStyle.Class = "DateTimeInputBackground";
this.intPersonOrder.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.intPersonOrder.Location = new System.Drawing.Point(468, 93);
this.intPersonOrder.Location = new System.Drawing.Point(672, 73);
this.intPersonOrder.Name = "intPersonOrder";
this.intPersonOrder.ShowUpDown = true;
this.intPersonOrder.Size = new System.Drawing.Size(99, 23);
@ -607,7 +599,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(427, 101);
this.label4.Location = new System.Drawing.Point(631, 75);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(35, 14);
this.label4.TabIndex = 19;
@ -624,7 +616,7 @@
// chkIsValid
//
this.chkIsValid.AutoSize = true;
this.chkIsValid.Location = new System.Drawing.Point(598, 98);
this.chkIsValid.Location = new System.Drawing.Point(802, 75);
this.chkIsValid.Name = "chkIsValid";
this.chkIsValid.Size = new System.Drawing.Size(68, 18);
this.chkIsValid.TabIndex = 13;
@ -633,16 +625,15 @@
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(473, 11);
this.txtName.Location = new System.Drawing.Point(473, 10);
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(138, 23);
this.txtName.TabIndex = 12;
this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(427, 16);
this.label1.Location = new System.Drawing.Point(417, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 14);
this.label1.TabIndex = 11;

View File

@ -24,7 +24,7 @@ namespace AIMS.PublicUI.UI
AIMSExtension.PublicMethod.EnabledControl(panel1, false);
Initial();
intPersonOrder.Text = "0";
GetPersonDataTable();
GetPersonDataTable("", "");
}
private void Initial()
@ -55,6 +55,12 @@ namespace AIMS.PublicUI.UI
cboPersonType.ValueMember = "Id";
cboPersonType.DataSource = DataDictionary.BLL.DataDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='人员类型')");
cboPersonType.SelectedIndex = -1;
this.txtName.Enabled = true;
this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged);
this.cboDepartment.Enabled = true;
this.cboDepartment.SelectedIndexChanged += new System.EventHandler(this.cboDepartment_SelectedIndexChanged);
}
private void tsbExit_Click(object sender, EventArgs e)
@ -65,6 +71,8 @@ namespace AIMS.PublicUI.UI
private void tsbAdd_Click(object sender, EventArgs e)
{
_state = AIMSExtension.EditState.ADD;
this.txtName.TextChanged -= new System.EventHandler(this.txtName_TextChanged);
this.cboDepartment.SelectedIndexChanged -= new System.EventHandler(this.cboDepartment_SelectedIndexChanged);
AIMSExtension.PublicMethod.EnabledControl(panel1, true);
AIMSExtension.PublicMethod.ClearControl(panel1);
}
@ -72,6 +80,8 @@ namespace AIMS.PublicUI.UI
private void tsbModify_Click(object sender, EventArgs e)
{
_state = AIMSExtension.EditState.EDIT;
this.txtName.TextChanged -= new System.EventHandler(this.txtName_TextChanged);
this.cboDepartment.SelectedIndexChanged -= new System.EventHandler(this.cboDepartment_SelectedIndexChanged);
AIMSExtension.PublicMethod.EnabledControl(panel1, true);
if (dgvPerson.Rows.Count > 0)
{
@ -108,6 +118,12 @@ namespace AIMS.PublicUI.UI
_state = AIMSExtension.EditState.BROWSE;
AIMSExtension.PublicMethod.EnabledControl(panel1, false);
AIMSExtension.PublicMethod.ClearControl(panel1);
this.txtName.Enabled = true;
this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged);
this.cboDepartment.Enabled = true;
this.cboDepartment.SelectedIndexChanged += new System.EventHandler(this.cboDepartment_SelectedIndexChanged);
}
private void tsbSava_Click(object sender, EventArgs e)
@ -176,6 +192,11 @@ namespace AIMS.PublicUI.UI
AIMSExtension.PublicMethod.EnabledControl(panel1, false);
AIMSExtension.PublicMethod.ClearControl(panel1);
this.txtName.Enabled = true;
this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged);
this.cboDepartment.Enabled = true;
this.cboDepartment.SelectedIndexChanged += new System.EventHandler(this.cboDepartment_SelectedIndexChanged);
}
}
private bool ValidInput()
@ -212,11 +233,12 @@ namespace AIMS.PublicUI.UI
private void txtName_TextChanged(object sender, EventArgs e)
{
txtHelpCode.Text = AIMSExtension.PublicMethod.GetFirstLetter(txtName.Text.Trim());
GetPersonDataTable(txtName.Text.Trim(), "");
}
private void GetPersonDataTable()
private void GetPersonDataTable(string name, string DepartName)
{
dgvPerson.Rows.Clear();
DataTable dt = BLL.Person.GetPersonDataTable();
DataTable dt = BLL.Person.GetPersonDataTable(name,DepartName);
for (int i = 0; i < dt.Rows.Count; i++)
{
dgvPerson.Rows.Add(dt.Rows[i]["Id"].ToString(),
@ -242,9 +264,11 @@ namespace AIMS.PublicUI.UI
dgvPerson.Rows[dgvPerson.Rows.Count - 1].Selected = true;
dgvPerson.CurrentCell = this.dgvPerson.Rows[dgvPerson.Rows.Count - 1].Cells[1];
}
}
private void cboDepartment_SelectedIndexChanged(object sender, EventArgs e)
{
GetPersonDataTable("", cboDepartment.Text.Trim());
}
}
}

View File

@ -162,6 +162,51 @@
<metadata name="PersonOrderColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DepNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="NoColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="NameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="HelpCodeColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SexColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DiplomaColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="JobTitleColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BirthDayColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TimeToWorkColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PersonTypeColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RoleNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PassWordColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="IsValidColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PersonOrderColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>

View File

@ -43,6 +43,10 @@ namespace AIMS.PublicUI.BLL
{
return new DAL.PersonDB().GetPersonDataTable();
}
public static DataTable GetPersonDataTable(string name,string DeptName)
{
return new DAL.PersonDB().GetPersonDataTable(name,DeptName);
}
public static bool Login(string No, string PassWord)
{
return new DAL.PersonDB().Login(No, PassWord);

View File

@ -128,9 +128,25 @@ namespace AIMS.PublicUI.DAL
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
public DataTable GetPersonDataTable(string name,string DeptName)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("SELECT p.Id,p.No,p.Name,p.HelpCode,p.Sex,p.PassWord,d.Name AS DepName,r.RoleName,p.BirthDay,p.TimeToWork,");
strSql.Append("p.Diploma,p.JobTitle,p.PersonType,p.PersonOrder,CASE p.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid FROM Person p ");
strSql.Append("LEFT JOIN Department d ON d.Id =p.DepId ");
strSql.Append("LEFT JOIN [Role] r ON r.Id = p.RoleId ");
if (name.Length > 0)
strSql.Append(" WHERE p.No like '%" + name + "%' Or p.Name like '%" + name + "%' Or p.HelpCode like '%" + name + "%' ");
if (DeptName.Length > 0 && name.Length==0)
strSql.Append(" WHERE d.Name = '" + DeptName + "' ");
else if (DeptName.Length > 0 && name.Length>0)
strSql.Append(" and d.Name = '" + DeptName + "' ");
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
public bool Login(string No, string PassWord)
{
string strSql = "SELECT * FROM Person p WHERE p.No='" + No + "' and p.[PassWord]='" + PassWord + "'";
string strSql = "SELECT * FROM Person p";
DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
if (dt.Rows.Count > 0)