コード例 #1
0
        public string Update(MRole obj)
        {
            MRoleRPO RPO = new MRoleRPO(imap_);

            RPO.Update(obj, ref exec_);
            return(exec_.Message);
        }
コード例 #2
0
        public string Delete(string id)
        {
            MRoleRPO RPO = new MRoleRPO(imap_);

            RPO.Delete(id, ref exec_);
            return(exec_.Message);
        }
コード例 #3
0
        public string Add(MRole obj)
        {
            MRoleRPO RPO = new MRoleRPO(imap_);

            RPO.Insert(obj, ref exec_);
            return(exec_.Message);
        }
コード例 #4
0
        public List <MRole> ReadList(ref string message)
        {
            MRoleRPO RPO = new MRoleRPO(imap_);

            if (RPO.ReadList(ref exec_))
            {
                return(RPO.Result.Collection);
            }
            else
            {
                message = "Internal Server Error";
            }

            return(null);
        }
コード例 #5
0
        public bool CheckIsExist(string id, ref string message)
        {
            MRoleRPO RPO = new MRoleRPO(imap_);

            //RPO.Where(nameof(MRole.RoleID)).Equals(id);
            RPO.Conditions(nameof(MRole.RoleID), Operator.Equals(id));
            if (RPO.ReadOne(ref exec_))
            {
                return(RPO.Result.AffectedRow > 0);
            }
            else
            {
                message = exec_.Message;
            }

            return(true);
        }
コード例 #6
0
        public string AddBulk(List <MRole> lstObj)
        {
            MRoleRPO RPO = new MRoleRPO(imap_);

            RPO.BeginTrans();
            foreach (var obj in lstObj)
            {
                if (exec_.Success)
                {
                    RPO.Insert(obj, ref exec_);
                }
                else
                {
                    break;
                }
            }
            RPO.EndTrans(exec_);
            return(exec_.Message);
        }