本文整理匯總了C#中OpenEnvironment.App_Logic.DataAccessLayer.OpenEnvironmentEntities.AddToT_ATTAINS_ASSESS_UNITS_MLOC方法的典型用法代碼示例。如果您正苦於以下問題:C# OpenEnvironmentEntities.AddToT_ATTAINS_ASSESS_UNITS_MLOC方法的具體用法?C# OpenEnvironmentEntities.AddToT_ATTAINS_ASSESS_UNITS_MLOC怎麽用?C# OpenEnvironmentEntities.AddToT_ATTAINS_ASSESS_UNITS_MLOC使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OpenEnvironment.App_Logic.DataAccessLayer.OpenEnvironmentEntities
的用法示例。
在下文中一共展示了OpenEnvironmentEntities.AddToT_ATTAINS_ASSESS_UNITS_MLOC方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: InsertOrUpdateATTAINS_ASSESS_UNITS_MLOC
//***************************** ATTAINS_ASSESS_UNITS_MLOC **************************************
public static int InsertOrUpdateATTAINS_ASSESS_UNITS_MLOC(int aSSESS_UNIT_IDX, int mONLOC_IDX, String cREATE_USER = "system")
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
Boolean insInd = false;
try
{
T_ATTAINS_ASSESS_UNITS_MLOC a = (from c in ctx.T_ATTAINS_ASSESS_UNITS_MLOC
where c.ATTAINS_ASSESS_UNIT_IDX == aSSESS_UNIT_IDX
&& c.MONLOC_IDX == mONLOC_IDX
select c).FirstOrDefault();
if (a == null)
{
a = new T_ATTAINS_ASSESS_UNITS_MLOC();
insInd = true;
}
a.ATTAINS_ASSESS_UNIT_IDX = aSSESS_UNIT_IDX;
a.MONLOC_IDX = mONLOC_IDX;
if (insInd) //insert case
{
a.CREATE_USERID = cREATE_USER.ToUpper();
a.CREATE_DT = System.DateTime.Now;
ctx.AddToT_ATTAINS_ASSESS_UNITS_MLOC(a);
}
ctx.SaveChanges();
return 1;
}
catch (Exception ex)
{
return 0;
}
}
}