本文整理汇总了C#中OpenEnvironment.App_Logic.DataAccessLayer.OpenEnvironmentEntities类的典型用法代码示例。如果您正苦于以下问题:C# OpenEnvironmentEntities类的具体用法?C# OpenEnvironmentEntities怎么用?C# OpenEnvironmentEntities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OpenEnvironmentEntities类属于OpenEnvironment.App_Logic.DataAccessLayer命名空间,在下文中一共展示了OpenEnvironmentEntities类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateT_OE_USERS
//*****************USERS **********************************
public static int CreateT_OE_USERS(global::System.String uSER_ID, global::System.String pWD_HASH, global::System.String pWD_SALT, global::System.String fNAME, global::System.String lNAME, global::System.String eMAIL, global::System.Boolean aCT_IND, global::System.Boolean iNITAL_PWD_FLAG, global::System.DateTime? lASTLOGIN_DT, global::System.String pHONE, global::System.String pHONE_EXT, global::System.String cREATE_USER)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
T_OE_USERS u = new T_OE_USERS();
u.USER_ID = uSER_ID;
u.PWD_HASH = pWD_HASH;
u.PWD_SALT = pWD_SALT;
u.FNAME = fNAME;
u.LNAME = lNAME;
u.EMAIL = eMAIL;
u.ACT_IND = aCT_IND;
u.INITAL_PWD_FLAG = iNITAL_PWD_FLAG;
u.EFFECTIVE_DT = System.DateTime.Now;
u.LASTLOGIN_DT = lASTLOGIN_DT;
u.PHONE = pHONE;
u.PHONE_EXT = pHONE_EXT;
u.CREATE_DT = System.DateTime.Now;
u.CREATE_USERID = cREATE_USER;
ctx.AddToT_OE_USERS(u);
ctx.SaveChanges();
return u.USER_IDX;
}
catch (Exception ex)
{
return 0;
}
}
}
示例2: GetT_OE_AnalyzeConfig_ByID
public static T_OE_ANALYZECONFIG GetT_OE_AnalyzeConfig_ByID(int aNALYZECONFIG_IDX)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
return (from a in ctx.T_OE_ANALYZECONFIG
where a.ANALYZECONFIG_IDX == aNALYZECONFIG_IDX
select a).FirstOrDefault();
}
catch (Exception ex)
{
throw ex;
}
}
}
示例3: GetT_OE_AnalyzeConfig
// *************************** Analyze Config *********************************
// *********************************************************************
public static List<T_OE_ANALYZECONFIG> GetT_OE_AnalyzeConfig(string OrgID, int UserID)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
return (from a in ctx.T_OE_ANALYZECONFIG
where a.ORG_ID == OrgID
&& a.USER_IDX == UserID
orderby a.ANALYZECONFIG_NAME
select a).ToList();
}
catch (Exception ex)
{
throw ex;
}
}
}
示例4: DeleteT_OE_ColumnConfig
public static int DeleteT_OE_ColumnConfig(int columnConfig_IDX)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
T_OE_COLUMNCONFIG r = new T_OE_COLUMNCONFIG();
r = (from c in ctx.T_OE_COLUMNCONFIG where c.COLUMNCONFIG_IDX == columnConfig_IDX select c).FirstOrDefault();
ctx.DeleteObject(r);
ctx.SaveChanges();
return 1;
}
catch
{
return 0;
}
}
}
示例5: DeleteT_WQX_IMPORT_LOG
public static int DeleteT_WQX_IMPORT_LOG(int iMPORT_ID)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
T_WQX_IMPORT_LOG r = new T_WQX_IMPORT_LOG();
r = (from c in ctx.T_WQX_IMPORT_LOG
where c.IMPORT_ID == iMPORT_ID select c).FirstOrDefault();
ctx.DeleteObject(r);
ctx.SaveChanges();
return 1;
}
catch
{
return 0;
}
}
}
示例6: DeleteT_ATTAINS_ASSESS_UNITS
public static int DeleteT_ATTAINS_ASSESS_UNITS(int aSSESS_UNIT_IDX)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
T_ATTAINS_ASSESS_UNITS r = (from c in ctx.T_ATTAINS_ASSESS_UNITS
where c.ATTAINS_ASSESS_UNIT_IDX == aSSESS_UNIT_IDX
select c).FirstOrDefault();
ctx.DeleteObject(r);
ctx.SaveChanges();
return 1;
}
catch
{
return 0;
}
}
}
示例7: CreateT_VCCB_USER_ROLE
public static int CreateT_VCCB_USER_ROLE(global::System.Int32 rOLE_IDX, global::System.Int32 uSER_IDX, global::System.String cREATE_USER = "system")
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
T_OE_USER_ROLES ur = new T_OE_USER_ROLES();
ur.ROLE_IDX = rOLE_IDX;
ur.USER_IDX = uSER_IDX;
ur.CREATE_DT = System.DateTime.Now;
ur.CREATE_USERID = cREATE_USER;
ctx.AddToT_OE_USER_ROLES(ur);
ctx.SaveChanges();
return 1;
}
catch (Exception ex)
{
return 0;
}
}
}
示例8: DeleteT_WQX_REF_TAXA_ORG
public static int DeleteT_WQX_REF_TAXA_ORG(string orgName, string charName)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
T_WQX_REF_TAXA_ORG r = new T_WQX_REF_TAXA_ORG();
r = (from c in ctx.T_WQX_REF_TAXA_ORG
where c.ORG_ID == orgName
&& c.BIO_SUBJECT_TAXONOMY == charName
select c).FirstOrDefault();
ctx.DeleteObject(r);
ctx.SaveChanges();
return 1;
}
catch
{
return 0;
}
}
}
示例9: CreateT_OE_ROLES
//*****************ROLES **********************************
public static int CreateT_OE_ROLES(global::System.String rOLE_NAME, global::System.String rOLE_DESC, global::System.String cREATE_USER = "system")
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
T_OE_ROLES r = new T_OE_ROLES();
r.ROLE_NAME = rOLE_NAME;
r.ROLE_DESC = rOLE_DESC;
r.CREATE_DT = System.DateTime.Now;
r.CREATE_USERID = cREATE_USER;
ctx.AddToT_OE_ROLES(r);
ctx.SaveChanges();
return 1;
}
catch (Exception ex)
{
return 0;
}
}
}
示例10: GetWQX_TRANSACTION_LOG
public static List<T_WQX_TRANSACTION_LOG> GetWQX_TRANSACTION_LOG(string TableCD, int TableIdx)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
return (from i in ctx.T_WQX_TRANSACTION_LOG
where i.TABLE_CD == TableCD
&& i.TABLE_IDX == TableIdx
select i).ToList();
}
catch (Exception ex)
{
throw ex;
}
}
}
示例11: GetT_WQX_REF_SAMP_COL_METHOD_ByContext
public static List<T_WQX_REF_SAMP_COL_METHOD> GetT_WQX_REF_SAMP_COL_METHOD_ByContext(string Context)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
return (from a in ctx.T_WQX_REF_SAMP_COL_METHOD
where a.SAMP_COLL_METHOD_CTX == Context
select a).ToList();
}
catch (Exception ex)
{
throw ex;
}
}
}
示例12: GetWQX_IMPORT_LOG_NewActivity
public static T_WQX_IMPORT_LOG GetWQX_IMPORT_LOG_NewActivity()
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
return (from i in ctx.T_WQX_IMPORT_LOG
where i.IMPORT_STATUS == "New"
&& i.TYPE_CD == "Sample"
select i).FirstOrDefault();
}
catch (Exception ex)
{
throw ex;
}
}
}
示例13: GetWQX_IMPORT_LOG_ProcessingCount
public static int GetWQX_IMPORT_LOG_ProcessingCount()
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
return (from i in ctx.T_WQX_IMPORT_LOG
where i.IMPORT_STATUS == "Processing"
&& i.TYPE_CD == "Sample"
select i).Count();
}
catch (Exception ex)
{
return 0;
}
}
}
示例14: ResetPassword
public override string ResetPassword(string username, string answer)
{
using (OpenEnvironmentEntities context = new OpenEnvironmentEntities())
{
T_OE_USERS u = db_Accounts.GetT_OE_USERSByID(username);
if (u != null)
{
//generate new password
string newPass = RandomString(8);
string salt = GenerateSalt();
string hashpass = HashPassword(newPass, _PasswordFormat, salt);
//save updated information
if (db_Accounts.UpdateT_OE_USERS(u.USER_IDX, hashpass, salt, null, null, null, null, true, null, null, null, null, "system") > 0)
{
//send email
string msg = "Your password has been reset. Your new temporary password is: " + "\r\n\r\n";
msg += newPass + "\r\n\r\n";
msg += "When you login for the first time you will be asked to set a permanent password.";
if (u.EMAIL == null)
return "User does not have email address.";
if (Utils.SendEmail(null, u.EMAIL.Split(';').ToList(), null, null, "Tribal-FERST Mvskoke Open Waters Module Password Reset", msg, null))
return "Email has been sent.";
else
return "Error in sending email";
}
else
{
return "Error updating password";
}
}
else
return "Email does not exist in the system.";
}
}
示例15: GetT_WQX_REF_LAB
//******************REF LAB****************************************
public static List<T_WQX_REF_LAB> GetT_WQX_REF_LAB(string OrgID)
{
using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
{
try
{
return (from a in ctx.T_WQX_REF_LAB
where a.ORG_ID == OrgID
orderby a.LAB_NAME descending
select a).ToList();
}
catch (Exception ex)
{
throw ex;
}
}
}