public static int CreateT_VCCB_USER_ROLE(global::System.Int32 rOLE_IDX, global::System.Int32 uSER_IDX, global::System.String cREATE_USER = "******")
 {
     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;
         }
     }
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the T_OE_USER_ROLES EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToT_OE_USER_ROLES(T_OE_USER_ROLES t_OE_USER_ROLES)
 {
     base.AddObject("T_OE_USER_ROLES", t_OE_USER_ROLES);
 }
 /// <summary>
 /// Create a new T_OE_USER_ROLES object.
 /// </summary>
 /// <param name="uSER_ROLE_IDX">Initial value of the USER_ROLE_IDX property.</param>
 /// <param name="uSER_IDX">Initial value of the USER_IDX property.</param>
 /// <param name="rOLE_IDX">Initial value of the ROLE_IDX property.</param>
 public static T_OE_USER_ROLES CreateT_OE_USER_ROLES(global::System.Int32 uSER_ROLE_IDX, global::System.Int32 uSER_IDX, global::System.Int32 rOLE_IDX)
 {
     T_OE_USER_ROLES t_OE_USER_ROLES = new T_OE_USER_ROLES();
     t_OE_USER_ROLES.USER_ROLE_IDX = uSER_ROLE_IDX;
     t_OE_USER_ROLES.USER_IDX = uSER_IDX;
     t_OE_USER_ROLES.ROLE_IDX = rOLE_IDX;
     return t_OE_USER_ROLES;
 }
 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;
         }
     }
 }