收费查询功能
This commit is contained in:
parent
1f46522fcc
commit
e4d0de974d
@ -239,6 +239,24 @@
|
||||
<Compile Include="OperationAfter\frmExportConfig.designer.cs">
|
||||
<DependentUpon>frmExportConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OperationAfter\frmOperationCharg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OperationAfter\frmOperationCharg.designer.cs">
|
||||
<DependentUpon>frmOperationCharg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OperationAfter\frmOperationCharg2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OperationAfter\frmOperationCharg2.designer.cs">
|
||||
<DependentUpon>frmOperationCharg2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OperationAfter\frmOperationCharg3.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OperationAfter\frmOperationCharg3.designer.cs">
|
||||
<DependentUpon>frmOperationCharg3.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OperationAfter\frmOperationManage.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -828,6 +846,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DataDictionary\frmPatientKind.resx">
|
||||
<DependentUpon>frmPatientKind.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DataDictionary\frmSysConfig.resx">
|
||||
<DependentUpon>frmSysConfig.cs</DependentUpon>
|
||||
@ -850,9 +869,11 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DrugManagement\frmDosageUnit.resx">
|
||||
<DependentUpon>frmDosageUnit.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DrugManagement\frmPharmaCology.resx">
|
||||
<DependentUpon>frmPharmaCology.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FormMainManage.resx">
|
||||
<DependentUpon>FormMainManage.cs</DependentUpon>
|
||||
@ -870,6 +891,15 @@
|
||||
<EmbeddedResource Include="OperationAfter\frmExportConfig.resx">
|
||||
<DependentUpon>frmExportConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="OperationAfter\frmOperationCharg.resx">
|
||||
<DependentUpon>frmOperationCharg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="OperationAfter\frmOperationCharg2.resx">
|
||||
<DependentUpon>frmOperationCharg2.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="OperationAfter\frmOperationCharg3.resx">
|
||||
<DependentUpon>frmOperationCharg3.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="OperationAfter\frmOperationManage.resx">
|
||||
<DependentUpon>frmOperationManage.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@ -1329,10 +1329,10 @@ namespace AIMS.PublicUI.UI
|
||||
SuperTabControlPanel superTabControlPanel = new SuperTabControlPanel();
|
||||
superTabControlPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
superTabControlPanel.CanvasColor = Color.White;
|
||||
TabSelDrugs.Controls.Add(superTabControlPanel);
|
||||
TabSelDrugs.Tabs.Add(spt);
|
||||
superTabControlPanel.TabItem = spt;
|
||||
spt.AttachedControl = superTabControlPanel;
|
||||
TabSelDrugs.Controls.Add(superTabControlPanel);
|
||||
TabSelDrugs.Tabs.Add(spt);
|
||||
}
|
||||
this.TabSelDrugs.SelectedTabChanged += new System.EventHandler<DevComponents.DotNetBar.SuperTabStripSelectedTabChangedEventArgs>(this.superTabControl1_SelectedTabChanged);
|
||||
TabSelDrugs.SelectedTab = TabSelDrugs.Tabs[0] as SuperTabItem;
|
||||
|
||||
@ -193,14 +193,7 @@ namespace AIMS.PublicUI.UI
|
||||
{
|
||||
decimal XMSL = 1;
|
||||
List<FactDrug> drugsRecords = _record.FactDrugList.Where(a => a.DrugId == drug.Id).ToList();
|
||||
decimal DOSEPER = 0;
|
||||
//最小剂量
|
||||
if (drug.Dosage != null && drug.Dosage != "")
|
||||
DOSEPER = decimal.Parse(drug.Dosage);
|
||||
//最小单位
|
||||
string DOSEPERUNIT = "";
|
||||
if (drug.DosageUnit != null && drug.DosageUnit != "")
|
||||
DOSEPERUNIT = drug.DosageUnit;
|
||||
|
||||
if (drug.Name == "吸入用七氟烷")
|
||||
{
|
||||
decimal dose = 0;
|
||||
@ -222,9 +215,32 @@ namespace AIMS.PublicUI.UI
|
||||
}
|
||||
else
|
||||
{
|
||||
//最小剂量
|
||||
decimal DOSEPER = 0;
|
||||
//最小单位
|
||||
string DOSEPERUNIT = "";
|
||||
decimal dose = 0;
|
||||
foreach (var item in drugsRecords)
|
||||
{
|
||||
if (drug.Dosage != null && drug.Dosage != "")
|
||||
DOSEPER = decimal.Parse(drug.Dosage);
|
||||
if (drug.DosageUnit != null && drug.DosageUnit != "")
|
||||
DOSEPERUNIT = drug.DosageUnit;
|
||||
//3.根据表达式划算 37.5mg/5ml
|
||||
if (drug.Comment != null && drug.Comment != "")
|
||||
{
|
||||
List<string> strings = drug.Comment.Split('|').ToList();
|
||||
foreach (var items in strings)
|
||||
{
|
||||
List<string> units = items.Split('=').ToList();
|
||||
if (units[0] == item.DosageUnit.Trim() || units[0] + "/h" == item.VelocityUnit.Trim() || units[0] + "/min" == item.VelocityUnit.Trim())
|
||||
{
|
||||
DOSEPERUNIT = units[0];
|
||||
DOSEPER = Convert.ToDecimal(units[1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//1.当使用单位等于规格单位 总量增加实际用量
|
||||
if (item.Dosage > 0 && drug.DosageUnit != null && drug.DosageUnit != "")
|
||||
dose += GetConvertedValue(item.Dosage, item.DosageUnit, DOSEPERUNIT);
|
||||
@ -292,7 +308,7 @@ namespace AIMS.PublicUI.UI
|
||||
{
|
||||
value = drugValue;
|
||||
}
|
||||
else if ((drugUnit == "ml/h" || drugUnit == "ml/min") && ConUnit == "ug")
|
||||
else if ((drugUnit == "ml/h" || drugUnit == "ml/min") && ConUnit == "ml")
|
||||
{
|
||||
value = drugValue;
|
||||
}
|
||||
@ -317,87 +333,6 @@ namespace AIMS.PublicUI.UI
|
||||
return value;
|
||||
}
|
||||
|
||||
decimal CalculateDrugDose(Drugs drug)
|
||||
{
|
||||
decimal dosePer = 0;
|
||||
if (decimal.TryParse(drug.Dosage, out decimal parsedDosePer))
|
||||
{
|
||||
dosePer = parsedDosePer;
|
||||
}
|
||||
string dosePerUnit = string.IsNullOrEmpty(drug.DosageUnit) ? "" : drug.DosageUnit;
|
||||
|
||||
List<FactDrug> drugsRecords = _record.FactDrugList.Where(a => a.DrugId == drug.Id).ToList();
|
||||
|
||||
switch (drug.Name)
|
||||
{
|
||||
case "吸入用七氟烷":
|
||||
decimal dose = 0;
|
||||
foreach (var item in drugsRecords.Where(item => item.DrugName == "吸入用七氟烷" && item.Density > 0 && !string.IsNullOrEmpty(item.DensityUnit)))
|
||||
{
|
||||
TimeSpan timeSpan = item.DrugEndTime - item.DrugBeginTime;
|
||||
decimal yndden = 0;
|
||||
_record.FactDrugList.ForEach(a => { if (a.DrugName == "氧气" && a.Velocity > 0) yndden = a.Velocity; });
|
||||
if (yndden > 0)
|
||||
{
|
||||
dose += ((decimal)3.6) * yndden * item.Density * (decimal)Math.Round(timeSpan.TotalHours, 2) + (decimal)5.3;
|
||||
}
|
||||
}
|
||||
return Math.Max(1, Math.Ceiling(dose));
|
||||
|
||||
default:
|
||||
decimal totalDose = drugsRecords.Sum(item =>
|
||||
{
|
||||
if (item.Dosage > 0 && !string.IsNullOrEmpty(item.DosageUnit) && dosePerUnit != "")
|
||||
{
|
||||
decimal convertedDose = GetConvertValue(item.Dosage, item.DosageUnit, dosePerUnit);
|
||||
return convertedDose;
|
||||
}
|
||||
else if (item.Velocity > 0 && !string.IsNullOrEmpty(item.VelocityUnit))
|
||||
{
|
||||
TimeSpan timeSpan = item.DrugEndTime - item.DrugBeginTime;
|
||||
if (item.VelocityUnit.Contains("/h"))
|
||||
{
|
||||
return GetConvertValue(item.Velocity, item.VelocityUnit, dosePerUnit) * (decimal)Math.Round(timeSpan.TotalHours, 2);
|
||||
}
|
||||
else if (item.VelocityUnit.Contains("/min"))
|
||||
{
|
||||
return GetConvertValue(item.Velocity, item.VelocityUnit, dosePerUnit) * (decimal)Math.Round(timeSpan.TotalMinutes, 2);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
decimal calculatedDose = totalDose / dosePer;
|
||||
return Math.Max(1, Math.Ceiling(calculatedDose));
|
||||
}
|
||||
}
|
||||
public decimal GetConvertValue(decimal drugValue, string drugUnit, string ConUnit)
|
||||
{
|
||||
Dictionary<string, decimal> conversionFactors = new Dictionary<string, decimal>()
|
||||
{
|
||||
{"g", 1},
|
||||
{"mg", 0.001m},
|
||||
{"ug", 0.000001m},
|
||||
{"l", 1000},
|
||||
{"ml", 1}
|
||||
};
|
||||
|
||||
string drugUnitKey = drugUnit.EndsWith("/h") || drugUnit.EndsWith("/min") ? drugUnit.Substring(0, drugUnit.Length - 3) : drugUnit;
|
||||
string ConUnitKey = ConUnit.EndsWith("/h") || ConUnit.EndsWith("/min") ? ConUnit.Substring(0, ConUnit.Length - 3) : ConUnit;
|
||||
|
||||
if (drugUnitKey == ConUnitKey)
|
||||
{
|
||||
return drugValue;
|
||||
}
|
||||
|
||||
if (conversionFactors.TryGetValue(drugUnitKey, out decimal drugFactor) && conversionFactors.TryGetValue(ConUnitKey, out decimal conFactor))
|
||||
{
|
||||
return drugValue * drugFactor / conFactor;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
private void SetChargDrugPrice()
|
||||
{
|
||||
int chargCount = 0;
|
||||
@ -658,6 +593,8 @@ namespace AIMS.PublicUI.UI
|
||||
}
|
||||
feesR.FeeCode = dr.Cells[2].EditedFormattedValue.ToString();
|
||||
feesR.FeeSerial = dr.Cells[2].EditedFormattedValue.ToString();
|
||||
feesR.ChargName = dr.Cells[3].EditedFormattedValue.ToString();
|
||||
feesR.ChargSpec = dr.Cells[4].EditedFormattedValue.ToString();
|
||||
feesR.Unit = dr.Cells[6].EditedFormattedValue.ToString();
|
||||
feesR.FeeNum = dr.Cells[7].EditedFormattedValue.ToString();
|
||||
feesR.FeeClass = dr.Cells[1].EditedFormattedValue.ToString();
|
||||
@ -679,8 +616,8 @@ namespace AIMS.PublicUI.UI
|
||||
feesR.ExecWorkId = _worker.Id.ToString();
|
||||
feesR.ExecWork = _worker.Name;
|
||||
feesR.ExecState = "";
|
||||
feesR.ExecTime = DateTime.Now.ToString();
|
||||
}
|
||||
feesR.ExecTime = DateTime.Now;
|
||||
feesR.IsUpLoad = "0";
|
||||
feesR.OperatorId = PublicMethod.OperatorId;
|
||||
feesR.OperatorNo = PublicMethod.OperatorNo;
|
||||
@ -948,7 +885,7 @@ namespace AIMS.PublicUI.UI
|
||||
dgvTxt = (DataGridViewTextBoxEditingControl)e.Control; // 得到单元格
|
||||
dgvTxt.KeyPress -= new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件
|
||||
dgvTxt.KeyPress += new KeyPressEventHandler(dgvTxt_KeyPress); // 绑定事件
|
||||
//SetChargDrugPrice();
|
||||
//SetChargDrugPrice();
|
||||
}
|
||||
}
|
||||
|
||||
@ -976,7 +913,7 @@ namespace AIMS.PublicUI.UI
|
||||
if (n > 0) e.Handled = true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 收费类型加载
|
||||
private void btnTypeManager_Click(object sender, EventArgs e)
|
||||
|
||||
@ -104,73 +104,87 @@ namespace AIMS.OperationAanesthesia
|
||||
}
|
||||
}
|
||||
}
|
||||
//for (int i = 0; i < list.Count; i++)
|
||||
//{
|
||||
// int j = 0;
|
||||
// foreach (DataRow dr in dt.Rows)
|
||||
// {
|
||||
// if (dr["OperationRoom"].ToString() != list[i]) continue;
|
||||
// ucPatientCard uc = new ucPatientCard(dr);
|
||||
// uc.InRoom += Uc_InRoom;
|
||||
// uc.QxRoom += Uc_QxRoom;
|
||||
// uc.Clicks += Uc_Clicks;
|
||||
// uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30);
|
||||
// panel3.Controls.Add(uc);
|
||||
// j++;
|
||||
// }
|
||||
|
||||
// foreach (DataRow dr in dt2.Rows)
|
||||
// {
|
||||
// if (dr["OperationRoom"].ToString() != list[i]) continue;
|
||||
// ucPatientCard uc = new ucPatientCard(dr);
|
||||
// uc.InRoom += Uc_InRoom;
|
||||
// uc.QxRoom += Uc_QxRoom;
|
||||
// uc.Clicks += Uc_Clicks;
|
||||
// uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30);
|
||||
// panel3.Controls.Add(uc);
|
||||
// j++;
|
||||
// }
|
||||
//}
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
if (cboRoom.Text != "")
|
||||
{
|
||||
int j = 0;
|
||||
int Pointx = 0;
|
||||
int i = 0, j = 0;
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
if (dr["OperationRoom"].ToString() != list[i]) continue;
|
||||
if (dr["OperationRoom"].ToString() != cboRoom.Text) continue;
|
||||
ucPatientCard uc = new ucPatientCard(dr);
|
||||
uc.InRoom += Uc_InRoom;
|
||||
uc.QxRoom += Uc_QxRoom;
|
||||
uc.Clicks += Uc_Clicks;
|
||||
uc.Location = new Point((uc.Width + 9) * i, (uc.Height + 10) * j + 30);
|
||||
uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30);
|
||||
panel3.Controls.Add(uc);
|
||||
j++; Pointx = (uc.Width + 9) * i;
|
||||
j++;
|
||||
if (j == 5)
|
||||
{
|
||||
i++;
|
||||
j = 0;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (DataRow dr in dt2.Rows)
|
||||
{
|
||||
if (dr["OperationRoom"].ToString() != list[i]) continue;
|
||||
if (dr["OperationRoom"].ToString() != cboRoom.Text) continue;
|
||||
ucPatientCard uc = new ucPatientCard(dr);
|
||||
uc.InRoom += Uc_InRoom;
|
||||
uc.QxRoom += Uc_QxRoom;
|
||||
uc.Clicks += Uc_Clicks;
|
||||
uc.Location = new Point((uc.Width + 9) * i, (uc.Height + 10) * j + 30);
|
||||
uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30);
|
||||
panel3.Controls.Add(uc);
|
||||
j++;
|
||||
Pointx = (uc.Width + 9) * i;
|
||||
}
|
||||
|
||||
if (Pointx > 0)
|
||||
{
|
||||
DevComponents.DotNetBar.Controls.Line line1 = new DevComponents.DotNetBar.Controls.Line();
|
||||
line1.Location = new System.Drawing.Point(Pointx - 10, 0);
|
||||
line1.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;
|
||||
line1.Size = new System.Drawing.Size(10, panel3.Height);
|
||||
line1.ForeColor = Color.DarkGray;
|
||||
line1.VerticalLine = true;
|
||||
panel3.Controls.Add(line1);
|
||||
if (j == 5)
|
||||
{
|
||||
i++;
|
||||
j = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < list.Count; i++)
|
||||
{
|
||||
int j = 0;
|
||||
int Pointx = 0;
|
||||
foreach (DataRow dr in dt.Rows)
|
||||
{
|
||||
if (dr["OperationRoom"].ToString() != list[i]) continue;
|
||||
ucPatientCard uc = new ucPatientCard(dr);
|
||||
uc.InRoom += Uc_InRoom;
|
||||
uc.QxRoom += Uc_QxRoom;
|
||||
uc.Clicks += Uc_Clicks;
|
||||
uc.Location = new Point((uc.Width + 9) * i, (uc.Height + 10) * j + 30);
|
||||
panel3.Controls.Add(uc);
|
||||
j++; Pointx = (uc.Width + 9) * i;
|
||||
}
|
||||
|
||||
foreach (DataRow dr in dt2.Rows)
|
||||
{
|
||||
if (dr["OperationRoom"].ToString() != list[i]) continue;
|
||||
ucPatientCard uc = new ucPatientCard(dr);
|
||||
uc.InRoom += Uc_InRoom;
|
||||
uc.QxRoom += Uc_QxRoom;
|
||||
uc.Clicks += Uc_Clicks;
|
||||
uc.Location = new Point((uc.Width + 9) * i, (uc.Height + 10) * j + 30);
|
||||
panel3.Controls.Add(uc);
|
||||
j++;
|
||||
Pointx = (uc.Width + 9) * i;
|
||||
}
|
||||
|
||||
if (Pointx > 0)
|
||||
{
|
||||
DevComponents.DotNetBar.Controls.Line line1 = new DevComponents.DotNetBar.Controls.Line();
|
||||
line1.Location = new System.Drawing.Point(Pointx - 10, 0);
|
||||
line1.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;
|
||||
line1.Size = new System.Drawing.Size(10, panel3.Height);
|
||||
line1.ForeColor = Color.DarkGray;
|
||||
line1.VerticalLine = true;
|
||||
panel3.Controls.Add(line1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -271,7 +285,7 @@ namespace AIMS.OperationAanesthesia
|
||||
if (tempfrmAnasRecord != null && tempfrmAnasRecord._record != null)
|
||||
{
|
||||
frmAnasRecord = tempfrmAnasRecord;
|
||||
frmAnasRecord.ClearRecordDate();
|
||||
frmAnasRecord.ClearRecordDate();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -297,7 +311,7 @@ namespace AIMS.OperationAanesthesia
|
||||
FillDgv();
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
@ -308,7 +322,7 @@ namespace AIMS.OperationAanesthesia
|
||||
if (tempfrmAnasRecord != null && tempfrmAnasRecord._record != null)
|
||||
{
|
||||
frmAnasRecord = tempfrmAnasRecord;
|
||||
frmAnasRecord.ClearRecordDate();
|
||||
frmAnasRecord.ClearRecordDate();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -332,7 +346,7 @@ namespace AIMS.OperationAanesthesia
|
||||
FillDgv();
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
@ -515,7 +529,7 @@ namespace AIMS.OperationAanesthesia
|
||||
}
|
||||
|
||||
private void buttonX2_Click(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
string RoomStr = txtRoom.Tag.ToString();
|
||||
if (RoomStr != "")
|
||||
{
|
||||
|
||||
@ -10,7 +10,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace KHD_OREMR.UserControls
|
||||
namespace AIMS.OperationAfter.UI
|
||||
{
|
||||
public partial class frmExportConfig : Form
|
||||
{
|
||||
|
||||
2
AIMS/OperationAfter/frmExportConfig.designer.cs
generated
2
AIMS/OperationAfter/frmExportConfig.designer.cs
generated
@ -1,4 +1,4 @@
|
||||
namespace KHD_OREMR.UserControls
|
||||
namespace AIMS.OperationAfter.UI
|
||||
{
|
||||
partial class frmExportConfig
|
||||
{
|
||||
|
||||
402
AIMS/OperationAfter/frmOperationCharg.cs
Normal file
402
AIMS/OperationAfter/frmOperationCharg.cs
Normal file
@ -0,0 +1,402 @@
|
||||
using AIMSBLL;
|
||||
using AIMSExtension;
|
||||
using AIMSModel;
|
||||
using DrawGraph;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AIMS.OperationAfter.UI
|
||||
{
|
||||
public partial class frmOperationCharg : Form
|
||||
{
|
||||
|
||||
public string FeeType = "麻醉";
|
||||
public frmOperationCharg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void frmOperationChargCheck2_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
dgvYP.AutoGenerateColumns = false;
|
||||
//DataGridViewSettingManager.GetInstance().AttachDataGridView(dgvtEMPOperationInfos);
|
||||
//if (PublicMethod.Operator.RoleRef.Name != "系统管理员")
|
||||
//{
|
||||
// tsbSettingDGV.Visible = false;
|
||||
// label2.Visible = false;
|
||||
//}
|
||||
this.txtPatName.TextChanged += new System.EventHandler(this.txtPatName_TextChanged);
|
||||
this.txtPatName.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.dgvTextYP_PreviewKeyDownEvent);
|
||||
this.txtPatCaseNO.TextChanged += new System.EventHandler(this.txtPatCaseNO_TextChanged);
|
||||
this.txtPatCaseNO.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.dgvTextYP_PreviewKeyDownEvent);
|
||||
|
||||
//rdoZQ.Checked = true;
|
||||
Role role = BRole.SelectSingle(PublicMethod.RoleId);
|
||||
if (role.RoleName.Contains("麻") || role.Id == 1)
|
||||
{
|
||||
radioButton1.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
radioButton1.Checked = false;
|
||||
}
|
||||
}
|
||||
catch (Exception exp)
|
||||
{
|
||||
PublicMethod.WriteLog(exp);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (txtPatCaseNO.Text != "" || txtPatName.Text != "")
|
||||
{
|
||||
DataTable dt = BOperationRecord.GetOpeIdByNoName(txtPatCaseNO.Text.Trim(), txtPatName.Text.Trim());
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
int OpeID = int.Parse(dt.Rows[0]["id"].ToString());
|
||||
dgvYP.Visible = false;
|
||||
dgvtEMPOperationInfos.Rows.Clear();
|
||||
lblName.Text = "";
|
||||
lblInHospitalNo.Text = "";
|
||||
label1.Text = "";
|
||||
label4.Text = "";
|
||||
|
||||
lblName.Text = dt.Rows[0]["PatientName"].ToString();
|
||||
lblInHospitalNo.Text = dt.Rows[0]["MdrecNo"].ToString();
|
||||
if (dt.Rows[0]["OperationBeginTime"].ToString() != "")
|
||||
{
|
||||
label1.Text = dt.Rows[0]["OperationBeginTime"].ToString();
|
||||
}
|
||||
SetChargDetalie(OpeID.ToString());
|
||||
|
||||
SetChargDrugLbl();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadSelectDate(DataGridViewRow dr)
|
||||
{
|
||||
int OpeID = int.Parse(dr.Cells["id"].EditedFormattedValue.ToString());
|
||||
dgvYP.Visible = false;
|
||||
dgvtEMPOperationInfos.Rows.Clear();
|
||||
lblName.Text = "";
|
||||
lblInHospitalNo.Text = "";
|
||||
label1.Text = "";
|
||||
label4.Text = "";
|
||||
|
||||
lblName.Text = dr.Cells["DrugName"].EditedFormattedValue.ToString();
|
||||
lblInHospitalNo.Text = dr.Cells["TypeName"].EditedFormattedValue.ToString();
|
||||
label1.Text = dr.Cells["InRoomTime"].EditedFormattedValue.ToString();
|
||||
SetChargDetalie(OpeID.ToString());
|
||||
|
||||
//if (FeeType == "麻醉")
|
||||
//{
|
||||
// OperationRecord _pauoperationRecord = BOperationRecord.SelectSingle(" ParentId=" + OpeID, null, RecursiveType.None, 0);
|
||||
// if (_pauoperationRecord != null)
|
||||
// {
|
||||
// SetChargDetalie(_pauoperationRecord);
|
||||
// }
|
||||
//}
|
||||
|
||||
SetChargDrugLbl();
|
||||
}
|
||||
|
||||
private void toolStripButton10_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 表格配置
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void tsbSettingDGV_Click(object sender, EventArgs e)
|
||||
{
|
||||
//DataGridViewSettingManager.GetInstance().ShowConfigUI(dgvtEMPOperationInfos);
|
||||
//dgvtEMPOperationInfos.AllowUserToAddRows = false;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dgvtEMPOperationInfos.Rows.Count < 0 || dgvtEMPOperationInfos.Rows.Count < 1)
|
||||
{
|
||||
MessageBox.Show("没有记录,请查询到数据后再导出数据到Excel");
|
||||
return;
|
||||
}
|
||||
//DataGridViewToExcel.DataToExcel(dgvtEMPOperationInfos);
|
||||
}
|
||||
|
||||
private void SetChargDetalie(string _operationRecordId)
|
||||
{
|
||||
try
|
||||
{
|
||||
IList<FeesRecord> frees = BFeesRecord.Select("FeeType='" + FeeType + "' and OperationRecordId=" + _operationRecordId, null);
|
||||
foreach (var item in frees)
|
||||
{
|
||||
int index = dgvtEMPOperationInfos.Rows.Add();
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["DId"].Value = item.Id;// 编号
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["code"].Value = item.BillCode;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["type"].Value = item.FeeTypeId;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["Doctor"].Value = item.BillingWork;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["name"].Value = item.ChargName;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["spec"].Value = item.ChargSpec;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["unit"].Value = item.Unit;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["qty"].Value = item.FeeNum;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["price"].Value = item.UnitPrice;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["pageno"].Value = item.ChargePrice;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["ordersn"].Value = item.ExecWork;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells["coftime"].Value = item.ExecTime;
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
PublicMethod.WriteLog(ex);
|
||||
}
|
||||
}
|
||||
private void SetChargDrugLbl()
|
||||
{
|
||||
int chargCount = 0;
|
||||
double chargValue = 0;
|
||||
foreach (DataGridViewRow item in dgvtEMPOperationInfos.Rows)
|
||||
{
|
||||
if (item.Cells["qty"].EditedFormattedValue.ToString() != "" && item.Cells["price"].EditedFormattedValue.ToString() != "" && item.Cells["name"].EditedFormattedValue.ToString() != "")
|
||||
{
|
||||
double res = 0;
|
||||
if (double.TryParse(item.Cells["qty"].EditedFormattedValue.ToString(), out res))
|
||||
{
|
||||
double price = double.Parse(item.Cells["price"].Value.ToString());
|
||||
chargCount++;
|
||||
double rowprice = res * price;
|
||||
chargValue += rowprice;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (chargCount > 0)
|
||||
{
|
||||
label4.Text = string.Format(" {0}元 项目:{1}条", chargValue, chargCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
label4.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
public int maxOrder = 0;
|
||||
private void dgvtEMPOperationInfos_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||
{
|
||||
SolidBrush b = new SolidBrush(dgvtEMPOperationInfos.RowHeadersDefaultCellStyle.ForeColor);
|
||||
e.Graphics.DrawString((maxOrder + e.RowIndex + 1).ToString(System.Globalization.CultureInfo.CurrentUICulture), this.dgvtEMPOperationInfos.DefaultCellStyle.Font, b, e.RowBounds.Location.X + 20, e.RowBounds.Location.Y + 4);
|
||||
}
|
||||
private void rdoZQ_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (radioButton1.Checked == true)
|
||||
{
|
||||
FeeType = "麻醉";
|
||||
}
|
||||
else
|
||||
{
|
||||
FeeType = "护士";
|
||||
}
|
||||
}
|
||||
|
||||
private void txtPatCaseNO_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
if (dgvYP.Visible == false)
|
||||
{
|
||||
//btnOK_Click(null, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadSelectDate(dgvYP.Rows[0]);
|
||||
txtPatCaseNO.Text = dgvYP.Rows[0].Cells[1].EditedFormattedValue.ToString();
|
||||
dgvYP.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void txtPatCaseNO_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//显示并定位药品选择列表
|
||||
if (dgvYP.Visible == false)
|
||||
{
|
||||
dgvYP.Visible = true;
|
||||
}
|
||||
//药品名称单元格为空时,隐藏选择药品列表,否则为选择药品列表加载数据
|
||||
if (txtPatCaseNO.Text == "")
|
||||
{
|
||||
dgvYP.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
string str = txtPatCaseNO.Text.Trim();
|
||||
DataTable dt = BOperationRecord.GetOpesByNo(txtPatCaseNO.Text.Trim());
|
||||
dgvYP.DataSource = dt;
|
||||
}
|
||||
}
|
||||
|
||||
private void txtPatName_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//显示并定位药品选择列表
|
||||
if (dgvYP.Visible == false)
|
||||
{
|
||||
dgvYP.Visible = true;
|
||||
}
|
||||
//药品名称单元格为空时,隐藏选择药品列表,否则为选择药品列表加载数据
|
||||
if (txtPatName.Text == "")
|
||||
{
|
||||
dgvYP.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
string str = txtPatName.Text.Trim();
|
||||
DataTable dt = BOperationRecord.GetOpesByName(txtPatName.Text.Trim());
|
||||
dgvYP.DataSource = dt;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 药品名称单元格按键事件(判断输入上下箭头并处理)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void dgvTextYP_PreviewKeyDownEvent(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
//药品名称单元格为空时,返回
|
||||
//显示并定位选择药品列表
|
||||
if (dgvYP.Visible == false)
|
||||
{
|
||||
dgvYP.Visible = true;
|
||||
}
|
||||
//判断按下上下键时,选择药品列表获得焦点并定位光标
|
||||
if (e.KeyCode == Keys.Up)
|
||||
{
|
||||
dgvYP.Focus();
|
||||
dgvYP.Rows[dgvYP.Rows.Count - 1].Selected = true;
|
||||
dgvYP.CurrentCell = dgvYP.Rows[dgvYP.Rows.Count - 1].Cells[2];
|
||||
}
|
||||
if (e.KeyCode == Keys.Down)
|
||||
{
|
||||
if (dgvYP.Rows.Count > 0)
|
||||
{
|
||||
dgvYP.Focus();
|
||||
dgvYP.Rows[1].Selected = true;
|
||||
dgvYP.CurrentCell = dgvYP.Rows[1].Cells[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//定位当前行索引
|
||||
int index = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 向药品表添加数据
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
private void SetYPContent(DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e != null)
|
||||
{
|
||||
index = e.RowIndex;
|
||||
}
|
||||
if (dgvYP.Rows[index].Cells["DrugName"].EditedFormattedValue.ToString() != "")
|
||||
{
|
||||
this.txtPatName.TextChanged -= new System.EventHandler(this.txtPatName_TextChanged);
|
||||
this.txtPatName.PreviewKeyDown -= new System.Windows.Forms.PreviewKeyDownEventHandler(this.dgvTextYP_PreviewKeyDownEvent);
|
||||
this.txtPatCaseNO.TextChanged -= new System.EventHandler(this.txtPatCaseNO_TextChanged);
|
||||
this.txtPatCaseNO.PreviewKeyDown -= new System.Windows.Forms.PreviewKeyDownEventHandler(this.dgvTextYP_PreviewKeyDownEvent);
|
||||
|
||||
LoadSelectDate(dgvYP.Rows[index]);
|
||||
txtPatCaseNO.Text = dgvYP.Rows[index].Cells[1].EditedFormattedValue.ToString();
|
||||
dgvYP.Visible = false;
|
||||
|
||||
this.txtPatName.TextChanged += new System.EventHandler(this.txtPatName_TextChanged);
|
||||
this.txtPatName.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.dgvTextYP_PreviewKeyDownEvent);
|
||||
this.txtPatCaseNO.TextChanged += new System.EventHandler(this.txtPatCaseNO_TextChanged);
|
||||
this.txtPatCaseNO.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.dgvTextYP_PreviewKeyDownEvent);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 鼠标点击选择药品列表时,向使用药品表添加数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void dgvYP_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.RowIndex >= 0)
|
||||
{
|
||||
SetYPContent(e);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 选择药品列表上点击上下键定位并移动光标
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void dgvYP_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Down)
|
||||
{
|
||||
if (dgvYP.CurrentRow.Index == dgvYP.Rows.Count - 1)
|
||||
{
|
||||
e.Handled = true;
|
||||
dgvYP.CurrentCell = dgvYP.Rows[0].Cells[3];
|
||||
dgvYP.Rows[0].Selected = true;
|
||||
}
|
||||
}
|
||||
if (e.KeyCode == Keys.Up)
|
||||
{
|
||||
if (dgvYP.CurrentRow.Index == 0)
|
||||
{
|
||||
e.Handled = true;
|
||||
dgvYP.CurrentCell = dgvYP.Rows[dgvYP.Rows.Count - 1].Cells[3];
|
||||
dgvYP.Rows[dgvYP.Rows.Count - 1].Selected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 选择药品列表点击回车键向使用药品列表添加数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void dgvYP_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (e.KeyChar.ToString() == "\r")
|
||||
{
|
||||
if (dgvYP.SelectedRows.Count > 0)
|
||||
{
|
||||
SetYPContent(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 选择药品列表点击回车时先定位当前行的索引
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void dgvYP_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
index = dgvYP.CurrentRow.Index;
|
||||
}
|
||||
}
|
||||
|
||||
private void txtPatCaseNO_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtPatCaseNO.Text = "";
|
||||
txtPatName.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
1059
AIMS/OperationAfter/frmOperationCharg.designer.cs
generated
Normal file
1059
AIMS/OperationAfter/frmOperationCharg.designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
195
AIMS/OperationAfter/frmOperationCharg.resx
Normal file
195
AIMS/OperationAfter/frmOperationCharg.resx
Normal file
@ -0,0 +1,195 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="DId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="code.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="type.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="doctor.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="unit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="qty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="pageno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ordersn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="coftime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="hcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="hisOrdersn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Hiscount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="hisState.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="drugsstate.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="TypeName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="DrugName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dept.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="deic.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bed.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Inroomtime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="state.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
292
AIMS/OperationAfter/frmOperationCharg2.cs
Normal file
292
AIMS/OperationAfter/frmOperationCharg2.cs
Normal file
@ -0,0 +1,292 @@
|
||||
using AIMSBLL;
|
||||
using AIMSExtension;
|
||||
using AIMSModel;
|
||||
using DrawGraph;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AIMS.OperationAfter.UI
|
||||
{
|
||||
public partial class frmOperationCharg2 : Form
|
||||
{
|
||||
|
||||
DataTable operationApplys;
|
||||
public string TemplateType = "麻醉";
|
||||
public frmOperationCharg2()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
private void frmOperationChargCheck_Load(object sender, EventArgs e)
|
||||
{
|
||||
dgvOperation.AutoGenerateColumns = false;
|
||||
dtpOpeTime.Value = DateTime.Now;
|
||||
dtpEnd.Value = dtpOpeTime.Value;
|
||||
|
||||
Initial();
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
DateTime beginTime = Convert.ToDateTime(dtpOpeTime.Value.ToShortDateString() + " 00:00:00");
|
||||
DateTime endTime = Convert.ToDateTime(dtpEnd.Value.ToShortDateString() + " 23:59:59");
|
||||
string sql = string.Empty;
|
||||
if (!txtPatCaseNO.Text.Trim().Equals(""))
|
||||
{
|
||||
sql = " [StateId] in(6,8,9) and RecoverId=1 and MdrecNo like '%" + txtPatCaseNO.Text.Trim() + "%'";
|
||||
}
|
||||
else if (!txtPatName.Text.Trim().Equals(""))
|
||||
{
|
||||
sql = " [StateId] in(6,8,9) and RecoverId=1 and PatientName like'%" + txtPatName.Text.Trim() + "%'";
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = string.Format(" [StateId] in(6,8,9) and RecoverId=1 and InRoomTime>'{0}' and InRoomTime<'{1}'", beginTime, endTime);
|
||||
}
|
||||
//sql += " order by RoomOrderBy asc";
|
||||
operationApplys = BOperationRecord.GetAllOperationRecordInfo(sql);
|
||||
LoadSelectDate();
|
||||
dgvtEMPOperationInfos.Rows.Clear();
|
||||
|
||||
//Task.Factory.StartNew(() =>
|
||||
//{
|
||||
// BindtHisDrugOrdersSDYToDgv(sql);
|
||||
//});
|
||||
}
|
||||
|
||||
//private void BindtHisDrugOrdersSDYToDgv(string sql)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// DataTable data = BOperationRecord.GetAllOperationRecordInfoChagesState(sql);
|
||||
// for (int i = 0; i < dgvOperation.Rows.Count; i++)
|
||||
// {
|
||||
// DataGridViewRow item = dgvOperation.Rows[i];
|
||||
// int OpeID = 0;
|
||||
// OpeID = Convert.ToInt32(item.Cells[0].Value.ToString());
|
||||
// if (OpeID == 0) return;
|
||||
// foreach (DataRow item1 in data.Rows)
|
||||
// {
|
||||
// if (item1[0] != null && item1[0].ToString() != "")
|
||||
// {
|
||||
// if (item1[0].ToString() == OpeID.ToString())
|
||||
// {
|
||||
// item.Cells["chagestate"].Value = item1["chagestate"].ToString();
|
||||
// item.Cells["chargstatenurse"].Value = item1["chargstatenurse"].ToString();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// PublicMethod.WriteLog(ex);
|
||||
// }
|
||||
//}
|
||||
private void Initial()
|
||||
{
|
||||
btnOK_Click(null, null);
|
||||
}
|
||||
/// <summary>
|
||||
/// 点击查询加载DGV数据
|
||||
/// </summary>
|
||||
public void LoadSelectDate()
|
||||
{
|
||||
dgvOperation.DataSource = operationApplys;
|
||||
lblMessage.Text = "符合当前条件的记录数:" + operationApplys.Rows.Count;
|
||||
}
|
||||
|
||||
private void tsbChangeOpe_Click(object sender, EventArgs e)
|
||||
{
|
||||
int OpeID = 0;
|
||||
if (dgvOperation.SelectedRows.Count > 0)
|
||||
{
|
||||
OpeID = Convert.ToInt32(dgvOperation.SelectedRows[0].Cells[0].Value.ToString());
|
||||
}
|
||||
if (OpeID == 0) return;
|
||||
}
|
||||
|
||||
private void tsbChangeRecoveOpe_Click(object sender, EventArgs e)
|
||||
{
|
||||
int OpeID = 0;
|
||||
if (dgvOperation.SelectedRows.Count > 0)
|
||||
{
|
||||
OpeID = Convert.ToInt32(dgvOperation.SelectedRows[0].Cells[0].Value.ToString());
|
||||
}
|
||||
if (OpeID == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
OperationRecord _operationRecord = BOperationRecord.SelectSingle(OpeID, RecursiveType.None, 0);
|
||||
|
||||
|
||||
//frmChargRecordPrintSDY frmchargRecord = new frmChargRecordPrintSDY(_operationRecord);
|
||||
//frmchargRecord.TemplateType = "麻醉";
|
||||
//frmchargRecord.Show();
|
||||
|
||||
}
|
||||
|
||||
private void toolStripButton10_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private bool compareTime(DateTime time1, DateTime time2)
|
||||
{
|
||||
int y1 = time1.Year;
|
||||
int y2 = time2.Year;
|
||||
int M1 = time1.Month;
|
||||
int M2 = time2.Month;
|
||||
int d1 = time1.Day;
|
||||
int d2 = time2.Day;
|
||||
if (y1 == y2 && M1 == M2 && d1 == d2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 表格配置
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void tsbSettingDGV_Click(object sender, EventArgs e)
|
||||
{
|
||||
//DataGridViewSettingManager.GetInstance().ShowConfigUI(dgvOperation);
|
||||
//dgvOperation.AllowUserToAddRows = false;
|
||||
}
|
||||
|
||||
private void dgvOperation_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||
{
|
||||
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, dgvOperation.RowHeadersWidth - 4, e.RowBounds.Height);
|
||||
|
||||
TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(),
|
||||
dgvOperation.RowHeadersDefaultCellStyle.Font,
|
||||
rectangle,
|
||||
dgvOperation.RowHeadersDefaultCellStyle.ForeColor,
|
||||
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
|
||||
}
|
||||
|
||||
private void btnBeforeDay_Click(object sender, EventArgs e)
|
||||
{
|
||||
dtpOpeTime.Value = dtpOpeTime.Value.AddDays(-1);
|
||||
dtpEnd.Value = dtpEnd.Value.AddDays(-1);
|
||||
btnOK_Click(null, null);
|
||||
}
|
||||
|
||||
private void btnAfterDay_Click(object sender, EventArgs e)
|
||||
{
|
||||
dtpOpeTime.Value = dtpOpeTime.Value.AddDays(1);
|
||||
dtpEnd.Value = dtpEnd.Value.AddDays(1);
|
||||
btnOK_Click(null, null);
|
||||
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dgvOperation.Rows.Count < 0 || dgvOperation.Rows.Count < 1)
|
||||
{
|
||||
MessageBox.Show("没有记录,请查询到数据后再导出数据到Excel");
|
||||
return;
|
||||
}
|
||||
//DataGridViewToExcel.DataToExcel(dgvOperation);
|
||||
}
|
||||
|
||||
private void cboRoom_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
btnOK_Click(null, null);
|
||||
}
|
||||
|
||||
private void dgvOperation_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
int OpeID = 0;
|
||||
if (dgvOperation.SelectedRows.Count > 0)
|
||||
{
|
||||
OpeID = Convert.ToInt32(dgvOperation.SelectedRows[0].Cells[0].Value.ToString());
|
||||
}
|
||||
if (OpeID == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
dgvtEMPOperationInfos.Rows.Clear();
|
||||
OperationRecord _operationRecord = BOperationRecord.SelectSingle(OpeID, RecursiveType.None, 0);
|
||||
SetChargDetalie(_operationRecord);
|
||||
|
||||
}
|
||||
|
||||
private void SetChargDetalie(OperationRecord _operationRecord)
|
||||
{
|
||||
List<FeesRecord> tEMPOperationInfoBackupss = BFeesRecord.Select("OperationRecordId='" + _operationRecord.Id + "' and FeeType='" + TemplateType + "' ", null);
|
||||
if (tEMPOperationInfoBackupss != null && tEMPOperationInfoBackupss.Count > 0)
|
||||
{
|
||||
foreach (var item in tEMPOperationInfoBackupss)
|
||||
{
|
||||
int index = dgvtEMPOperationInfos.Rows.Add();
|
||||
dgvtEMPOperationInfos.Rows[index].Cells[0].Value = item.Id;// 编号
|
||||
dgvtEMPOperationInfos.Rows[index].Cells[1].Value = item.BillCode;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells[2].Value = item.ChargName += " " + item.ChargSpec;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells[3].Value = item.Unit;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells[4].Value = item.FeeNum;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells[5].Value = item.UnitPrice;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells[6].Value = item.ChargePrice;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells[7].Value = item.ExecWork;
|
||||
dgvtEMPOperationInfos.Rows[index].Cells[8].Value = item.ExecTime;
|
||||
//dgvtEMPOperationInfos.Rows[index].Cells["type"].Value = item.FeeTypeId;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void rdoZQ_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rdoZQ.Checked == true)
|
||||
{
|
||||
TemplateType = "麻醉";
|
||||
dgvOperation.Columns["chagestate"].Visible = true;
|
||||
dgvOperation.Columns["chargstatenurse"].Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
TemplateType = "护士";
|
||||
dgvOperation.Columns["chargstatenurse"].Visible = true;
|
||||
dgvOperation.Columns["chagestate"].Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
public int maxOrder = 0;
|
||||
private void dgvtEMPOperationInfos_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||
{
|
||||
SolidBrush b = new SolidBrush(dgvtEMPOperationInfos.RowHeadersDefaultCellStyle.ForeColor);
|
||||
e.Graphics.DrawString((maxOrder + e.RowIndex + 1).ToString(System.Globalization.CultureInfo.CurrentUICulture), this.dgvtEMPOperationInfos.DefaultCellStyle.Font, b, e.RowBounds.Location.X + 20, e.RowBounds.Location.Y + 4);
|
||||
|
||||
//隔行换色
|
||||
this.dgvtEMPOperationInfos.RowsDefaultCellStyle.BackColor = Color.White;//设置背景为白色
|
||||
this.dgvtEMPOperationInfos.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(242)))), (((int)(((byte)242)))));//青色
|
||||
}
|
||||
private bool CheckFormIsOpen(string Forms)
|
||||
{
|
||||
bool bResult = false;
|
||||
foreach (Form frm in Application.OpenForms)
|
||||
{
|
||||
if (frm.Name == Forms)
|
||||
{
|
||||
bResult = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return bResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
1185
AIMS/OperationAfter/frmOperationCharg2.designer.cs
generated
Normal file
1185
AIMS/OperationAfter/frmOperationCharg2.designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
225
AIMS/OperationAfter/frmOperationCharg2.resx
Normal file
225
AIMS/OperationAfter/frmOperationCharg2.resx
Normal file
@ -0,0 +1,225 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="OpeationId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="OperationApplyId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PatientId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="OperationType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PatientDept.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="OperationRoom.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="InHospitalNo.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PatientName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Sex.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="FullBed.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="OperationName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="AnaesthesiaMethodName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="OperationDoctor.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="AnesthesiaDoctor.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Inroomtime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="anesBegintime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Anesendtime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="outroomtime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="chagestate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="chargstatenurse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="DId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="DUnit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn23.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn24.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="groupno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="execwork.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="exectime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ordersn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="hisOrdersn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Hiscount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="hisState.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="drugsstate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
212
AIMS/OperationAfter/frmOperationCharg3.cs
Normal file
212
AIMS/OperationAfter/frmOperationCharg3.cs
Normal file
@ -0,0 +1,212 @@
|
||||
using AIMSBLL;
|
||||
using AIMSExtension;
|
||||
using AIMSModel;
|
||||
using DevComponents.Editors;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AIMS.OperationAfter.UI
|
||||
{
|
||||
public partial class frmOperationCharg3 : Form
|
||||
{
|
||||
|
||||
DataTable operationApplys;
|
||||
public string FeeType = "麻醉";
|
||||
public List<FeesRecordReport> upHisDrugs;
|
||||
|
||||
public frmOperationCharg3()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
private void frmOperationDruggCheck_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
dtpOpeTime.Value = DateTime.Now;
|
||||
dtpEnd.Value = dtpOpeTime.Value;
|
||||
dgvOperation.AutoGenerateColumns = false;
|
||||
dgvtEMPOperationInfos.AutoGenerateColumns = false;
|
||||
dgvHZD.AutoGenerateColumns = false;
|
||||
|
||||
LoadSelectDate();
|
||||
if (upHisDrugs != null && upHisDrugs.Count > 0)
|
||||
{
|
||||
dtpOpeTime.Value = upHisDrugs[0].EndTime.Value;
|
||||
}
|
||||
}
|
||||
catch (Exception exp)
|
||||
{
|
||||
PublicMethod.WriteLog(exp);
|
||||
}
|
||||
}
|
||||
public void LoadSelectDate()
|
||||
{
|
||||
string where = " ";
|
||||
upHisDrugs = BFeesRecordReport.Select(" FeeType='" + FeeType + "' " + where + " order by endtime desc", null);
|
||||
dgvOperation.DataSource = upHisDrugs;
|
||||
dgvOperation.ClearSelection();
|
||||
}
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
//if (comboBoxExType.Text == "") return;
|
||||
string beginTime = Convert.ToDateTime(dtpOpeTime.Value).ToString("yyyy-MM-dd HH:mm:00");
|
||||
string endTime = Convert.ToDateTime(dtpEnd.Value).ToString("yyyy-MM-dd HH:mm:00");
|
||||
string sql = string.Format(" ExecTime>='{0}' and ExecTime<'{1}'", beginTime, endTime);
|
||||
//if (comboBoxExType.SelectedItem != null)
|
||||
//{
|
||||
// ComboItem chargitem = comboBoxExType.SelectedItem as ComboItem;
|
||||
// sql += " and (page_type = '" + chargitem.Value + "' ) ";
|
||||
//}
|
||||
if (FeeType != "")
|
||||
{
|
||||
sql += " and (FeeType = '" + FeeType + "' ) ";
|
||||
}
|
||||
if (rdoZQ.Checked == true)
|
||||
{
|
||||
operationApplys = BFeesRecordReport.GetUpListByWhere(sql);
|
||||
dgvtEMPOperationInfos.DataSource = operationApplys;
|
||||
}
|
||||
else
|
||||
{
|
||||
operationApplys = BFeesRecordReport.GetUpListByWhere2(sql);
|
||||
dgvHZD.DataSource = operationApplys;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void toolStripButton10_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 表格配置
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void tsbSettingDGV_Click(object sender, EventArgs e)
|
||||
{
|
||||
//DataGridViewSettingManager.GetInstance().ShowConfigUI(dgvOperation);
|
||||
//dgvOperation.AllowUserToAddRows = false;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dgvOperation.Rows.Count < 0 || dgvOperation.Rows.Count < 1)
|
||||
{
|
||||
MessageBox.Show("没有记录,请查询到数据后再导出数据到Excel");
|
||||
return;
|
||||
}
|
||||
//if (rdoZQ.Checked == true)
|
||||
//{
|
||||
// BLL.DataGridViewToExcel.DataToExcel(dgvtEMPOperationInfos);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// BLL.DataGridViewToExcel.DataToExcel(dgvHZD);
|
||||
//}
|
||||
}
|
||||
private void cboRoom_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
//btnOK_Click(null, null);
|
||||
LoadSelectDate();
|
||||
}
|
||||
|
||||
|
||||
private void dgvOperation_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
int OpeID = 0;
|
||||
if (dgvOperation.SelectedRows.Count > 0)
|
||||
{
|
||||
OpeID = Convert.ToInt32(dgvOperation.SelectedRows[0].Cells[0].Value.ToString());
|
||||
}
|
||||
if (OpeID == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
FeesRecordReport upHis = BFeesRecordReport.SelectSingle(OpeID);
|
||||
cboRoom.Text = upHis.ExecDepartmentName;
|
||||
//comboBoxExType.Text = upHis.PageType;
|
||||
FeeType = upHis.FeeType;
|
||||
if (upHis.FeeType == "麻醉") rdoMz.Checked = true;
|
||||
else rdoHs.Checked = true;
|
||||
if (upHis.ChargType == rdoZQ.Text) rdoZQ.Checked = true;
|
||||
else rdoJZ.Checked = true;
|
||||
dtpOpeTime.Value = upHis.StartTime.Value;
|
||||
dtpEnd.Value = upHis.EndTime.Value;
|
||||
btnOK_Click(null, null);
|
||||
|
||||
}
|
||||
|
||||
private void rdoZQ_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rdoZQ.Checked == true)
|
||||
{
|
||||
dgvtEMPOperationInfos.Visible = true;
|
||||
dgvHZD.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
dgvtEMPOperationInfos.Visible = false;
|
||||
dgvHZD.Visible = true;
|
||||
}
|
||||
|
||||
//btnOK_Click(null, null);
|
||||
}
|
||||
|
||||
private void voidableRadioButton2_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rdoMz.Checked == true)
|
||||
{
|
||||
FeeType = "麻醉";
|
||||
}
|
||||
else
|
||||
{
|
||||
FeeType = "护士";
|
||||
}
|
||||
LoadSelectDate();
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
//if (comboBoxExType.Text == "")
|
||||
//{
|
||||
// MessageBox.Show("请选择药品单类型!", "系统提示"); return;
|
||||
//}
|
||||
FeesRecordReport upHisDrugOrdersSDYSelect = new FeesRecordReport();
|
||||
DateTime beginTime = Convert.ToDateTime(dtpOpeTime.Value);
|
||||
DateTime endTime = Convert.ToDateTime(dtpEnd.Value);
|
||||
upHisDrugOrdersSDYSelect.StartTime = beginTime;
|
||||
upHisDrugOrdersSDYSelect.EndTime = endTime;
|
||||
|
||||
//if (comboBoxExType.SelectedItem != null)
|
||||
//{
|
||||
// ComboItem chargitem = comboBoxExType.SelectedItem as ComboItem;
|
||||
// upHisDrugOrdersSDYSelect.PageType = chargitem.Text;
|
||||
// upHisDrugOrdersSDYSelect.PageNo = chargitem.Value.ToString();
|
||||
//}
|
||||
if (FeeType != "")
|
||||
{
|
||||
upHisDrugOrdersSDYSelect.FeeType = FeeType;
|
||||
}
|
||||
if (rdoZQ.Checked == true)
|
||||
{
|
||||
upHisDrugOrdersSDYSelect.ChargType = rdoZQ.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
upHisDrugOrdersSDYSelect.ChargType = rdoJZ.Text;
|
||||
}
|
||||
upHisDrugOrdersSDYSelect.OperatorId = PublicMethod.OperatorId;
|
||||
upHisDrugOrdersSDYSelect.OperatorTime = DateTime.Now;
|
||||
BFeesRecordReport.Insert(upHisDrugOrdersSDYSelect);
|
||||
MessageBox.Show("保存成功!", "系统提示");
|
||||
LoadSelectDate();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
1218
AIMS/OperationAfter/frmOperationCharg3.designer.cs
generated
Normal file
1218
AIMS/OperationAfter/frmOperationCharg3.designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
204
AIMS/OperationAfter/frmOperationCharg3.resx
Normal file
204
AIMS/OperationAfter/frmOperationCharg3.resx
Normal file
@ -0,0 +1,204 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="anesBegintime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Anesendtime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TemplateType1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ChargType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PageType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PageNo.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ExecDepartmentName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="DId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="spec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="execDept.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="room.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="PatName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="InNo.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="UpFreeTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn23.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="DUnit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn24.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ChargePrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn32.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="no.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn33.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn34.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn35.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn41.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn42.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@ -1,23 +1,16 @@
|
||||
using AIMSBLL;
|
||||
using AIMSExtension;
|
||||
using AIMSModel;
|
||||
using DataDictionary;
|
||||
using DevComponents.DotNetBar.Controls;
|
||||
using KHD_OREMR.UserControls;
|
||||
using AIMSModel;
|
||||
using Microsoft.Office.Interop.Excel;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.DataVisualization.Charting;
|
||||
|
||||
namespace AIMS.OperationAfter.UI
|
||||
{
|
||||
@ -167,11 +160,11 @@ namespace AIMS.OperationAfter.UI
|
||||
string asa = txtASALevel.Text;
|
||||
|
||||
System.Data.DataTable dt = BOperationApply.GetOperationDoingDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.AddDays(1).ToString("yyyy-MM-dd"));
|
||||
string Where = "";
|
||||
string Where = " RecoverId=1 ";
|
||||
if (state == "")
|
||||
Where += " StateId >1 ";
|
||||
Where += " and StateId >1 ";
|
||||
else
|
||||
Where += " StateId IN (" + state + ") ";
|
||||
Where += " and StateId IN (" + state + ") ";
|
||||
if (Department != "")
|
||||
Where += " and PatientDept LIKE '%" + Department + "%' ";
|
||||
if (Room != "")
|
||||
|
||||
@ -52,9 +52,13 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BLL\AutoGenerate\BFeesRecord.cs" />
|
||||
<Compile Include="BLL\AutoGenerate\BFeesRecordReport.cs" />
|
||||
<Compile Include="BLL\Extension\BFeesRecord.cs" />
|
||||
<Compile Include="BLL\Extension\BFeesRecordReport.cs" />
|
||||
<Compile Include="DAL\AutoGenerate\DFeesRecord.cs" />
|
||||
<Compile Include="DAL\AutoGenerate\DFeesRecordReport.cs" />
|
||||
<Compile Include="DAL\Extension\DFeesRecord.cs" />
|
||||
<Compile Include="DAL\Extension\DFeesRecordReport.cs" />
|
||||
<Compile Include="Model\AutoGenerate\FeesRecord.cs" />
|
||||
<Compile Include="BLL\AutoGenerate\BAdverseEvent.cs" />
|
||||
<Compile Include="BLL\AutoGenerate\BAnaesthesiaEvents.cs" />
|
||||
@ -332,6 +336,7 @@
|
||||
<Compile Include="DAL\Extension\DStockPile.cs" />
|
||||
<Compile Include="DAL\Extension\DSysConfig.cs" />
|
||||
<Compile Include="DAL\Extension\DUserPurview.cs" />
|
||||
<Compile Include="Model\AutoGenerate\FeesRecordReport.cs" />
|
||||
<Compile Include="Model\Extension\FeesRecord.cs" />
|
||||
<Compile Include="Model\AutoGenerate\AnaesthesiaEvents.cs" />
|
||||
<Compile Include="Model\AutoGenerate\AnaesthesiaMethod.cs" />
|
||||
@ -419,6 +424,7 @@
|
||||
<Compile Include="Model\Extension\FactOperationInfo.cs" />
|
||||
<Compile Include="Model\Extension\FactOperationPosition.cs" />
|
||||
<Compile Include="Model\Extension\FactPersonDuty.cs" />
|
||||
<Compile Include="Model\Extension\FeesRecordReport.cs" />
|
||||
<Compile Include="Model\Extension\HospitalInfo.cs" />
|
||||
<Compile Include="Model\Extension\KBITEM.cs" />
|
||||
<Compile Include="Model\Extension\KBLIST.cs" />
|
||||
@ -489,6 +495,7 @@
|
||||
<Compile Include="ObjectQuery\FactOutputLiquidsMap.cs" />
|
||||
<Compile Include="ObjectQuery\FactPersonDutyMap.cs" />
|
||||
<Compile Include="ObjectQuery\FeesRecordMap.cs" />
|
||||
<Compile Include="ObjectQuery\FeesRecordReportMap.cs" />
|
||||
<Compile Include="ObjectQuery\HospitalInfoMap.cs" />
|
||||
<Compile Include="ObjectQuery\InstrumentRegistrationMap.cs" />
|
||||
<Compile Include="ObjectQuery\KBITEMMap.cs" />
|
||||
|
||||
160
AIMSEntity/BLL/AutoGenerate/BFeesRecordReport.cs
Normal file
160
AIMSEntity/BLL/AutoGenerate/BFeesRecordReport.cs
Normal file
@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using AIMSDAL;
|
||||
using AIMSModel;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AIMSBLL
|
||||
{
|
||||
public partial class BFeesRecordReport
|
||||
{
|
||||
#region 插入实体操作部份
|
||||
/// <summary>
|
||||
/// 插入实体
|
||||
/// </summary>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>标识列值或影响的记录行数</returns>
|
||||
public static int Insert(FeesRecordReport feesRecordReport)
|
||||
{
|
||||
return DFeesRecordReport.Insert(feesRecordReport);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除实体操作
|
||||
/// <summary>
|
||||
/// 删除实体
|
||||
/// </summary>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
public static int Delete(FeesRecordReport feesRecordReport)
|
||||
{
|
||||
return DFeesRecordReport.Delete(feesRecordReport);
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据对象查询语句删除
|
||||
/// </summary>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
public static int Delete(string oql, ParameterList parameters)
|
||||
{
|
||||
return DFeesRecordReport.Delete(oql,parameters);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 更新实体操作
|
||||
|
||||
/// <summary>
|
||||
/// 更新实体
|
||||
/// </summary>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
public static int Update(FeesRecordReport feesRecordReport)
|
||||
{
|
||||
return DFeesRecordReport.Update(feesRecordReport);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据对象查询语句更新实体
|
||||
/// </summary>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
public static int Update(string oql, ParameterList parameters)
|
||||
{
|
||||
return DFeesRecordReport.Update(oql,parameters);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询实体集合
|
||||
/// <summary>
|
||||
/// \查询实体集合
|
||||
/// </summary>
|
||||
/// <returns>实体类对象集合</returns>
|
||||
public static List<FeesRecordReport> Select()
|
||||
{
|
||||
return DFeesRecordReport.Select();
|
||||
}
|
||||
/// <summary>
|
||||
/// 递归查询实体集合
|
||||
/// </summary>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体类对象集合</returns>
|
||||
public static List<FeesRecordReport> Select(RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
return DFeesRecordReport.Select(recursiveType, recursiveDepth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据对象查询语句查询实体集合
|
||||
/// </summary>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>实体类对象集合</returns>
|
||||
public static List<FeesRecordReport> Select(string oql, ParameterList parameters)
|
||||
{
|
||||
return DFeesRecordReport.Select(oql, parameters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据对象查询语句递归查询实体集合
|
||||
/// </summary>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体类对象集合</returns>
|
||||
public static List<FeesRecordReport> Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
return DFeesRecordReport.Select(oql, parameters, recursiveType, recursiveDepth);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询单个实体
|
||||
/// <summary>
|
||||
/// 更据对象查询语句查询单个实体
|
||||
/// </summary>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>实体对象</returns>
|
||||
public static FeesRecordReport SelectSingle(string oql, ParameterList parameters)
|
||||
{
|
||||
return DFeesRecordReport.SelectSingle(oql, parameters);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更据对象查询语句递归查询单个实体
|
||||
/// </summary>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体对象</returns>
|
||||
public static FeesRecordReport SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
return DFeesRecordReport.SelectSingle(oql, parameters, recursiveType, recursiveDepth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按主键字段查询特定实体
|
||||
/// </summary>
|
||||
/// <param name="id">主键值</param>
|
||||
/// <returns>实体类对象</returns>
|
||||
public static FeesRecordReport SelectSingle(int? id)
|
||||
{
|
||||
return DFeesRecordReport.SelectSingle(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更据主键递归查询单个实体
|
||||
/// </summary>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体对象</returns>
|
||||
public static FeesRecordReport SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
return DFeesRecordReport.SelectSingle(id, recursiveType, recursiveDepth);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
49
AIMSEntity/BLL/Extension/BFeesRecordReport.cs
Normal file
49
AIMSEntity/BLL/Extension/BFeesRecordReport.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using AIMSDAL;
|
||||
using AIMSModel;
|
||||
using AIMSObjectQuery;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using HelperDB;
|
||||
|
||||
namespace AIMSBLL
|
||||
{
|
||||
public partial class BFeesRecordReport
|
||||
{
|
||||
|
||||
public static DataTable GetUpListByWhere2(string where)
|
||||
{
|
||||
string sql = string.Format(@"
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (ORDER BY FeeCode ASC) AS noo,
|
||||
FeeCode ,
|
||||
ChargName ,
|
||||
ChargSpec ,
|
||||
sum(convert(float,FeeNum)) FeeNum,
|
||||
UnitPrice
|
||||
FROM [dbo].[FeesRecord]
|
||||
where FeeIsDrug=1 and {0}
|
||||
group by FeeCode , ChargName, ChargSpec ,UnitPrice
|
||||
order by FeeCode ", where);
|
||||
DataTable dt = DBHelper.GetDataTable(sql);
|
||||
return dt;
|
||||
}
|
||||
|
||||
public static DataTable GetUpListByWhere(string where)
|
||||
{
|
||||
string sql = string.Format(@"
|
||||
SELECT *,
|
||||
info.OperationRoom,
|
||||
info.PatientName,
|
||||
info.MdrecNo
|
||||
FROM[dbo].[FeesRecord]
|
||||
left join [dbo].[V_OperationRecordInfo] info on info.RecoredId=[FeesRecord].OperationRecordId
|
||||
where FeeIsDrug=1 and {0}
|
||||
order by FeeCode ", where);
|
||||
DataTable dt = DBHelper.GetDataTable(sql);
|
||||
return dt;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -11,6 +11,7 @@ using System.Data.SqlClient;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
using DrawGraph;
|
||||
using System.Text;
|
||||
|
||||
namespace AIMSBLL
|
||||
{
|
||||
@ -673,6 +674,61 @@ namespace AIMSBLL
|
||||
{
|
||||
return DOperationRecord.FillOutFluid(PatientId, DrugTypeId);
|
||||
}
|
||||
public static DataTable GetOpesByNo(string no)
|
||||
{
|
||||
try
|
||||
{
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append("select top 10 * from [V_OperationRecordInfo] where [StateId] in(6,8,9) and RecoverId=1 and (MdrecNo like '%" + no + "%' ) order by RecoredId desc");
|
||||
return DBHelper.GetDataTable(strSql.ToString());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return new DataTable();
|
||||
}
|
||||
}
|
||||
|
||||
public static DataTable GetOpesByName(string name)
|
||||
{
|
||||
try
|
||||
{
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append("select top 10 * from [V_OperationRecordInfo] where [StateId] in(6,8,9) and RecoverId=1 and (MdrecNo like '%" + name + "%' or PatientName like '%" + name + "%') order by RecoredId desc");
|
||||
return DBHelper.GetDataTable(strSql.ToString());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return new DataTable();
|
||||
}
|
||||
}
|
||||
public static DataTable GetOpeIdByNoName(string no, string name)
|
||||
{
|
||||
try
|
||||
{
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append("select * from [V_OperationRecordInfo] where [StateId] in(6,8,9) and RecoverId=1 and (MdrecNo ='" + no + "' or PatientName='" + name + "') order by RecoredId desc");
|
||||
return DBHelper.GetDataTable(strSql.ToString());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static DataTable GetAllOperationRecordInfo(string condition)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder("select * from V_OperationRecordInfo ");
|
||||
if (condition.Length > 0)
|
||||
{
|
||||
sb.Append(" where " + condition);
|
||||
}
|
||||
try
|
||||
{
|
||||
return DBHelper.GetDataTable(sb.ToString());
|
||||
}
|
||||
catch (SqlException ex)
|
||||
{
|
||||
throw new Exception(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
657
AIMSEntity/DAL/AutoGenerate/DFeesRecordReport.cs
Normal file
657
AIMSEntity/DAL/AutoGenerate/DFeesRecordReport.cs
Normal file
@ -0,0 +1,657 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Collections;
|
||||
using AIMSModel;
|
||||
using AIMSObjectQuery;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AIMSDAL
|
||||
{
|
||||
internal partial class DFeesRecordReport
|
||||
{
|
||||
#region 插入实体操作部份
|
||||
/// <summary>
|
||||
/// 插入
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>标识列值或影响的记录行数</returns>
|
||||
internal static int Insert(SqlCommand cmd, FeesRecordReport feesRecordReport)
|
||||
{
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandText = "insert into FeesRecordReport (StartTime,EndTime,FeeType,ChargType,PageType,PageNo,ExecDepartmentId,ExecDepartmentName,OperatorId,OperatorTime,Remark,Remark2,Remark3) values (@StartTime,@EndTime,@FeeType,@ChargType,@PageType,@PageNo,@ExecDepartmentId,@ExecDepartmentName,@OperatorId,@OperatorTime,@Remark,@Remark2,@Remark3);select @@identity";
|
||||
//从实体中取出值放入Command的参数列表
|
||||
cmd.Parameters.Add(new SqlParameter("@StartTime",feesRecordReport.StartTime.HasValue?(object)feesRecordReport.StartTime.Value:(object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqlParameter("@EndTime",feesRecordReport.EndTime.HasValue?(object)feesRecordReport.EndTime.Value:(object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqlParameter("@FeeType",feesRecordReport.FeeType==null?(object)DBNull.Value:(object)feesRecordReport.FeeType));
|
||||
cmd.Parameters.Add(new SqlParameter("@ChargType",feesRecordReport.ChargType==null?(object)DBNull.Value:(object)feesRecordReport.ChargType));
|
||||
cmd.Parameters.Add(new SqlParameter("@PageType",feesRecordReport.PageType==null?(object)DBNull.Value:(object)feesRecordReport.PageType));
|
||||
cmd.Parameters.Add(new SqlParameter("@PageNo",feesRecordReport.PageNo==null?(object)DBNull.Value:(object)feesRecordReport.PageNo));
|
||||
cmd.Parameters.Add(new SqlParameter("@ExecDepartmentId",feesRecordReport.ExecDepartmentId.HasValue?(object)feesRecordReport.ExecDepartmentId.Value:(object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqlParameter("@ExecDepartmentName",feesRecordReport.ExecDepartmentName==null?(object)DBNull.Value:(object)feesRecordReport.ExecDepartmentName));
|
||||
cmd.Parameters.Add(new SqlParameter("@OperatorId",feesRecordReport.OperatorId.HasValue?(object)feesRecordReport.OperatorId.Value:(object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqlParameter("@OperatorTime",feesRecordReport.OperatorTime.HasValue?(object)feesRecordReport.OperatorTime.Value:(object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqlParameter("@Remark",feesRecordReport.Remark==null?(object)DBNull.Value:(object)feesRecordReport.Remark));
|
||||
cmd.Parameters.Add(new SqlParameter("@Remark2",feesRecordReport.Remark2==null?(object)DBNull.Value:(object)feesRecordReport.Remark2));
|
||||
cmd.Parameters.Add(new SqlParameter("@Remark3",feesRecordReport.Remark3==null?(object)DBNull.Value:(object)feesRecordReport.Remark3));
|
||||
return Convert.ToInt32(cmd.ExecuteScalar());
|
||||
}
|
||||
/// <summary>
|
||||
/// 不使用事务的插入方法
|
||||
/// </summary>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>标识列值或影响的记录行数</returns>
|
||||
internal static int Insert(FeesRecordReport feesRecordReport)
|
||||
{
|
||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
return Insert(cmd, feesRecordReport);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用事务的插入方法
|
||||
/// </summary>
|
||||
/// <param name="connection">实现共享Connection的对象</param>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>标识列值或影响的记录行数</returns>
|
||||
internal static int Insert(Connection connection,FeesRecordReport feesRecordReport)
|
||||
{
|
||||
return Insert(connection.Command, feesRecordReport);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除实体操作
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int ExcuteDeleteCommand(SqlCommand cmd, FeesRecordReport feesRecordReport)
|
||||
{
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandText = "delete from FeesRecordReport where Id=@Id";
|
||||
//从实体中取出值放入Command的参数列表
|
||||
cmd.Parameters.Add(new SqlParameter("@Id", feesRecordReport.Id));
|
||||
return cmd.ExecuteNonQuery();
|
||||
}
|
||||
/// <summary>
|
||||
/// 不使用事务的删除方法
|
||||
/// </summary>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int Delete(FeesRecordReport feesRecordReport)
|
||||
{
|
||||
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
return ExcuteDeleteCommand(cmd, feesRecordReport);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 使用事务的删除方法
|
||||
/// </summary>
|
||||
/// <param name="connection">实现共享Connection的对象</param>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int Delete(Connection connection,FeesRecordReport feesRecordReport)
|
||||
{
|
||||
return ExcuteDeleteCommand(connection.Command, feesRecordReport);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行删除命令
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int ExcuteDeleteCommand(SqlCommand cmd, string oql, ParameterList parameters)
|
||||
{
|
||||
//解析过滤部份Sql语句
|
||||
string filterString = SyntaxAnalyzer.ParseSql(oql, new FeesRecordReportMap());
|
||||
if (filterString != string.Empty)
|
||||
{
|
||||
filterString = " where " + filterString;
|
||||
}
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandText = "delete from FeesRecordReport " + filterString;
|
||||
//添加参数
|
||||
if (parameters != null)
|
||||
{
|
||||
foreach (string key in parameters.Keys)
|
||||
{
|
||||
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||
}
|
||||
}
|
||||
return cmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 不使用事务的删除方法
|
||||
/// </summary>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int Delete(string oql, ParameterList parameters)
|
||||
{
|
||||
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
return ExcuteDeleteCommand(cmd, oql, parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用事务的删除方法
|
||||
/// </summary>
|
||||
/// <param name="connection">实现共享Connection的对象</param>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int Delete(Connection connection, string oql, ParameterList parameters)
|
||||
{
|
||||
return ExcuteDeleteCommand(connection.Command, oql, parameters);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 更新实体操作
|
||||
|
||||
/// <summary>
|
||||
/// 更新
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int ExcuteUpdateCommand(SqlCommand cmd, FeesRecordReport feesRecordReport)
|
||||
{
|
||||
cmd.CommandText = "update FeesRecordReport set StartTime=@StartTime,EndTime=@EndTime,FeeType=@FeeType,ChargType=@ChargType,PageType=@PageType,PageNo=@PageNo,ExecDepartmentId=@ExecDepartmentId,ExecDepartmentName=@ExecDepartmentName,OperatorId=@OperatorId,OperatorTime=@OperatorTime,Remark=@Remark,Remark2=@Remark2,Remark3=@Remark3 where Id=@Id";
|
||||
//从实体中取出值放入Command的参数列表
|
||||
cmd.Parameters.Add(new SqlParameter("@StartTime",feesRecordReport.StartTime.HasValue?(object)feesRecordReport.StartTime.Value:(object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqlParameter("@EndTime",feesRecordReport.EndTime.HasValue?(object)feesRecordReport.EndTime.Value:(object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqlParameter("@FeeType",feesRecordReport.FeeType==null?(object)DBNull.Value:(object)feesRecordReport.FeeType));
|
||||
cmd.Parameters.Add(new SqlParameter("@ChargType",feesRecordReport.ChargType==null?(object)DBNull.Value:(object)feesRecordReport.ChargType));
|
||||
cmd.Parameters.Add(new SqlParameter("@PageType",feesRecordReport.PageType==null?(object)DBNull.Value:(object)feesRecordReport.PageType));
|
||||
cmd.Parameters.Add(new SqlParameter("@PageNo",feesRecordReport.PageNo==null?(object)DBNull.Value:(object)feesRecordReport.PageNo));
|
||||
cmd.Parameters.Add(new SqlParameter("@ExecDepartmentId",feesRecordReport.ExecDepartmentId.HasValue?(object)feesRecordReport.ExecDepartmentId.Value:(object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqlParameter("@ExecDepartmentName",feesRecordReport.ExecDepartmentName==null?(object)DBNull.Value:(object)feesRecordReport.ExecDepartmentName));
|
||||
cmd.Parameters.Add(new SqlParameter("@OperatorId",feesRecordReport.OperatorId.HasValue?(object)feesRecordReport.OperatorId.Value:(object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqlParameter("@OperatorTime",feesRecordReport.OperatorTime.HasValue?(object)feesRecordReport.OperatorTime.Value:(object)DBNull.Value));
|
||||
cmd.Parameters.Add(new SqlParameter("@Remark",feesRecordReport.Remark==null?(object)DBNull.Value:(object)feesRecordReport.Remark));
|
||||
cmd.Parameters.Add(new SqlParameter("@Remark2",feesRecordReport.Remark2==null?(object)DBNull.Value:(object)feesRecordReport.Remark2));
|
||||
cmd.Parameters.Add(new SqlParameter("@Remark3",feesRecordReport.Remark3==null?(object)DBNull.Value:(object)feesRecordReport.Remark3));
|
||||
cmd.Parameters.Add(new SqlParameter("@Id", feesRecordReport.Id));
|
||||
return cmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 不使用事务的更新方法
|
||||
/// </summary>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int Update(FeesRecordReport feesRecordReport)
|
||||
{
|
||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
return ExcuteUpdateCommand(cmd, feesRecordReport);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 使用事务的更新方法
|
||||
/// </summary>
|
||||
/// <param name="connection">实现共享Connection的对象</param>
|
||||
/// <param name="feesRecordReport">实体类对象</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int Update(Connection connection,FeesRecordReport feesRecordReport)
|
||||
{
|
||||
return ExcuteUpdateCommand(connection.Command, feesRecordReport);
|
||||
}
|
||||
/// <summary>
|
||||
/// 执行更新命令
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int ExcuteUpdateCommand(SqlCommand cmd, string oql, ParameterList parameters)
|
||||
{
|
||||
//解析过滤部份Sql语句
|
||||
string updateString = SyntaxAnalyzer.ParseSql(oql, new FeesRecordReportMap());
|
||||
cmd.CommandText = "update FeesRecordReport set " + updateString;
|
||||
cmd.Parameters.Clear();
|
||||
//添加参数
|
||||
if (parameters != null)
|
||||
{
|
||||
foreach (string key in parameters.Keys)
|
||||
{
|
||||
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||
}
|
||||
}
|
||||
return cmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 不使用事务的更新方法
|
||||
/// </summary>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int Update(string oql, ParameterList parameters)
|
||||
{
|
||||
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
return ExcuteUpdateCommand(cmd, oql, parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用事务的更新方法
|
||||
/// </summary>
|
||||
/// <param name="connection">实现共享Connection的对象</param>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>影响的记录行数</returns>
|
||||
internal static int Update(Connection connection, string oql, ParameterList parameters)
|
||||
{
|
||||
return ExcuteUpdateCommand(connection.Command, oql, parameters);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询实体集合
|
||||
/// <summary>
|
||||
/// 执行Command获取对象列表
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体类对象列表</returns>
|
||||
internal static List<FeesRecordReport> ExcuteSelectCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth)
|
||||
{
|
||||
List<FeesRecordReport> feesRecordReportList = new List<FeesRecordReport>();
|
||||
using (SqlDataReader dr = cmd.ExecuteReader())
|
||||
{
|
||||
while (dr.Read())
|
||||
{
|
||||
FeesRecordReport feesRecordReport = DataReaderToEntity(dr);
|
||||
feesRecordReportList.Add(feesRecordReport);
|
||||
}
|
||||
}
|
||||
return feesRecordReportList;
|
||||
}
|
||||
/// <summary>
|
||||
/// 执行查询命令
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体类对象集合</returns>
|
||||
internal static List<FeesRecordReport> ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth)
|
||||
{
|
||||
//解析过滤部份Sql语句
|
||||
string filterString = SyntaxAnalyzer.ParseSql(oql, new FeesRecordReportMap());
|
||||
if (filterString != string.Empty)
|
||||
{
|
||||
if(filterString.Trim().ToLower().IndexOf("order ")!=0)
|
||||
filterString = " where " + filterString;
|
||||
}
|
||||
cmd.Parameters.Clear();
|
||||
cmd.CommandText = "select * from FeesRecordReport " + filterString;
|
||||
//添加参数
|
||||
if (parameters != null)
|
||||
{
|
||||
foreach (string key in parameters.Keys)
|
||||
{
|
||||
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||
}
|
||||
}
|
||||
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据对象查询语句查询实体集合
|
||||
/// </summary>
|
||||
/// <returns>实体类对象集合</returns>
|
||||
internal static List<FeesRecordReport> Select()
|
||||
{
|
||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "select * from FeesRecordReport";
|
||||
return ExcuteSelectCommand(cmd, RecursiveType.Parent, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据对象查询语句查询实体集合
|
||||
/// </summary>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体类对象集合</returns>
|
||||
internal static List<FeesRecordReport> Select(RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "select * from FeesRecordReport";
|
||||
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据对象查询语句查询实体集合
|
||||
/// </summary>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>实体类对象集合</returns>
|
||||
internal static List<FeesRecordReport> Select(string oql, ParameterList parameters)
|
||||
{
|
||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
return ExcuteSelectCommand(cmd, oql, parameters, RecursiveType.Parent, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据对象查询语句查询实体集合
|
||||
/// </summary>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体类对象集合</returns>
|
||||
internal static List<FeesRecordReport> Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
return ExcuteSelectCommand(cmd, oql, parameters, recursiveType, recursiveDepth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据对象查询语句查询实体集合(启用事务)
|
||||
/// </summary>
|
||||
/// <param name="connection">连接对象</param>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体类对象集合</returns>
|
||||
internal static List<FeesRecordReport> Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
return ExcuteSelectCommand(connection.Command, oql, parameters,recursiveType, recursiveDepth);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询单个实体
|
||||
|
||||
/// <summary>
|
||||
/// 递归查询单个实体
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体对象</returns>
|
||||
internal static FeesRecordReport ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth)
|
||||
{
|
||||
FeesRecordReport feesRecordReport=null;
|
||||
using (SqlDataReader dr = cmd.ExecuteReader())
|
||||
{
|
||||
if(dr.Read())
|
||||
feesRecordReport = DataReaderToEntity(dr);
|
||||
}
|
||||
if(feesRecordReport==null)
|
||||
return feesRecordReport;
|
||||
return feesRecordReport;
|
||||
}
|
||||
/// <summary>
|
||||
/// 更据对象查询语句递归查询单个实体
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体对象</returns>
|
||||
internal static FeesRecordReport ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth)
|
||||
{
|
||||
//解析过滤部份Sql语句
|
||||
string filterString = SyntaxAnalyzer.ParseSql(oql, new FeesRecordReportMap());
|
||||
if(filterString!=string.Empty)
|
||||
{
|
||||
filterString=" where "+filterString;
|
||||
}
|
||||
cmd.CommandText = "select * from FeesRecordReport " + filterString;
|
||||
cmd.Parameters.Clear();
|
||||
//添加参数
|
||||
if (parameters != null)
|
||||
{
|
||||
foreach (string key in parameters.Keys)
|
||||
{
|
||||
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||
}
|
||||
}
|
||||
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更据对象查询语句递归查询单个实体
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体对象</returns>
|
||||
internal static FeesRecordReport SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更据对象查询语句查询单个实体
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>实体对象</returns>
|
||||
internal static FeesRecordReport SelectSingle(string oql, ParameterList parameters)
|
||||
{
|
||||
return SelectSingle(oql,parameters,RecursiveType.Parent,1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更据对象查询语句并启用事务查询单个实体
|
||||
/// </summary>
|
||||
/// <param name="connection">连接对象</param>
|
||||
/// <param name="oql">对象查询语句</param>
|
||||
/// <param name="parameters">参数列表</param>
|
||||
/// <returns>实体对象</returns>
|
||||
internal static FeesRecordReport SelectSingle(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更据主键值递归查询单个实体
|
||||
/// </summary>
|
||||
/// <param name="cmd">Command对象</param>
|
||||
/// <param name="id">主键值</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体对象</returns>
|
||||
internal static FeesRecordReport SelectSingle(SqlCommand cmd, int? id,RecursiveType recursiveType,int recursiveDepth)
|
||||
{
|
||||
cmd.Parameters.Clear();
|
||||
if(id.HasValue)
|
||||
{
|
||||
cmd.CommandText = "select * from FeesRecordReport where Id=@pk";
|
||||
cmd.Parameters.Add(new SqlParameter("@pk",id.Value));
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd.CommandText = "select * from FeesRecordReport where Id is null";
|
||||
}
|
||||
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按主键字段查询特定实体
|
||||
/// </summary>
|
||||
/// <param name="id">主键值</param>
|
||||
/// <returns>实体类对象</returns>
|
||||
internal static FeesRecordReport SelectSingle(int? id)
|
||||
{
|
||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
return SelectSingle(cmd,id,RecursiveType.Parent,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 按主键字段查询特定实体
|
||||
/// </summary>
|
||||
/// <param name="id">主键值</param>
|
||||
/// <param name="recursiveType">递归类型</param>
|
||||
/// <param name="recursiveDepth">递归深度</param>
|
||||
/// <returns>实体类对象</returns>
|
||||
internal static FeesRecordReport SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
return SelectSingle(cmd,id, recursiveType, recursiveDepth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用事务并按主键字段查询特定实体
|
||||
/// </summary>
|
||||
/// <param name="connection">连接对象</param>
|
||||
/// <param name="id">主键值</param>
|
||||
/// <returns>实体类对象</returns>
|
||||
internal static FeesRecordReport SelectSingle(Connection connection,int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||
{
|
||||
return SelectSingle(connection.Command, id, recursiveType, recursiveDepth);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 从DataReader中取出值生成实体对象
|
||||
/// </summary>
|
||||
/// <param name="searcher">查询对象</param>
|
||||
/// <returns>过滤条件字符串</returns>
|
||||
private static FeesRecordReport DataReaderToEntity(SqlDataReader dr)
|
||||
{
|
||||
FeesRecordReport entity = new FeesRecordReport ();
|
||||
if(dr["Id"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.Id=Convert.ToInt32(dr["Id"]);
|
||||
}
|
||||
if(dr["StartTime"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.StartTime=Convert.ToDateTime(dr["StartTime"]);
|
||||
}
|
||||
if(dr["EndTime"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.EndTime=Convert.ToDateTime(dr["EndTime"]);
|
||||
}
|
||||
if(dr["FeeType"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.FeeType=dr["FeeType"].ToString();
|
||||
}
|
||||
if(dr["ChargType"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.ChargType=dr["ChargType"].ToString();
|
||||
}
|
||||
if(dr["PageType"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.PageType=dr["PageType"].ToString();
|
||||
}
|
||||
if(dr["PageNo"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.PageNo=dr["PageNo"].ToString();
|
||||
}
|
||||
if(dr["ExecDepartmentId"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.ExecDepartmentId=Convert.ToInt32(dr["ExecDepartmentId"]);
|
||||
}
|
||||
if(dr["ExecDepartmentName"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.ExecDepartmentName=dr["ExecDepartmentName"].ToString();
|
||||
}
|
||||
if(dr["OperatorId"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.OperatorId=Convert.ToInt32(dr["OperatorId"]);
|
||||
}
|
||||
if(dr["OperatorTime"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.OperatorTime=Convert.ToDateTime(dr["OperatorTime"]);
|
||||
}
|
||||
if(dr["Remark"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.Remark=dr["Remark"].ToString();
|
||||
}
|
||||
if(dr["Remark2"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.Remark2=dr["Remark2"].ToString();
|
||||
}
|
||||
if(dr["Remark3"]!=System.DBNull.Value)
|
||||
{
|
||||
entity.Remark3=dr["Remark3"].ToString();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
AIMSEntity/DAL/Extension/DFeesRecordReport.cs
Normal file
13
AIMSEntity/DAL/Extension/DFeesRecordReport.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using AIMSModel;
|
||||
using AIMSObjectQuery;
|
||||
namespace AIMSDAL
|
||||
{
|
||||
internal partial class DFeesRecordReport
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -42,7 +42,7 @@ namespace AIMSModel
|
||||
private string execWorkId;
|
||||
private string execWork;
|
||||
private string execState;
|
||||
private string execTime;
|
||||
private DateTime? execTime;
|
||||
private string conclusion;
|
||||
private string isInsure;
|
||||
private string insureNO;
|
||||
@ -61,6 +61,8 @@ namespace AIMSModel
|
||||
private int? operatorId;
|
||||
private string operatorNo;
|
||||
private string operatorName;
|
||||
private string chargName;
|
||||
private string chargSpec;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@ -338,7 +340,7 @@ namespace AIMSModel
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ExecTime
|
||||
public DateTime? ExecTime
|
||||
{
|
||||
get{ return execTime; }
|
||||
set{ execTime=value; }
|
||||
@ -487,5 +489,21 @@ namespace AIMSModel
|
||||
get{ return operatorName; }
|
||||
set{ operatorName=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ChargName
|
||||
{
|
||||
get{ return chargName; }
|
||||
set{ chargName=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ChargSpec
|
||||
{
|
||||
get{ return chargSpec; }
|
||||
set{ chargSpec=value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
140
AIMSEntity/Model/AutoGenerate/FeesRecordReport.cs
Normal file
140
AIMSEntity/Model/AutoGenerate/FeesRecordReport.cs
Normal file
@ -0,0 +1,140 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using AIMSDAL;
|
||||
|
||||
namespace AIMSModel
|
||||
{
|
||||
[Serializable]
|
||||
public partial class FeesRecordReport
|
||||
{
|
||||
private int? id;
|
||||
private DateTime? startTime;
|
||||
private DateTime? endTime;
|
||||
private string feeType;
|
||||
private string chargType;
|
||||
private string pageType;
|
||||
private string pageNo;
|
||||
private int? execDepartmentId;
|
||||
private string execDepartmentName;
|
||||
private int? operatorId;
|
||||
private DateTime? operatorTime;
|
||||
private string remark;
|
||||
private string remark2;
|
||||
private string remark3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? Id
|
||||
{
|
||||
get{ return id; }
|
||||
set{ id=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? StartTime
|
||||
{
|
||||
get{ return startTime; }
|
||||
set{ startTime=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? EndTime
|
||||
{
|
||||
get{ return endTime; }
|
||||
set{ endTime=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FeeType
|
||||
{
|
||||
get{ return feeType; }
|
||||
set{ feeType=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ChargType
|
||||
{
|
||||
get{ return chargType; }
|
||||
set{ chargType=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PageType
|
||||
{
|
||||
get{ return pageType; }
|
||||
set{ pageType=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PageNo
|
||||
{
|
||||
get{ return pageNo; }
|
||||
set{ pageNo=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? ExecDepartmentId
|
||||
{
|
||||
get{ return execDepartmentId; }
|
||||
set{ execDepartmentId=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ExecDepartmentName
|
||||
{
|
||||
get{ return execDepartmentName; }
|
||||
set{ execDepartmentName=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? OperatorId
|
||||
{
|
||||
get{ return operatorId; }
|
||||
set{ operatorId=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? OperatorTime
|
||||
{
|
||||
get{ return operatorTime; }
|
||||
set{ operatorTime=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Remark
|
||||
{
|
||||
get{ return remark; }
|
||||
set{ remark=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Remark2
|
||||
{
|
||||
get{ return remark2; }
|
||||
set{ remark2=value; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Remark3
|
||||
{
|
||||
get{ return remark3; }
|
||||
set{ remark3=value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
10
AIMSEntity/Model/Extension/FeesRecordReport.cs
Normal file
10
AIMSEntity/Model/Extension/FeesRecordReport.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using AIMSDAL;
|
||||
namespace AIMSModel
|
||||
{
|
||||
public partial class FeesRecordReport
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -62,6 +62,8 @@ namespace AIMSObjectQuery
|
||||
dictionary.Add("operatorid", "OperatorId");
|
||||
dictionary.Add("operatorno", "OperatorNo");
|
||||
dictionary.Add("operatorname", "OperatorName");
|
||||
dictionary.Add("chargname", "ChargName");
|
||||
dictionary.Add("chargspec", "ChargSpec");
|
||||
}
|
||||
|
||||
#region IMap 成员
|
||||
|
||||
47
AIMSEntity/ObjectQuery/FeesRecordReportMap.cs
Normal file
47
AIMSEntity/ObjectQuery/FeesRecordReportMap.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AIMSObjectQuery
|
||||
{
|
||||
internal partial class FeesRecordReportMap:IMap
|
||||
{
|
||||
private Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
||||
public FeesRecordReportMap()
|
||||
{
|
||||
dictionary.Add("id", "Id");
|
||||
dictionary.Add("starttime", "StartTime");
|
||||
dictionary.Add("endtime", "EndTime");
|
||||
dictionary.Add("feetype", "FeeType");
|
||||
dictionary.Add("chargtype", "ChargType");
|
||||
dictionary.Add("pagetype", "PageType");
|
||||
dictionary.Add("pageno", "PageNo");
|
||||
dictionary.Add("execdepartmentid", "ExecDepartmentId");
|
||||
dictionary.Add("execdepartmentname", "ExecDepartmentName");
|
||||
dictionary.Add("operatorid", "OperatorId");
|
||||
dictionary.Add("operatortime", "OperatorTime");
|
||||
dictionary.Add("remark", "Remark");
|
||||
dictionary.Add("remark2", "Remark2");
|
||||
dictionary.Add("remark3", "Remark3");
|
||||
}
|
||||
|
||||
#region IMap 成员
|
||||
|
||||
public string this[string propertyName]
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
return dictionary[propertyName.ToLower()];
|
||||
}
|
||||
catch (KeyNotFoundException)
|
||||
{
|
||||
throw new Exception(propertyName + "属性不存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user