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; } } }