Beispiel #1
0
        public TransactionResult Update(ref MsUserRole item)
        {
            List <SqlCommand> ArraySQLCmd    = new List <SqlCommand>();
            TransactionDB     TransDB        = new TransactionDB(DALInfo);
            TransactionResult ObjTransResult = default(TransactionResult);

            GetSingleQueryUpdate(item, ref ArraySQLCmd);

            ObjTransResult = TransDB.BatchUpdate(ArraySQLCmd);

            if (ObjTransResult.Result == 1 && !item.RowState.Equals(DataRowState.Deleted))
            {
                item.RowState = DataRowState.Unchanged;
            }

            return(ObjTransResult);
        }
Beispiel #2
0
        public TransactionResult Update(ref List <MsUserRole> objList)
        {
            List <SqlCommand> ArraySQLCmd    = new List <SqlCommand>();
            TransactionDB     TransDB        = new TransactionDB(DALInfo);
            TransactionResult ObjTransResult = default(TransactionResult);

            GetBatchQueryUpdate(objList, ref ArraySQLCmd);

            ObjTransResult = TransDB.BatchUpdate(ArraySQLCmd);

            if (ObjTransResult.Result == 1)
            {
                objList = AcceptChanges(ref objList);
            }

            return(ObjTransResult);
        }