本文整理汇总了C#中PetaPoco.Database.Single方法的典型用法代码示例。如果您正苦于以下问题:C# Database.Single方法的具体用法?C# Database.Single怎么用?C# Database.Single使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PetaPoco.Database
的用法示例。
在下文中一共展示了Database.Single方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FrmEdtAddExt
public FrmEdtAddExt(Int64 id)
{
InitializeComponent();
db = new Database("XE");
_id = id;
addHis = db.Single<ADDTION_CHECK_HISTORY_EXT>("where ID = @0", _id);
aDDTIONCHECKHISTORYEXTBindingSource.DataSource = addHis;
}
示例2: FrmEdtAdd
public FrmEdtAdd(Int64 id)
{
InitializeComponent();
//string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]);
db = new Database("XE");
_id = id;
addHis = db.Single<ADDTION_CHECK_HISTORY>("where ID = @0", _id);
aDDTIONCHECKHISTORYBindingSource.DataSource = addHis;
}
示例3: FrmEdtSln
public FrmEdtSln(Int64 id)
{
InitializeComponent();
//string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]);
db = new Database("XE");
_id = id;
sln = db.Single<RENAL_REPLACEMENT_THERAPY_HI>("where ID = @0", _id);
rENALREPLACEMENTTHERAPYHIBindingSource.DataSource = sln;
}
示例4: FrmEdtDose
public FrmEdtDose(Int64 id)
{
InitializeComponent();
//string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]);
db = new Database("XE");
_id = id;
doseHis = db.Single<DOSE_HISTORY>("where ID = @0", _id);
dOSEHISTORYBindingSource.DataSource = doseHis;
}
示例5: FrmEdtBloodCleanupProcess
public FrmEdtBloodCleanupProcess(Int64 id)
{
InitializeComponent();
//string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]);
db = new Database("XE");
_id = id;
process = db.Single<BLOODCLEANUP_PROCESS>("where ID = @0", _id);
bLOODCLEANUPPROCESSBindingSource.DataSource = process;
}
示例6: FrmEdtBody
public FrmEdtBody(Int64 id)
{
InitializeComponent();
//string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]);
db = new Database("XE");
_id = id;
bodyHis = db.Single<BODY_CHECK_HISTORY>("where ID = @0", _id);
bODYCHECKHISTORYBindingSource.DataSource = bodyHis;
vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where groupName = 208");
}
示例7: CreateUser
public Guid CreateUser(string email, string displayName, string passwordHash)
{
var db = new Database(_config.ConnectionString, "System.Data.SqlClient");
var userId = (int)db.Insert("MR.tUser", "UserId", true, new
{
Email = email,
Passwd = passwordHash,
DisplayName = displayName,
PasswdLastChange = DateTime.UtcNow
});
return db.Single<Guid>("select AuthId from MR.tUser where UserId = @0", userId);
}
示例8: FrmEdtPath
public FrmEdtPath(Int64 id)
{
InitializeComponent();
//string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]);
db = new Database("XE");
_id = id;
pathHis = db.Single<VASCULARPATH_HISTORY>("where ID = @0", _id);
vASCULARPATHHISTORYBindingSource.DataSource = pathHis;
vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where groupName = 193");
vALUECODEBindingSource1.DataSource = db.Fetch<VALUE_CODE>("where groupName = 194");
}
示例9: FrmEdtBloodCeanupBase
public FrmEdtBloodCeanupBase(Int64 id)
{
InitializeComponent();
////string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]);
db = new Database("XE");
_id = id;
bloodCleanup = db.Single<BLOODCLEANUP>("where ID = @0", _id);
bLOODCLEANUPBindingSource.DataSource = bloodCleanup;
//EPOTextEdit.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
EPOTextEdit.Properties.DataSource = db.Fetch<VALUE_CODE>("");
EPOTextEdit.Properties.DisplayMember = "DSP_MEMBER";
EPOTextEdit.Properties.ValueMember = "VALUE_MEMBER";
MACH_TYPTextEdit.Properties.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", new object[] {3});
MACH_TYPTextEdit.Properties.DisplayMember = "DSP_MEMBER";
MACH_TYPTextEdit.Properties.ValueMember = "VALUE_MEMBER";
vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", 101);
vALUECODEBindingSource1.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", 44);
vALUECODEBindingSource2.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", 102);
vALUECODEBindingSource3.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", 161);
aCCOUNTBindingSource.DataSource = db.Fetch<ACCOUNT>("");
bindingSource1.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", 193); // 通路类型
bindingSource2.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", 47); // 管路
bindingSource3.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", 43); // 穿刺针
bindingSource4.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", 171); // 敷贴
bindingSource5.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", 166); // 护理包
bindingSource6.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", 169); // 肝素帽
// 血管通路类型
if (bloodCleanup.FISTULA_TYPE == 519 || bloodCleanup.FISTULA_TYPE == 520)
{
ItemForAPPLICATOR.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
ItemForAPPLICATOR_NUM.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
ItemForHEPARIN_CAP.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
ItemForHEPARIN_CAP_NUM.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
}
else if (bloodCleanup.FISTULA_TYPE == 704 || bloodCleanup.FISTULA_TYPE == 705)
{
ItemForFISTULA_NEEDLE.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
ItemForFISTULA_NEEDLE_NUM.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
ItemForFISTULA_CARE_PACKAGES.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
ItemForFISTULA_CARE_PACKAGES_NUM.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
}
}
示例10: FrmEdtInduce
public FrmEdtInduce(Int64 id)
{
InitializeComponent();
//string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]);
db = new Database("XE");
_id = id;
induceHis = db.Single<INDUCEMENT_HISTORY>("select * from INDUCEMENT_HISTORY where ID = @0", _id);
iNDUCEMENTHISTORYBindingSource.DataSource = induceHis;
//INDUCEMENTTextEdit.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;
INDUCEMENTTextEdit.Properties.DataSource = ClsFrmMng.lstIndecumentCode;
INDUCEMENTTextEdit.Properties.DisplayMember = "INDUCEMENT_MEMO";
INDUCEMENTTextEdit.Properties.ValueMember = "INDUCEMENT_MEMO";
}
示例11: FrmEdtDiagonsis_Tumor
public FrmEdtDiagonsis_Tumor(Int64 id)
{
InitializeComponent();
db = new Database("XE");
_id = id;
//ConditionValidationRule ruleNoEmpty = new ConditionValidationRule();
//ruleNoEmpty.ConditionOperator = ConditionOperator.IsNotBlank;
//ruleNoEmpty.ErrorText = "该项不能为空。";
//dxValidationProvider1.SetValidationRule(INFECTIOUS_DISEASETextEdit, ruleNoEmpty);
vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 139);
diag = db.Single<DIAGNOSIS_TUMOR>("where ID = @0", _id);
dIAGNOSISTUMORBindingSource.DataSource = diag;
}
示例12: FrmEdtPatient_Course_Sp
public FrmEdtPatient_Course_Sp(Int64 id)
{
InitializeComponent();
db = new Database("XE");
_id = id;
//ConditionValidationRule ruleNoEmpty = new ConditionValidationRule();
//ruleNoEmpty.ConditionOperator = ConditionOperator.IsNotBlank;
//ruleNoEmpty.ErrorText = "该项不能为空。";
//dxValidationProvider1.SetValidationRule(INFECTIOUS_DISEASETextEdit, ruleNoEmpty);
//vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 137);
v = db.Single<PATIENT_COURSE_SPECIAL>("where ID = @0", _id);
pATIENTCOURSESPECIALBindingSource.DataSource = v;
}
示例13: FrmEdtCaseHis
public FrmEdtCaseHis( Int64 id)
{
InitializeComponent();
//string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]);
db = new Database("XE");
_id = id;
caseHis = db.Single<CASE_HISTORY>("select * from CASE_HISTORY where ID = @0", _id);
cASEHISTORYBindingSource.DataSource = caseHis;
lookUpEdit1.Properties.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", new object[]{11});
lookUpEdit1.Properties.DisplayMember = "DSP_MEMBER";
lookUpEdit1.Properties.ValueMember = "VALUE_MEMBER";
vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = @0", new object[] { 181 });
}
示例14: FrmEdtMachineType
public FrmEdtMachineType(Int64 id)
{
InitializeComponent();
_id = id;
db = new Database("XE");
vALUECODEBindingSource.DataSource = db.Fetch<VALUE_GROUP>("where FATHERID = @0", 15);
//vALUECODEBindingSource1.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 3);
ConditionValidationRule ruleNoEmpty = new ConditionValidationRule();
ruleNoEmpty.ConditionOperator = ConditionOperator.IsNotBlank;
ruleNoEmpty.ErrorText = "该项不能为空。";
dxValidationProvider1.SetValidationRule(MODELTextEdit, ruleNoEmpty);
dxValidationProvider1.SetValidationRule(M_TYPELookUpEdit, ruleNoEmpty);
diag = db.Single<MACHINE_TYPE>(_id);
mACHINETYPEBindingSource.DataSource = diag;
}
示例15: FrmEdtDrugsAllergy
public FrmEdtDrugsAllergy(Int64 id)
{
InitializeComponent();
_id = id;
//string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]);
db = new Database("XE");
_id = id;
vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = 185");
vALUECODEBindingSource1.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = 186");
vALUECODEBindingSource2.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = 187");
vALUECODEBindingSource3.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = 183");
vALUECODEBindingSource4.DataSource = db.Fetch<VALUE_CODE>("where GROUPNAME = 184");
drugAllergyHis = db.Single<DRUG_ALLERGY_HISTORY>("select * from DRUG_ALLERGY_HISTORY where ID = @0", _id);
dRUGALLERGYHISTORYBindingSource.DataSource = drugAllergyHis;
}