Esempio n. 1
0
 public int DeleteProductAuthority(EditProductAuthority editProductAuthority)
 {
     return(m_db.Delete("dbo.EditProductAuthority", "product_edit_authority_id", editProductAuthority.GetTableObject()));
 }
Esempio n. 2
0
        public int UpdateProductAuthority(EditProductAuthority editProductAuthority)
        {
            var productAuthorityTable = editProductAuthority.GetTableObject();

            return(m_db.Update("dbo.EditProductAuthority", "product_edit_authority_id", productAuthorityTable, editProductAuthority.productEditAuthorityId));
        }
Esempio n. 3
0
        public EditProductAuthority NewProductAuthority(EditProductAuthority editProductAuthority)
        {
            var records = HasProductAuthority(editProductAuthority.Username, editProductAuthority.ModifyProjectId);

            CommUtils.Assert(!records, "用户[{0}]已存在该权限", editProductAuthority.Username);

            var newId = Insert("dbo.EditProductAuthority", "product_edit_authority_id", editProductAuthority.GetTableObject());

            editProductAuthority.productEditAuthorityId = newId;
            return(editProductAuthority);
        }