本文整理汇总了C#中System.Methods.GetAllLastVersionMethods方法的典型用法代码示例。如果您正苦于以下问题:C# Methods.GetAllLastVersionMethods方法的具体用法?C# Methods.GetAllLastVersionMethods怎么用?C# Methods.GetAllLastVersionMethods使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Methods
的用法示例。
在下文中一共展示了Methods.GetAllLastVersionMethods方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadQaqcStatus
void LoadQaqcStatus()
{
if (TypeSample == Comun.TypeSample.Sample)
{
// --- get repetitions
repRepetition.DataSource = Comun.ListTypeRepetition;
repRepetition.DisplayMember = "Name_repetition";
repRepetition.ValueMember = "Cod_repetition";
// --- get methods
CTemplate_methodFactory faTemplate_method = new CTemplate_methodFactory();
CTemplate_method oTemplate_method = faTemplate_method.GetByPrimaryKey(new CTemplate_methodKeys(Idtemplate_method));
Methods oMethods = new Methods();
gcMethods.DataSource = oMethods.GetAllLastVersionMethods(Convert.ToInt32(oTemplate_method.Idelement), oTemplate_method.Cod_type_sample);
// --- assign to popup controls
// observation
Idtemplate_method = Convert.ToInt32(gvMethods.GetFocusedRowCellValue(gcMet_Idtemplate_method));
tbObservation.Text = Text_obs;
// method
if (Idretest > 0)
{
faTemplate_method = new CTemplate_methodFactory();
oTemplate_method = faTemplate_method.GetByPrimaryKey(new CTemplate_methodKeys(Idretest));
tbCod_method.Text = oTemplate_method.Cod_template_method;
tbAbbrevMethod.Text = oTemplate_method.Abbreviation;
ckEnableRetest.Checked = true;
}
else
{
faTemplate_method = new CTemplate_methodFactory();
oTemplate_method = faTemplate_method.GetByPrimaryKey(new CTemplate_methodKeys(Idtemplate_method));
tbCod_method.Text = oTemplate_method.Cod_template_method;
tbAbbrevMethod.Text = oTemplate_method.Abbreviation;
ckEnableRetest.Checked = false;
ckChangeMethod.Checked = false;
}
// --- get retest
#region codigo anterior
/*
CREATE OR REPLACE FUNCTION public.sp_retest_getBySample(p_idrecep_sample_detail_elem bigint, p_idbatch bigint)
returns TABLE ("Idbatch" BIGINT, "Num_tray" VARCHAR, "Idrecep_sample_detail_elem" BIGINT, "Idrecep_sample_detail" BIGINT
,"Cod_module" VARCHAR, "Cod_process" VARCHAR, "Status_process" CHAR, "Result_analysis" DECIMAL
, "Str_result_analysis" VARCHAR, "Status_result" int, "Cod_sample" VARCHAR
, "Flag_current_batch" boolean
)AS $$
BEGIN
--
CREATE TEMP TABLE tmp_batch ON COMMIT DROP AS
SELECT origin_batch as idbatch, idrecep_sample_detail_elem, idrecep_sample_detail
FROM retest
WHERE (origin_batch = p_idbatch OR destiny_batch = p_idbatch)
UNION ALL
SELECT destiny_batch as idbatch, idrecep_sample_detail_elem, idrecep_sample_detail
FROM retest
WHERE (destiny_batch = p_idbatch OR origin_batch = p_idbatch);
RETURN QUERY
SELECT DISTINCT t1.idbatch, CAST(LPAD(CAST(t2.num_tray AS VARCHAR), 5, '0') AS VARCHAR), t1.idrecep_sample_detail_elem, t4.idrecep_sample_detail
, t2.cod_module, t2.cod_process, t2.status_process, t3.result_analysis
, t3.str_result_analysis, COALESCE(CAST(t3.Qaqc_status_result AS INT), 0) as ER, t3.cod_sample
, CAST(CASE
WHEN t1.idbatch = p_idbatch THEN 1
ELSE 0
END AS BOOLEAN) AS flag_current_batch
FROM tmp_batch t1
INNER JOIN batch t2
ON t1.idbatch = t2.idbatch
LEFT OUTER JOIN batch_detail_aa_twofold t3
ON t2.idbatch = t3.idbatch
AND t1.idrecep_sample_detail_elem = t3.idrecep_sample_detail_elem
LEFT OUTER JOIN recep_sample_detail t4
ON t1.idrecep_sample_detail = t4.idrecep_sample_detail
WHERE t1.idrecep_sample_detail_elem = p_idrecep_sample_detail_elem;
END;
$$ LANGUAGE plpgsql;
*/
#endregion
var tmp_batch =
(from m in new CRetestFactory().GetAll().Where(x => x.Origin_batch == Idbatch || x.Destiny_batch == Idbatch)
select new { idbatch = m.Origin_batch, m.Idrecep_sample_detail_elem, m.Idrecep_sample_detail })
.Union(from m in new CRetestFactory().GetAll().Where(x => x.Destiny_batch == Idbatch || x.Origin_batch == Idbatch)
select new { idbatch = m.Destiny_batch, m.Idrecep_sample_detail_elem, m.Idrecep_sample_detail });
var query2 =
(from m in tmp_batch.Where(x => x.Idrecep_sample_detail_elem == Idrecep_sample_detail_elem)
from n in new CBatchFactory().GetAll().Where(x => x.Idbatch == m.idbatch)
join p in new CBatch_detail_aa_twofoldFactory().GetAll()
on new { field1 = m.idbatch, field2 = m.Idrecep_sample_detail_elem }
equals new { field1 = p.Idbatch, field2 = p.Idrecep_sample_detail_elem } into np
//.........这里部分代码省略.........