本文整理汇总了C#中OpenEnvironment.App_Logic.DataAccessLayer.OpenEnvironmentEntities.ExecuteStoreCommand方法的典型用法代码示例。如果您正苦于以下问题:C# OpenEnvironmentEntities.ExecuteStoreCommand方法的具体用法?C# OpenEnvironmentEntities.ExecuteStoreCommand怎么用?C# OpenEnvironmentEntities.ExecuteStoreCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenEnvironment.App_Logic.DataAccessLayer.OpenEnvironmentEntities
的用法示例。
在下文中一共展示了OpenEnvironmentEntities.ExecuteStoreCommand方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteT_WQX_MONLOC
public static int DeleteT_WQX_MONLOC(int monLocIDX, string UserID)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
T_WQX_MONLOC m = db_WQX.GetWQX_MONLOC_ByID(monLocIDX);
if (m != null)
{
if (m.WQX_SUBMIT_STATUS == "Y" && m.ACT_IND == false)
{
//only actually delete record from database if it has already been set to inactive and WQX status is passed ("Y")
string sql = "DELETE FROM T_WQX_MONLOC WHERE MONLOC_IDX = " + monLocIDX;
ctx.ExecuteStoreCommand(sql);
return 1;
}
//if there are any activities for this monitoring location, don't delete becuase this would cause WQX to delete all activities for this mon loc.
int iActCount = db_WQX.GetWQX_ACTIVITYByMonLocID(monLocIDX);
if (iActCount > 0)
{
return -1;
}
else
{
//mark as inactive (deleted), which will send the delete request to EPA-WQX
db_WQX.InsertOrUpdateWQX_MONLOC(monLocIDX, null, null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "U", null, false, null, UserID);
return 1;
}
}
else
return 0;
}
catch
{
return 0;
}
}
}
示例2: DeleteT_WQX_PROJECT
public static int DeleteT_WQX_PROJECT(int ProjectIDX, string UserID)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
T_WQX_PROJECT p = db_WQX.GetWQX_PROJECT_ByID(ProjectIDX);
if (p != null)
{
if (p.WQX_SUBMIT_STATUS == "Y" && p.ACT_IND == false)
{
//only actually delete record from database if it has already been set to inactive and WQX status is passed ("Y")
string sql = "DELETE FROM T_WQX_PROJECT WHERE PROJECT_IDX = " + ProjectIDX;
ctx.ExecuteStoreCommand(sql);
return 1;
}
//if there are any active activities for this project, don't delete becuase this would cause WQX to delete all activities for this project.
int iActCount = db_WQX.GetWQX_ACTIVITYByProjectID(ProjectIDX);
if (iActCount > 0)
return -1;
else
{
//mark as inactive (deleted), which will send the delete request to EPA-WQX
InsertOrUpdateWQX_PROJECT(ProjectIDX, null, null, null, null, null, null, null, "U", null, false, null, UserID);
return 1;
}
}
else
return 0;
}
catch
{
return 0;
}
}
}
示例3: DeleteT_WQX_IMPORT_TRANSLATE
public static int DeleteT_WQX_IMPORT_TRANSLATE(int TranslateID)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
string sql = "DELETE FROM T_WQX_IMPORT_TRANSLATE WHERE TRANSLATE_IDX = " + TranslateID;
ctx.ExecuteStoreCommand(sql);
return 1;
}
catch
{
return 0;
}
}
}
示例4: DeleteT_WQX_IMPORT_TEMP_SAMPLE
public static int DeleteT_WQX_IMPORT_TEMP_SAMPLE(global::System.String uSER_ID)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
string sql = "DELETE FROM T_WQX_IMPORT_TEMP_SAMPLE WHERE USER_ID = '" + uSER_ID + "'";
ctx.ExecuteStoreCommand(sql);
return 1;
}
catch
{
return 0;
}
}
}
示例5: DeleteT_WQX_IMPORT_TEMPLATE_DTL
public static int DeleteT_WQX_IMPORT_TEMPLATE_DTL(int TemplateDtlID)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
string sql = "DELETE FROM T_WQX_IMPORT_TEMPLATE_DTL WHERE TEMPLATE_DTL_ID = " + TemplateDtlID;
ctx.ExecuteStoreCommand(sql);
return 1;
}
catch
{
return 0;
}
}
}
示例6: DeleteT_WQX_ACTIVITY
public static int DeleteT_WQX_ACTIVITY(int ActivityIDX, string UserID)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
T_WQX_ACTIVITY a = db_WQX.GetWQX_ACTIVITY_ByID(ActivityIDX);
if (a != null)
{
if (a.ACT_IND == false && (a.WQX_IND == false || a.WQX_SUBMIT_STATUS != "U"))
{
//only actually delete record from database if it has already been set to inactive and WQX status is not pending ("U")
string sql = "DELETE FROM T_WQX_ACTIVITY WHERE ACTIVITY_IDX = " + ActivityIDX;
ctx.ExecuteStoreCommand(sql);
return 1;
}
else
{
//mark as inactive (deleted), which will send the delete request to EPA-WQX
UpdateWQX_ACTIVITY_WQXStatus(ActivityIDX, "U", false, null, UserID);
return 1;
}
}
else
return 0;
}
catch
{
return 0;
}
}
}
示例7: DeleteT_EPA_ORGS
// ***************************** T_EPA_ORGS ******************************
// *********************************************************************
public static int DeleteT_EPA_ORGS()
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
string sql = "DELETE FROM T_EPA_ORGS";
ctx.ExecuteStoreCommand(sql);
return 1;
}
catch
{
return 0;
}
}
}