/// <summary>
 /// Create a new T_WQX_USER_ORGS object.
 /// </summary>
 /// <param name="uSER_IDX">Initial value of the USER_IDX property.</param>
 /// <param name="oRG_ID">Initial value of the ORG_ID property.</param>
 public static T_WQX_USER_ORGS CreateT_WQX_USER_ORGS(global::System.Int32 uSER_IDX, global::System.String oRG_ID)
 {
     T_WQX_USER_ORGS t_WQX_USER_ORGS = new T_WQX_USER_ORGS();
     t_WQX_USER_ORGS.USER_IDX = uSER_IDX;
     t_WQX_USER_ORGS.ORG_ID = oRG_ID;
     return t_WQX_USER_ORGS;
 }
示例#2
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;
         }
     }
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the T_WQX_USER_ORGS EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToT_WQX_USER_ORGS(T_WQX_USER_ORGS t_WQX_USER_ORGS)
 {
     base.AddObject("T_WQX_USER_ORGS", t_WQX_USER_ORGS);
 }
示例#4
0
        public static int InsertT_WQX_USER_ORGS(global::System.String oRG_ID, global::System.Int32 uSER_IDX, string rOLE_CD, String cREATE_USER = "******")
        {
            using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
            {
                try
                {
                    T_WQX_USER_ORGS a = new T_WQX_USER_ORGS();

                    a.ORG_ID = oRG_ID;
                    a.USER_IDX = uSER_IDX;
                    if (rOLE_CD != null) a.ROLE_CD = rOLE_CD;
                    a.CREATE_USERID = cREATE_USER.ToUpper();
                    a.CREATE_DT = System.DateTime.Now;

                    ctx.AddToT_WQX_USER_ORGS(a);
                    ctx.SaveChanges();

                    return 1;
                }
                catch (Exception ex)
                {
                    return 0;
                }
            }
        }