Example #1
0
 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;
         }
     }
 }
Example #2
0
 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;
         }
     }
 }
 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;
         }
     }
 }
Example #4
0
 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;
         }
     }
 }
        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;
                }
            }
        }
Example #6
0
 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;
         }
     }
 }
Example #7
0
 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;
         }
     }
 }
 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;
         }
     }
 }
 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;
         }
     }
 }