当前位置: 首页>>代码示例>>C#>>正文


C# OpenEnvironmentEntities.DeleteObject方法代码示例

本文整理汇总了C#中OpenEnvironment.App_Logic.DataAccessLayer.OpenEnvironmentEntities.DeleteObject方法的典型用法代码示例。如果您正苦于以下问题:C# OpenEnvironmentEntities.DeleteObject方法的具体用法?C# OpenEnvironmentEntities.DeleteObject怎么用?C# OpenEnvironmentEntities.DeleteObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenEnvironment.App_Logic.DataAccessLayer.OpenEnvironmentEntities的用法示例。


在下文中一共展示了OpenEnvironmentEntities.DeleteObject方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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;
         }
     }
 }
开发者ID:OTIE-Zimmer,项目名称:Open-Waters,代码行数:18,代码来源:db_Config.cs

示例2: 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;
         }
     }
 }
开发者ID:OTIE-Zimmer,项目名称:Open-Waters,代码行数:19,代码来源:db_Ref.cs

示例3: DeleteT_ATTAINS_ASSESS

 public static int DeleteT_ATTAINS_ASSESS(int aSSESS_IDX)
 {
     using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
     {
         try
         {
             T_ATTAINS_ASSESS r = (from c in ctx.T_ATTAINS_ASSESS
                                         where c.ATTAINS_ASSESS_IDX == aSSESS_IDX
                                         select c).FirstOrDefault();
             ctx.DeleteObject(r);
             ctx.SaveChanges();
             return 1;
         }
         catch
         {
             return 0;
         }
     }
 }
开发者ID:open-environment,项目名称:open-waters,代码行数:19,代码来源:db_Attains.cs

示例4: 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;
         }
     }
 }
开发者ID:OTIE-Zimmer,项目名称:Open-Waters,代码行数:21,代码来源:db_Ref.cs

示例5: DeleteT_ATTAINS_REPORT

        public static int DeleteT_ATTAINS_REPORT(int aTTAINS_REPORT_IDX)
        {
            using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
            {
                try
                {
                    T_ATTAINS_REPORT r = (from c in ctx.T_ATTAINS_REPORT
                                          where c.ATTAINS_REPORT_IDX == aTTAINS_REPORT_IDX
                                          select c).FirstOrDefault();

                    if (r.ATTAINS_SUBMIT_STATUS == "Y" || r.ATTAINS_SUBMIT_STATUS == "U")
                        return -1;

                    ctx.DeleteObject(r);
                    ctx.SaveChanges();
                    return 1;
                }
                catch
                {
                    return 0;
                }
            }
        }
开发者ID:open-environment,项目名称:open-waters,代码行数:23,代码来源:db_Attains.cs

示例6: DeleteT_WQX_USER_ORGS

 public static int DeleteT_WQX_USER_ORGS(global::System.String oRG_ID, global::System.Int32 uSER_IDX)
 {
     using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
     {
         try
         {
             T_WQX_USER_ORGS r = new T_WQX_USER_ORGS();
             r = (from c in ctx.T_WQX_USER_ORGS where c.USER_IDX == uSER_IDX && c.ORG_ID == oRG_ID  select c).FirstOrDefault();
             ctx.DeleteObject(r);
             ctx.SaveChanges();
             return 1;
         }
         catch
         {
             return 0;
         }
     }
 }
开发者ID:open-environment,项目名称:open-waters,代码行数:18,代码来源:db_WQX.cs

示例7: DeleteT_WQX_RESULT

 public static int DeleteT_WQX_RESULT(int ResultIDX)
 {
     using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
     {
         try
         {
             T_WQX_RESULT r = new T_WQX_RESULT();
             r = (from c in ctx.T_WQX_RESULT where c.RESULT_IDX == ResultIDX select c).FirstOrDefault();
             ctx.DeleteObject(r);
             ctx.SaveChanges();
             return 1;
         }
         catch
         {
             return 0;
         }
     }
 }
开发者ID:open-environment,项目名称:open-waters,代码行数:18,代码来源:db_WQX.cs

示例8: DeleteT_OE_USERS

 public static int DeleteT_OE_USERS(int idx)
 {
     using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
     {
         try
         {
             T_OE_USERS row = new T_OE_USERS();
             row = (from c in ctx.T_OE_USERS where c.USER_IDX == idx select c).First();
             ctx.DeleteObject(row);
             ctx.SaveChanges();
             return 1;
         }
         catch (Exception ex)
         {
             return 0;
         }
     }
 }
开发者ID:open-environment,项目名称:open-waters,代码行数:18,代码来源:db_Accounts.cs

示例9: DeleteT_VCCB_USER_ROLE

 public static int DeleteT_VCCB_USER_ROLE(int UserIDX, int RoleIDX)
 {
     using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
     {
         try
         {
             T_OE_USER_ROLES row = new T_OE_USER_ROLES();
             row = (from c in ctx.T_OE_USER_ROLES
                    where c.ROLE_IDX == RoleIDX && c.USER_IDX == UserIDX
                    select c).FirstOrDefault();
             ctx.DeleteObject(row);
             ctx.SaveChanges();
             return 1;
         }
         catch (Exception ex)
         {
             return 0;
         }
     }
 }
开发者ID:open-environment,项目名称:open-waters,代码行数:20,代码来源:db_Accounts.cs


注:本文中的OpenEnvironment.App_Logic.DataAccessLayer.OpenEnvironmentEntities.DeleteObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。