當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。