コード例 #1
0
        public static int Insert(MProfile ent, List <MProfileOptions> entOpcs, ref int ProfileId)
        {
            int result = DAProfile.Insert(ent, ref ProfileId);

            if (result.Equals(0))
            {
                foreach (MProfileOptions opc in entOpcs)
                {
                    opc.ProfileId = ProfileId;
                    result        = DAProfile.InsertOptions(opc);
                }
            }

            return(result);
        }
コード例 #2
0
        public static int Update(MProfile ent, List <MProfileOptions> entOpcs)
        {
            int result = DAProfile.Update(ent);

            if (result.Equals(0))
            {
                result = DAProfile.DeleteOptions(ent);

                if (result.Equals(0))
                {
                    foreach (MProfileOptions opc in entOpcs)
                    {
                        opc.ProfileId = ent.ProfileId;
                        result        = DAProfile.InsertOptions(opc);
                    }
                }
            }

            return(result);
        }