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